about summary refs log tree commit diff
path: root/compiler/rustc_index/src
diff options
context:
space:
mode:
authorLukas Markeffsky <@>2024-09-16 21:04:20 +0200
committerLukas Markeffsky <@>2024-09-17 00:06:56 +0200
commit3db930a463e32daa5052065cedf2d52472b67076 (patch)
tree91a005d0779a1f0989c61af432b99cf79de7ba98 /compiler/rustc_index/src
parent697450151c0b674eae406a4d1e0854e9386ac7ea (diff)
downloadrust-3db930a463e32daa5052065cedf2d52472b67076.tar.gz
rust-3db930a463e32daa5052065cedf2d52472b67076.zip
assert that unexpectedly unsized fields are sized in the param env
Diffstat (limited to 'compiler/rustc_index/src')
-rw-r--r--compiler/rustc_index/src/slice.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_index/src/slice.rs b/compiler/rustc_index/src/slice.rs
index 3205ca3f40b..956d32c9a69 100644
--- a/compiler/rustc_index/src/slice.rs
+++ b/compiler/rustc_index/src/slice.rs
@@ -20,7 +20,7 @@ pub struct IndexSlice<I: Idx, T> {
 
 impl<I: Idx, T> IndexSlice<I, T> {
     #[inline]
-    pub const fn empty() -> &'static Self {
+    pub const fn empty<'a>() -> &'a Self {
         Self::from_raw(&[])
     }