d37e1e186e
Otherwise code like this #![no_implicit_prelude] fn main() { ::std::todo!(); ::std::unimplemented!(); } will fail to compile, which is unfortunate and presumably unintended. This changes many invocations of `panic!` in a `macro_rules!` definition to invocations of `$crate::panic!`, which makes the invocations hygienic. Note that this does not make the built-in macro `assert!` hygienic.
14 lines
231 B
Rust
14 lines
231 B
Rust
// build-pass
|
|
|
|
#![no_implicit_prelude]
|
|
|
|
fn main() {
|
|
::std::panic!();
|
|
::std::todo!();
|
|
::std::unimplemented!();
|
|
::std::assert_eq!(0, 0);
|
|
::std::assert_ne!(0, 1);
|
|
::std::dbg!(123);
|
|
::std::unreachable!();
|
|
}
|