Uh oh!
There was an error while loading. Please reload this page.
rustc_resolve: don't allow paths starting with ::crate. - #53347
Conversation
This comment has been minimized.
This comment has been minimized.
eddyb
commented
Aug 14, 2018
cc @nikomatsakis If we go down this path, chalk at least needs to be updated. |
petrochenkov
commented
Aug 14, 2018
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);// OKm!(crate);// OK |
@petrochenkov Doesn't seem that hard to write I don't have any fundamental objection to |
petrochenkov
commented
Aug 14, 2018
Yes, this should be possible when #48067 is implemented (paths cannot be easily concatenated in macros right now). Anyway, prohibiting |
Fixes dependency issue in rust-lang/rust#53347.
This comment has been minimized.
This comment has been minimized.
petrochenkov
commented
Aug 15, 2018
Do we have a label "ping @rust-lang/lang, wait for a few days and then r+ even if nobody responded"? |
cramertj
commented
Aug 15, 2018
We discussed this in a previous meeting and I got the impression that there was consensus around |
Centril
commented
Aug 15, 2018
I second @cramertj. |
joshtriplett
commented
Aug 15, 2018
This still needs its build failures fixed ( |
eddyb
commented
Aug 16, 2018
@bors r=petrochenkov |
bors
commented
Aug 16, 2018
📌 Commit 9347bf78aaadf67967bd03b144bce9cf99850203 has been approved by |
This comment has been minimized.
This comment has been minimized.
eddyb
commented
Aug 17, 2018
@bors r=petrochenkov |
bors
commented
Aug 17, 2018
📌 Commit be90514154a4202ba27a0be50d64ff4fe193c61c has been approved by |
bors
commented
Aug 17, 2018
🔒 Merge conflict 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 |
eddyb
commented
Aug 17, 2018
@bors r=petrochenkov |
bors
commented
Aug 17, 2018
📌 Commit 9b1d3c7 has been approved by |
rustc_resolve: don't allow paths starting with `::crate`. cc @aturon@joshtriplett r? @petrochenkov
Rollup of 11 pull requests Successful merges: - #52858 (Implement Iterator::size_hint for Elaborator.) - #53321 (Fix usage of `wasm_target_feature`) - #53326 ([nll] add regression test for issue #27868) - #53347 (rustc_resolve: don't allow paths starting with `::crate`.) - #53349 ([nll] add tests for #48697 and #30104) - #53357 (Pretty print btreemap for GDB) - #53358 (`{to,from}_{ne,le,be}_bytes` for unsigned integer types) - #53406 (Do not suggest conversion method that is already there) - #53407 (make more ported compile fail tests more robust w.r.t. NLL) - #53413 (Warn that `#![feature(rust_2018_preview)]` is implied when the edition is set to Rust 2018.) - #53434 (wasm: Remove --strip-debug argument to LLD) Failed merges: r? @ghost
rpjohnst
commented
Aug 17, 2018
Being conservative here is fine, especially now that |
eddyb
commented
Aug 18, 2018
@rpjohnst The current interpretation isn't that, but rather that |
rpjohnst
commented
Aug 18, 2018
I get that interpretation, but the |
eddyb
commented
Aug 18, 2018
@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 |
Yeah, 2015 does make it messier. But perhaps allowing We could also allow Regardless, |
cc @aturon@joshtriplett
r? @petrochenkov