diff options
| author | varkor <github@varkor.com> | 2019-05-21 10:14:44 +0100 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2019-05-28 21:35:20 +0100 |
| commit | cfa1f80cd92c2fb273598adbb77e51ddbd3aef7b (patch) | |
| tree | d1a16bf88a76c7467342763abdea911019679ebb /src | |
| parent | 57ff5899d22fd0b898784b3b55b1dacad27664c6 (diff) | |
| download | rust-cfa1f80cd92c2fb273598adbb77e51ddbd3aef7b.tar.gz rust-cfa1f80cd92c2fb273598adbb77e51ddbd3aef7b.zip | |
Fix test after rebase
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/const-generics/cannot-infer-type-for-const-param.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/const-generics/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<const NUM_BYTES: usize>(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]` + +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`. |
