resolve: Desugar empty import groups into synthetic dummy imports

so that they are correctly resolved on 2018 edition
This commit is contained in:
Vadim Petrochenkov 2018-10-27 23:38:09 +03:00
parent 1f257bd022
commit c57f0a7201
7 changed files with 51 additions and 98 deletions

View file

@ -10,6 +10,6 @@
// Prefix in imports with empty braces should be resolved and checked privacy, stability, etc.
use foo::{}; //~ ERROR cannot find module or enum `foo` in the crate root
use foo::{}; //~ ERROR unresolved import `foo`
fn main() {}

View file

@ -1,9 +1,9 @@
error[E0578]: cannot find module or enum `foo` in the crate root
error[E0432]: unresolved import `foo`
--> $DIR/issue-28388-1.rs:13:5
|
LL | use foo::{}; //~ ERROR cannot find module or enum `foo` in the crate root
| ^^^ not found in the crate root
LL | use foo::{}; //~ ERROR unresolved import `foo`
| ^^^^^^^ no `foo` in the root
error: aborting due to previous error
For more information about this error, try `rustc --explain E0578`.
For more information about this error, try `rustc --explain E0432`.