From 9c4cf8d9d0da26b74782bdb29443d50f34f46ed0 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 --- .../clippy/tests/ui/borrow_interior_mutable_const/others.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/clippy/tests/ui/borrow_interior_mutable_const/others.rs b/src/tools/clippy/tests/ui/borrow_interior_mutable_const/others.rs index eefeb1decb6..7c57864245a 100644 --- a/src/tools/clippy/tests/ui/borrow_interior_mutable_const/others.rs +++ b/src/tools/clippy/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 } } }