mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-01 00:36:54 +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`.
17 lines
553 B
Rust
17 lines
553 B
Rust
//@ revisions: ed2015 ed2021
|
|
//@[ed2015] edition: 2015
|
|
//@[ed2021] edition: 2021
|
|
pub use _::{a, b};
|
|
//~^ ERROR expected identifier, found reserved identifier `_`
|
|
pub use std::{a, _};
|
|
//~^ ERROR expected identifier, found reserved identifier `_`
|
|
//~| ERROR unresolved import `std::a`
|
|
pub use std::{b, _, c};
|
|
//~^ ERROR expected identifier, found reserved identifier `_`
|
|
//~| ERROR unresolved imports `std::b`, `std::c`
|
|
pub use std::{_, d};
|
|
//~^ ERROR expected identifier, found reserved identifier `_`
|
|
//~| ERROR unresolved import `std::d`
|
|
|
|
fn main() {}
|