From cfa1f80cd92c2fb273598adbb77e51ddbd3aef7b Mon Sep 17 00:00:00 2001 From: varkor Date: Tue, 21 May 2019 10:14:44 +0100 Subject: [PATCH] Fix test after rebase --- .../cannot-infer-type-for-const-param.rs | 1 + .../cannot-infer-type-for-const-param.stderr | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/test/ui/const-generics/cannot-infer-type-for-const-param.rs b/src/test/ui/const-generics/cannot-infer-type-for-const-param.rs index c3f5e360fe2..26496ec4a90 100644 --- a/src/test/ui/const-generics/cannot-infer-type-for-const-param.rs +++ b/src/test/ui/const-generics/cannot-infer-type-for-const-param.rs @@ -8,4 +8,5 @@ struct Foo(pub [u8; NUM_BYTES]); fn main() { let _ = Foo::<3>([1, 2, 3]); //~ ERROR type annotations needed + //~^ ERROR mismatched types } diff --git a/src/test/ui/const-generics/cannot-infer-type-for-const-param.stderr b/src/test/ui/const-generics/cannot-infer-type-for-const-param.stderr index a0641bd2fdc..1b5d9b173de 100644 --- a/src/test/ui/const-generics/cannot-infer-type-for-const-param.stderr +++ b/src/test/ui/const-generics/cannot-infer-type-for-const-param.stderr @@ -10,6 +10,16 @@ error[E0282]: type annotations needed 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]` -For more information about this error, try `rustc --explain E0282`. +error: aborting due to 2 previous errors + +Some errors have detailed explanations: E0282, E0308. +For more information about an error, try `rustc --explain E0282`.