about summary refs log tree commit diff
path: root/library/alloc
diff options
context:
space:
mode:
authorPavel Grigorenko <GrigorenkoPV@ya.ru>2024-10-16 22:19:56 +0300
committerPavel Grigorenko <GrigorenkoPV@ya.ru>2024-10-28 14:16:05 +0300
commitc69894eaec2a29f9db023cbfff63e48266de4ee5 (patch)
tree503a18333c8b8f4a1d968c28154f4c3942df67db /library/alloc
parent81d6652e741f091f4ee0b7a660120d204e0417b8 (diff)
downloadrust-c69894eaec2a29f9db023cbfff63e48266de4ee5.tar.gz
rust-c69894eaec2a29f9db023cbfff63e48266de4ee5.zip
New lint: `dangling_pointers_from_temporaries`
Diffstat (limited to 'library/alloc')
-rw-r--r--library/alloc/tests/boxed.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/alloc/tests/boxed.rs b/library/alloc/tests/boxed.rs
index bfc31a626fa..544f60da587 100644
--- a/library/alloc/tests/boxed.rs
+++ b/library/alloc/tests/boxed.rs
@@ -4,6 +4,7 @@ use core::mem::MaybeUninit;
 use core::ptr::NonNull;
 
 #[test]
+#[cfg_attr(not(bootstrap), expect(dangling_pointers_from_temporaries))]
 fn uninitialized_zero_size_box() {
     assert_eq!(
         &*Box::<()>::new_uninit() as *const _,