Closed
Description
I tried this code:
#![no_implicit_prelude]
fn main() {
::std::todo!();
::std::unimplemented!();
}
I expected to see this happen:
Successful compilation
Instead, this happened:
Compiling playground v0.0.1 (/playground)
error: cannot find macro `panic` in this scope
--> src/main.rs:4:5
|
4 | ::std::todo!();
| ^^^^^^^^^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: cannot find macro `panic` in this scope
--> src/main.rs:5:5
|
5 | ::std::unimplemented!();
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 2 previous errors
error: could not compile `playground`.
To learn more, run the command again with --verbose.
Meta
Playground Stable Version:rustc --version --verbose
1.47.0
The macros should be using $crate::panic!
, instead of panic!
.