mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-28 13:46:03 +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`.
21 lines
295 B
Rust
21 lines
295 B
Rust
//@ revisions: ed2015 ed2021
|
|
//@[ed2015] edition: 2015
|
|
//@[ed2021] edition: 2021
|
|
|
|
// issue#128813
|
|
|
|
extern crate core as _;
|
|
|
|
macro_rules! m {
|
|
() => {
|
|
extern crate std as _;
|
|
};
|
|
}
|
|
|
|
m!();
|
|
|
|
fn main() {
|
|
use ::_;
|
|
//~^ ERROR: expected identifier, found reserved identifier `_`
|
|
}
|