mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-28 05:34:45 +00:00

When encountering `use _;`, `use _::*'` or similar, do not emit two errors for that single mistake. This also side-steps the issue of resolve errors suggesting adding a crate named `_` to `Cargo.toml`.
19 lines
506 B
Rust
19 lines
506 B
Rust
//@ revisions: ed2015 ed2021
|
|
//@[ed2015] edition: 2015
|
|
//@[ed2021] edition: 2021
|
|
use self::*;
|
|
//~^ ERROR unresolved import `self::*`
|
|
use crate::*;
|
|
//~^ ERROR unresolved import `crate::*`
|
|
use _::a;
|
|
//~^ ERROR expected identifier, found reserved identifier `_`
|
|
use _::*;
|
|
//~^ ERROR expected identifier, found reserved identifier `_`
|
|
|
|
fn main() {
|
|
use _::a;
|
|
//~^ ERROR expected identifier, found reserved identifier `_`
|
|
use _::*;
|
|
//~^ ERROR expected identifier, found reserved identifier `_`
|
|
}
|