mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-17 14:46:33 +00:00
Use `splice` to avoid shifting the other items twice. Put `extern crate std;` first so it's already resolved when we resolve `::std::prelude::rust_20XX`.
20 lines
324 B
Plaintext
20 lines
324 B
Plaintext
#[attr = MacroUse {arguments: UseAll}]
|
|
extern crate std;
|
|
#[prelude_import]
|
|
use ::std::prelude::rust_2015::*;
|
|
//@ compile-flags: -Zunpretty=hir
|
|
//@ check-pass
|
|
//@ edition: 2015
|
|
|
|
|
|
|
|
fn foo(x:
|
|
Option<u32>) {
|
|
let Some(_) = x else
|
|
{
|
|
|
|
{ ::std::rt::begin_panic("explicit panic") }
|
|
};
|
|
}
|
|
fn main() { }
|