]> git.lizzy.rs Git - rust.git/commitdiff
Fix test after rebase
authorvarkor <github@varkor.com>
Tue, 21 May 2019 09:14:44 +0000 (10:14 +0100)
committervarkor <github@varkor.com>
Tue, 28 May 2019 20:35:20 +0000 (21:35 +0100)
src/test/ui/const-generics/cannot-infer-type-for-const-param.rs
src/test/ui/const-generics/cannot-infer-type-for-const-param.stderr

index c3f5e360fe28084c73d7b0f8061f125a18966930..26496ec4a90b9d7f80d82cc7dac1547be37249c1 100644 (file)
@@ -8,4 +8,5 @@
 
 fn main() {
     let _ = Foo::<3>([1, 2, 3]); //~ ERROR type annotations needed
 
 fn main() {
     let _ = Foo::<3>([1, 2, 3]); //~ ERROR type annotations needed
+    //~^ ERROR mismatched types
 }
 }
index a0641bd2fdc96d1a56fca57c2f682ac0ffb7738e..1b5d9b173de14729ae85643ca9b9dbcfab221cea 100644 (file)
@@ -10,6 +10,16 @@ error[E0282]: type annotations needed
 LL |     let _ = Foo::<3>([1, 2, 3]);
    |                   ^ cannot infer type for `{integer}`
 
 LL |     let _ = Foo::<3>([1, 2, 3]);
    |                   ^ cannot infer type for `{integer}`
 
-error: aborting due to previous error
+error[E0308]: mismatched types
+  --> $DIR/cannot-infer-type-for-const-param.rs:10:22
+   |
+LL |     let _ = Foo::<3>([1, 2, 3]);
+   |                      ^^^^^^^^^ expected `Const { ty: usize, val: Unevaluated(DefId(0:18 ~ cannot_infer_type_for_const_param[317d]::main[0]::{{constant}}[0]), []) }`, found `Const { ty: usize, val: Scalar(Bits { size: 8, bits: 3 }) }`
+   |
+   = note: expected type `[u8; _]`
+              found type `[u8; 3]`
+
+error: aborting due to 2 previous errors
 
 
-For more information about this error, try `rustc --explain E0282`.
+Some errors have detailed explanations: E0282, E0308.
+For more information about an error, try `rustc --explain E0282`.