]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/const-generics/min_const_generics/macro-fail.rs
New upstream version 1.50.0+dfsg1
[rustc.git] / src / test / ui / const-generics / min_const_generics / macro-fail.rs
index 7f16f2f33de1a5875d022e68fd38fef2d602aa40..1bd0c46f55e2ddf5e9835d33d66017ccac357ecb 100644 (file)
@@ -14,11 +14,9 @@ trait Marker<const N: usize> {}
 impl<const N: usize> Marker<N> for Example<N> {}
 
 fn make_marker() -> impl Marker<gimme_a_const!(marker)> {
-  //~^ ERROR wrong number of const
-  //~| ERROR wrong number of type
+  //~^ ERROR: type provided when a constant was expected
   Example::<gimme_a_const!(marker)>
-  //~^ ERROR wrong number of const
-  //~| ERROR wrong number of type
+  //~^ ERROR: type provided when a constant was expected
 }
 
 fn from_marker(_: impl Marker<{
@@ -38,11 +36,9 @@ fn main() {
   }>;
 
   let _fail = Example::<external_macro!()>;
-  //~^ ERROR wrong number of const
-  //~| ERROR wrong number of type
+  //~^ ERROR: type provided when a constant was expected
 
   let _fail = Example::<gimme_a_const!()>;
-  //~^ ERROR wrong number of const
-  //~| ERROR wrong number of type
+  //~^ ERROR: type provided when a constant was expected
   //~| ERROR unexpected end of macro invocation
 }