struct_span_err!(
self.tcx.sess, span, E0133,
"{} requires unsafe function or block", description)
- .span_label(span, &format!("unsafe call requires unsafe function or block"))
+ .span_label(span, &description)
.emit();
}
UnsafeBlock(block_id) => {
fn main() {
f();
//~^ ERROR E0133
- //~| NOTE unsafe call requires unsafe function or block
+ //~| NOTE call to unsafe function
}
fn main() {
(&ptr::write)(1 as *mut _, 42);
//~^ ERROR E0133
- //~| NOTE unsafe call requires unsafe function or block
+ //~| NOTE call to unsafe function
}
// Unsafe actions are not made legal by taking place in an unsafe trait:
*self += 1;
//~^ ERROR E0133
- //~| NOTE unsafe call requires unsafe function or block
+ //~| NOTE dereference of raw pointer
}
}
const VAL: u32 = dummy(0xFFFF);
//~^ ERROR E0133
-//~| NOTE unsafe call requires unsafe function or block
+//~| NOTE call to unsafe function
fn main() {
assert_eq!(VAL, 0xFFFF0000);