]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/const-generics/const-param-elided-lifetime.rs
Auto merge of #79342 - CDirkx:ipaddr-const, r=oli-obk
[rust.git] / src / test / ui / const-generics / const-param-elided-lifetime.rs
index 814b71d4b741f8e5fcf8359223c70773d51d8956..633e876f1d7dd29c054eed348a3c317a848fc591 100644 (file)
 
 struct A<const N: &u8>;
 //~^ ERROR `&` without an explicit lifetime name cannot be used here
-//[min]~^^ ERROR using `&'static u8` as const generic parameters is forbidden
+//[min]~^^ ERROR `&'static u8` is forbidden
 trait B {}
 
 impl<const N: &u8> A<N> {
 //~^ ERROR `&` without an explicit lifetime name cannot be used here
-//[min]~^^ ERROR using `&'static u8` as const generic parameters is forbidden
+//[min]~^^ ERROR `&'static u8` is forbidden
     fn foo<const M: &u8>(&self) {}
     //~^ ERROR `&` without an explicit lifetime name cannot be used here
-    //[min]~^^ ERROR using `&'static u8` as const generic parameters is forbidden
+    //[min]~^^ ERROR `&'static u8` is forbidden
 }
 
 impl<const N: &u8> B for A<N> {}
 //~^ ERROR `&` without an explicit lifetime name cannot be used here
-//[min]~^^ ERROR using `&'static u8` as const generic parameters is forbidden
+//[min]~^^ ERROR `&'static u8` is forbidden
 
 fn bar<const N: &u8>() {}
 //~^ ERROR `&` without an explicit lifetime name cannot be used here
-//[min]~^^ ERROR using `&'static u8` as const generic parameters is forbidden
+//[min]~^^ ERROR `&'static u8` is forbidden
 
 fn main() {}