]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/slice-const-param-mismatch.stderr
Rollup merge of #75201 - Hirrolot:hirrolot/fix-clippy-warnings, r=varkor
[rust.git] / src / test / ui / const-generics / slice-const-param-mismatch.stderr
1 warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
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    = note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
9
10 error[E0308]: mismatched types
11   --> $DIR/slice-const-param-mismatch.rs:9:35
12    |
13 LL |     let _: ConstString<"Hello"> = ConstString::<"World">;
14    |            --------------------   ^^^^^^^^^^^^^^^^^^^^^^ expected `"Hello"`, found `"World"`
15    |            |
16    |            expected due to this
17    |
18    = note: expected struct `ConstString<"Hello">`
19               found struct `ConstString<"World">`
20
21 error[E0308]: mismatched types
22   --> $DIR/slice-const-param-mismatch.rs:11:33
23    |
24 LL |     let _: ConstString<"ℇ㇈↦"> = ConstString::<"ℇ㇈↥">;
25    |            -------------------   ^^^^^^^^^^^^^^^^^^^^^ expected `"ℇ㇈↦"`, found `"ℇ㇈↥"`
26    |            |
27    |            expected due to this
28    |
29    = note: expected struct `ConstString<"ℇ㇈↦">`
30               found struct `ConstString<"ℇ㇈↥">`
31
32 error[E0308]: mismatched types
33   --> $DIR/slice-const-param-mismatch.rs:13:33
34    |
35 LL |     let _: ConstBytes<b"AAA"> = ConstBytes::<b"BBB">;
36    |            ------------------   ^^^^^^^^^^^^^^^^^^^^ expected `b"AAA"`, found `b"BBB"`
37    |            |
38    |            expected due to this
39    |
40    = note: expected struct `ConstBytes<b"AAA">`
41               found struct `ConstBytes<b"BBB">`
42
43 error: aborting due to 3 previous errors; 1 warning emitted
44
45 For more information about this error, try `rustc --explain E0308`.