]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/slice-const-param-mismatch.full.stderr
Move generic error message to separate branches
[rust.git] / src / test / ui / const-generics / slice-const-param-mismatch.full.stderr
1 error[E0308]: mismatched types
2   --> $DIR/slice-const-param-mismatch.rs:14:35
3    |
4 LL |     let _: ConstString<"Hello"> = ConstString::<"World">;
5    |            --------------------   ^^^^^^^^^^^^^^^^^^^^^^ expected `"Hello"`, found `"World"`
6    |            |
7    |            expected due to this
8    |
9    = note: expected struct `ConstString<"Hello">`
10               found struct `ConstString<"World">`
11
12 error[E0308]: mismatched types
13   --> $DIR/slice-const-param-mismatch.rs:16:33
14    |
15 LL |     let _: ConstString<"ℇ㇈↦"> = ConstString::<"ℇ㇈↥">;
16    |            -------------------   ^^^^^^^^^^^^^^^^^^^^^ expected `"ℇ㇈↦"`, found `"ℇ㇈↥"`
17    |            |
18    |            expected due to this
19    |
20    = note: expected struct `ConstString<"ℇ㇈↦">`
21               found struct `ConstString<"ℇ㇈↥">`
22
23 error[E0308]: mismatched types
24   --> $DIR/slice-const-param-mismatch.rs:18:33
25    |
26 LL |     let _: ConstBytes<b"AAA"> = ConstBytes::<b"BBB">;
27    |            ------------------   ^^^^^^^^^^^^^^^^^^^^ expected `b"AAA"`, found `b"BBB"`
28    |            |
29    |            expected due to this
30    |
31    = note: expected struct `ConstBytes<b"AAA">`
32               found struct `ConstBytes<b"BBB">`
33
34 error: aborting due to 3 previous errors
35
36 For more information about this error, try `rustc --explain E0308`.