fix warning text

This commit is contained in:
Ralf Jung 2022-06-27 20:04:46 -04:00
parent d9e7a3ae82
commit 67e89b53e2
3 changed files with 6 additions and 6 deletions

View File

@ -451,13 +451,13 @@ fn process_diagnostics(&self, info: TopFrameInfo<'tcx>) {
format!("{op} was made to return an error due to isolation"),
ProgressReport =>
format!("progress report: current operation being executed is here"),
Int2Ptr => format!("pointer-to-integer cast"),
Int2Ptr => format!("integer-to-pointer cast"),
};
let (title, diag_level) = match e {
RejectedIsolatedOp(_) =>
("operation rejected by isolation", DiagLevel::Warning),
Int2Ptr => ("pointer-to-integer cast", DiagLevel::Warning),
Int2Ptr => ("integer-to-pointer cast", DiagLevel::Warning),
CreatedPointerTag(..)
| PoppedPointerTag(..)
| CreatedCallId(..)

View File

@ -1,8 +1,8 @@
warning: pointer-to-integer cast
warning: integer-to-pointer cast
--> $DIR/box.rs:LL:CC
|
LL | let r2 = ((r as usize) + 0) as *mut i32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pointer-to-integer cast
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ integer-to-pointer cast
|
= help: this program is using integer-to-pointer casts or (equivalently) `from_exposed_addr`,
= help: which means that Miri might miss pointer bugs in this program

View File

@ -1,8 +1,8 @@
warning: pointer-to-integer cast
warning: integer-to-pointer cast
--> $DIR/extern_types.rs:LL:CC
|
LL | let x: &Foo = unsafe { &*(16 as *const Foo) };
| ^^^^^^^^^^^^^^^^^^ pointer-to-integer cast
| ^^^^^^^^^^^^^^^^^^ integer-to-pointer cast
|
= help: this program is using integer-to-pointer casts or (equivalently) `from_exposed_addr`,
= help: which means that Miri might miss pointer bugs in this program