Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign uprustc_resolve: don't allow paths starting with `::crate`. #53347
Conversation
rust-highfive
assigned
petrochenkov
Aug 14, 2018
rust-highfive
added
the
S-waiting-on-review
label
Aug 14, 2018
This comment was marked as resolved.
This comment was marked as resolved.
|
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
This comment has been minimized.
This comment has been minimized.
|
cc @nikomatsakis If we go down this path, chalk at least needs to be updated. |
This comment has been minimized.
This comment has been minimized.
|
Implementation looks good to me, but I'd like to wait for other people's opinions. I've seen an argument that macro m($crate_name: ident) {
::$crate_name::something();
}
m!(my_crate); // OK
m!(crate); // OK |
This comment has been minimized.
This comment has been minimized.
|
@petrochenkov Doesn't seem that hard to write I don't have any fundamental objection to |
This comment has been minimized.
This comment has been minimized.
Yes, this should be possible when #48067 is implemented (paths cannot be easily concatenated in macros right now). Anyway, prohibiting |
varkor
added a commit
to varkor/chalk
that referenced
this pull request
Aug 14, 2018
eddyb
force-pushed the
eddyb:no-crate-in-root
branch
from
fd8ab07
to
2c4a2fc
Aug 14, 2018
This comment was marked as resolved.
This comment was marked as resolved.
|
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
This comment has been minimized.
This comment has been minimized.
|
Do we have a label "ping @rust-lang/lang, wait for a few days and then r+ even if nobody responded"? |
petrochenkov
added
S-waiting-on-team
and removed
S-waiting-on-review
labels
Aug 15, 2018
eddyb
added
I-nominated
T-lang
labels
Aug 15, 2018
This comment has been minimized.
This comment has been minimized.
|
We discussed this in a previous meeting and I got the impression that there was consensus around |
This comment has been minimized.
This comment has been minimized.
|
I second @cramertj. |
This comment has been minimized.
This comment has been minimized.
|
This still needs its build failures fixed ( |
joshtriplett
added
S-waiting-on-author
and removed
S-waiting-on-team
labels
Aug 16, 2018
eddyb
removed
the
I-nominated
label
Aug 16, 2018
eddyb
force-pushed the
eddyb:no-crate-in-root
branch
from
2c4a2fc
to
9347bf7
Aug 16, 2018
This comment has been minimized.
This comment has been minimized.
|
@bors r=petrochenkov |
This comment has been minimized.
This comment has been minimized.
|
|
bors
added
S-waiting-on-bors
and removed
S-waiting-on-author
labels
Aug 16, 2018
This comment was marked as resolved.
This comment was marked as resolved.
|
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
eddyb
force-pushed the
eddyb:no-crate-in-root
branch
from
9347bf7
to
be90514
Aug 17, 2018
This comment has been minimized.
This comment has been minimized.
|
@bors r=petrochenkov |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again. How do I rebase?Assuming
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial. Please avoid the "Resolve conflicts" button on GitHub. It uses Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Error message
|
bors
added
S-waiting-on-author
and removed
S-waiting-on-bors
labels
Aug 17, 2018
eddyb
force-pushed the
eddyb:no-crate-in-root
branch
from
be90514
to
9b1d3c7
Aug 17, 2018
This comment has been minimized.
This comment has been minimized.
|
@bors r=petrochenkov |
This comment has been minimized.
This comment has been minimized.
|
|
bors
added
S-waiting-on-bors
and removed
S-waiting-on-author
labels
Aug 17, 2018
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this pull request
Aug 17, 2018
bors
added a commit
that referenced
this pull request
Aug 17, 2018
bors
merged commit 9b1d3c7
into
rust-lang:master
Aug 17, 2018
1 check passed
eddyb
deleted the
eddyb:no-crate-in-root
branch
Aug 17, 2018
This comment has been minimized.
This comment has been minimized.
|
Being conservative here is fine, especially now that |
This comment has been minimized.
This comment has been minimized.
|
@rpjohnst The current interpretation isn't that, but rather that |
This comment has been minimized.
This comment has been minimized.
|
I get that interpretation, but the |
This comment has been minimized.
This comment has been minimized.
|
@rpjohnst Note that we can't make that work in Rust 2015, because there is no place (in the "module tree", so to speak) where you can just "access crates by their name". In Rust 2018 that's the topmost path level, but in Rust 2015 it doesn't exist, and if we allow |
This comment has been minimized.
This comment has been minimized.
|
Yeah, 2015 does make it messier. But perhaps allowing We could also allow Regardless, |
eddyb commentedAug 14, 2018
cc @aturon @joshtriplett
r? @petrochenkov