blob: c1a327640398576ae42c8048cc04a6d06fd6ae89 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// edition:2018
// revisions: mir thir
// [thir]compile-flags: -Z thir-unsafeck
#![deny(unused_unsafe)]
fn main() {
let _ = async {
unsafe { async {}.await; } //~ ERROR unnecessary `unsafe`
};
// `format_args!` expands with a compiler-generated unsafe block
unsafe { println!("foo"); } //~ ERROR unnecessary `unsafe`
}
|