Auto merge of #56117 - petrochenkov:iempty, r=eddyb

resolve: Make "empty import canaries" invisible from other crates

Empty imports `use prefix::{};` are desugared into `use prefix::{self as _};` to make sure the prefix is checked for privacy/stability/etc.
This caused issues in cross-crate scenarios because gensyms are lost in crate metadata (the `_` is a gensym).

Fixes https://github.com/rust-lang/rust/issues/55811
This commit is contained in:
bors 2018-11-21 12:54:10 +00:00
commit ee7bb94044
3 changed files with 15 additions and 1 deletions

View file

@ -0,0 +1,5 @@
mod m {}
// These two imports should not conflict when this crate is loaded from some other crate.
use m::{};
use m::{};

View file

@ -0,0 +1,6 @@
// compile-pass
// aux-build:issue-55811.rs
extern crate issue_55811;
fn main() {}