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