Qualify panic!
as core::panic!
in non-built-in core
macros
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.
This commit is contained in:
parent
a0d664bae6
commit
d37e1e186e
16 changed files with 461 additions and 483 deletions
|
@ -2,7 +2,6 @@
|
|||
// only-32bit too impatient for 2⁶⁴ items
|
||||
// compile-flags: -C debug_assertions=no -C opt-level=3
|
||||
|
||||
use std::panic;
|
||||
use std::usize::MAX;
|
||||
|
||||
fn main() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue