From 24444945ec96dbe0dd593ed5bda57d22464a7106 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Fri, 16 Dec 2022 03:06:21 +0000 Subject: [PATCH] Make Clippy test no longer unsound --- tests/ui/borrow_interior_mutable_const/others.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ui/borrow_interior_mutable_const/others.rs b/tests/ui/borrow_interior_mutable_const/others.rs index eefeb1decb6..7c57864245a 100644 --- a/tests/ui/borrow_interior_mutable_const/others.rs +++ b/tests/ui/borrow_interior_mutable_const/others.rs @@ -42,7 +42,7 @@ impl StaticRef { impl std::ops::Deref for StaticRef { type Target = T; - fn deref(&self) -> &'static T { + fn deref(&self) -> &T { unsafe { &*self.ptr } } }