Skip to content

expand_include: set .directory to dir of included file. #70184

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Mar 21, 2020

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Mar 20, 2020

Resolves the regression noted in #69838.

r? @petrochenkov
cc @eddyb @Mark-Simulacrum

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 20, 2020
// If in the included file we have e.g., `mod bar;`,
// then the path of `bar.rs` should be relative to the directory of `file`.
// See https://github.com/rust-lang/rust/pull/69838/files#r395217057 for a discussion.
// `MacroExpander::fully_expand_fragment` later restores, so "stack discipline" is maintained.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This claim is a bit subtle, but this is what I inferred when reading the code in fully_expand_fragment. If this is not correct, then the alternative would be to add a flag to SyntaxExtension or something and deal with it in rustc_expand::expand.

@Centril Centril force-pushed the include-mod-relativism branch from 41ddf8a to b005129 Compare March 20, 2020 15:10
@Centril
Copy link
Contributor Author

Centril commented Mar 20, 2020

Since this broke perfbot, let's @bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion

@bors
Copy link
Collaborator

bors commented Mar 20, 2020

⌛ Trying commit b00512957b66787288b5fcf6b038c62fdecb5c1c with merge 91eb0046f6433c4fa57c9f13e06b1f1a40a8afbe...

@rust-highfive

This comment has been minimized.

@Centril Centril force-pushed the include-mod-relativism branch from b005129 to 0d018a5 Compare March 20, 2020 16:39
@Centril
Copy link
Contributor Author

Centril commented Mar 20, 2020

@bors try

@bors
Copy link
Collaborator

bors commented Mar 20, 2020

⌛ Trying commit 0d018a5 with merge 901fd06b9208132d8546785157f8425b29097c36...

@bors
Copy link
Collaborator

bors commented Mar 20, 2020

💔 Test failed - checks-azure

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 20, 2020
@Centril
Copy link
Contributor Author

Centril commented Mar 20, 2020

@bors try

@bors
Copy link
Collaborator

bors commented Mar 20, 2020

⌛ Trying commit 0d018a5 with merge 259aa700bfbc530eb7162b752413d53edc80c060...

@bors
Copy link
Collaborator

bors commented Mar 20, 2020

💔 Test failed - checks-azure

@petrochenkov
Copy link
Contributor

LGTM, r=me if all the necessary testing passes.

@Centril
Copy link
Contributor Author

Centril commented Mar 20, 2020

The PR builder is passing, and the try builder doesn't want to start due to overbooked CI. So I guess we can just find out by checking the status of perf.rl.o a day later instead.

@bors r=petrochenkov

@bors
Copy link
Collaborator

bors commented Mar 20, 2020

📌 Commit 0d018a5 has been approved by petrochenkov

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 20, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Mar 21, 2020
…etrochenkov

expand_include: set `.directory` to dir of included file.

Resolves the regression noted in rust-lang#69838.

r? @petrochenkov
cc @eddyb @Mark-Simulacrum
Centril added a commit to Centril/rust that referenced this pull request Mar 21, 2020
…etrochenkov

expand_include: set `.directory` to dir of included file.

Resolves the regression noted in rust-lang#69838.

r? @petrochenkov
cc @eddyb @Mark-Simulacrum
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 21, 2020
Rollup of 16 pull requests

Successful merges:

 - rust-lang#65097 (Make std::sync::Arc compatible with ThreadSanitizer)
 - rust-lang#69033 (Use generator resume arguments in the async/await lowering)
 - rust-lang#69997 (add `Option::{zip,zip_with}` methods under "option_zip" gate)
 - rust-lang#70038 (Remove the call that makes miri fail)
 - rust-lang#70058 (can_begin_literal_maybe_minus: `true` on `"-"? lit` NTs.)
 - rust-lang#70111 (BTreeMap: remove shared root)
 - rust-lang#70139 (add delay_span_bug to TransmuteSizeDiff, just to be sure)
 - rust-lang#70165 (Remove the erase regions MIR transform)
 - rust-lang#70166 (Derive PartialEq, Eq and Hash for RangeInclusive)
 - rust-lang#70176 (Add tests for rust-lang#58319 and rust-lang#65131)
 - rust-lang#70177 (Fix oudated comment for NamedRegionMap)
 - rust-lang#70184 (expand_include: set `.directory` to dir of included file.)
 - rust-lang#70187 (more clippy fixes)
 - rust-lang#70188 (Clean up E0439 explanation)
 - rust-lang#70189 (Abi::is_signed: assert that we are a Scalar)
 - rust-lang#70194 (#[must_use] on split_off())

Failed merges:

r? @ghost
@bors bors merged commit 621f2b7 into rust-lang:master Mar 21, 2020
@Centril Centril deleted the include-mod-relativism branch March 21, 2020 07:54
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants