]> git.proxmox.com Git - rustc.git/blame - src/test/ui/const-generics/types-mismatch-const-args.stderr
New upstream version 1.47.0+dfsg1
[rustc.git] / src / test / ui / const-generics / types-mismatch-const-args.stderr
CommitLineData
f9f354fc 1warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
e74abb32
XL
2 --> $DIR/types-mismatch-const-args.rs:1:12
3 |
4LL | #![feature(const_generics)]
5 | ^^^^^^^^^^^^^^
6 |
7 = note: `#[warn(incomplete_features)]` on by default
f9f354fc 8 = note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
e74abb32
XL
9
10error[E0308]: mismatched types
11 --> $DIR/types-mismatch-const-args.rs:13:41
12 |
13LL | let _: A<'a, u32, {2u32}, {3u32}> = A::<'a, u32, {4u32}, {3u32}> { data: PhantomData };
f035d41b 14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `2_u32`, found `4_u32`
e74abb32 15 |
f035d41b
XL
16 = note: expected type `2_u32`
17 found type `4_u32`
e74abb32
XL
18
19error[E0308]: mismatched types
20 --> $DIR/types-mismatch-const-args.rs:15:41
21 |
22LL | let _: A<'a, u16, {2u32}, {3u32}> = A::<'b, u32, {2u32}, {3u32}> { data: PhantomData };
60c5eb7d
XL
23 | -------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u16`, found `u32`
24 | |
25 | expected due to this
e74abb32 26 |
f9f354fc
XL
27 = note: expected struct `A<'a, u16, {2u32}, {3u32}>`
28 found struct `A<'b, u32, {2u32}, {3u32}>`
e74abb32 29
ba9703b0 30error: aborting due to 2 previous errors; 1 warning emitted
e74abb32
XL
31
32For more information about this error, try `rustc --explain E0308`.