diff options
| author | Michael Goulet <michael@errs.io> | 2022-12-16 03:06:21 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-12-19 18:16:22 +0000 |
| commit | 9c4cf8d9d0da26b74782bdb29443d50f34f46ed0 (patch) | |
| tree | a8f8f02e75d2c47d664c84f33ebc592564fca539 | |
| parent | 96154d7fa7ced3184b69645ed8b6e7c210ca15b4 (diff) | |
| download | rust-9c4cf8d9d0da26b74782bdb29443d50f34f46ed0.tar.gz rust-9c4cf8d9d0da26b74782bdb29443d50f34f46ed0.zip | |
Make Clippy test no longer unsound
| -rw-r--r-- | src/tools/clippy/tests/ui/borrow_interior_mutable_const/others.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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<T> StaticRef<T> { impl<T> std::ops::Deref for StaticRef<T> { type Target = T; - fn deref(&self) -> &'static T { + fn deref(&self) -> &T { unsafe { &*self.ptr } } } |
