diff options
Diffstat (limited to 'src/test/ui/lint/lint-strict-provenance-lossy-casts.stderr')
-rw-r--r-- | src/test/ui/lint/lint-strict-provenance-lossy-casts.stderr | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/ui/lint/lint-strict-provenance-lossy-casts.stderr b/src/test/ui/lint/lint-strict-provenance-lossy-casts.stderr index 05178b34b..aa151fe2d 100644 --- a/src/test/ui/lint/lint-strict-provenance-lossy-casts.stderr +++ b/src/test/ui/lint/lint-strict-provenance-lossy-casts.stderr @@ -4,12 +4,12 @@ error: under strict provenance it is considered bad style to cast pointer `*cons LL | let addr: usize = &x as *const u8 as usize; | ^^^^^^^^^^^^^^^^^^^^^^^^ | + = help: if you can't comply with strict provenance and need to expose the pointer provenance you can use `.expose_addr()` instead note: the lint level is defined here --> $DIR/lint-strict-provenance-lossy-casts.rs:2:9 | LL | #![deny(lossy_provenance_casts)] | ^^^^^^^^^^^^^^^^^^^^^^ - = help: if you can't comply with strict provenance and need to expose the pointer provenance you can use `.expose_addr()` instead help: use `.addr()` to obtain the address of a pointer | LL | let addr: usize = (&x as *const u8).addr(); |