From cf94bdc0742c13e2a0cac864c478b8626b266e1b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:11:38 +0200 Subject: Merging upstream version 1.66.0+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/lint/lint-strict-provenance-lossy-casts.stderr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/test/ui/lint/lint-strict-provenance-lossy-casts.stderr') 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(); -- cgit v1.2.3