]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/slice-const-param-mismatch.stderr
Rollup merge of #70990 - GuillaumeGomez:rustdoc-cleanup, r=ollie27
[rust.git] / src / test / ui / const-generics / slice-const-param-mismatch.stderr
1 warning: the feature `const_generics` is incomplete and may cause the compiler to crash
2   --> $DIR/slice-const-param-mismatch.rs:1:12
3    |
4 LL | #![feature(const_generics)]
5    |            ^^^^^^^^^^^^^^
6    |
7    = note: `#[warn(incomplete_features)]` on by default
8
9 error[E0308]: mismatched types
10   --> $DIR/slice-const-param-mismatch.rs:9:35
11    |
12 LL |     let _: ConstString<"Hello"> = ConstString::<"World">;
13    |            --------------------   ^^^^^^^^^^^^^^^^^^^^^^ expected `"Hello"`, found `"World"`
14    |            |
15    |            expected due to this
16    |
17    = note: expected struct `ConstString<"Hello">`
18               found struct `ConstString<"World">`
19
20 error[E0308]: mismatched types
21   --> $DIR/slice-const-param-mismatch.rs:11:33
22    |
23 LL |     let _: ConstString<"ℇ㇈↦"> = ConstString::<"ℇ㇈↥">;
24    |            -------------------   ^^^^^^^^^^^^^^^^^^^^^ expected `"ℇ㇈↦"`, found `"ℇ㇈↥"`
25    |            |
26    |            expected due to this
27    |
28    = note: expected struct `ConstString<"ℇ㇈↦">`
29               found struct `ConstString<"ℇ㇈↥">`
30
31 error[E0308]: mismatched types
32   --> $DIR/slice-const-param-mismatch.rs:13:33
33    |
34 LL |     let _: ConstBytes<b"AAA"> = ConstBytes::<b"BBB">;
35    |            ------------------   ^^^^^^^^^^^^^^^^^^^^ expected `b"AAA"`, found `b"BBB"`
36    |            |
37    |            expected due to this
38    |
39    = note: expected struct `ConstBytes<b"AAA">`
40               found struct `ConstBytes<b"BBB">`
41
42 error: aborting due to 3 previous errors; 1 warning emitted
43
44 For more information about this error, try `rustc --explain E0308`.