fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
1.4 KiB38 linesraw
1warning: the feature `const_generics` is incomplete and may cause the compiler to crash
2  --> $DIR/slice-const-param-mismatch.rs:1:12
3   |
4LL | #![feature(const_generics)]
5   |            ^^^^^^^^^^^^^^
6   |
7   = note: `#[warn(incomplete_features)]` on by default
8
9error[E0308]: mismatched types
10  --> $DIR/slice-const-param-mismatch.rs:9:35
11   |
12LL |     let _: ConstString<"Hello"> = ConstString::<"World">;
13   |                                   ^^^^^^^^^^^^^^^^^^^^^^ expected `"Hello"`, found `"World"`
14   |
15   = note: expected type `ConstString<"Hello">`
16              found type `ConstString<"World">`
17
18error[E0308]: mismatched types
19  --> $DIR/slice-const-param-mismatch.rs:11:33
20   |
21LL |     let _: ConstString<"ℇ㇈↦"> = ConstString::<"ℇ㇈↥">;
22   |                                  ^^^^^^^^^^^^^^^^^^^^^ expected `"ℇ㇈↦"`, found `"ℇ㇈↥"`
23   |
24   = note: expected type `ConstString<"ℇ㇈↦">`
25              found type `ConstString<"ℇ㇈↥">`
26
27error[E0308]: mismatched types
28  --> $DIR/slice-const-param-mismatch.rs:13:33
29   |
30LL |     let _: ConstBytes<b"AAA"> = ConstBytes::<b"BBB">;
31   |                                 ^^^^^^^^^^^^^^^^^^^^ expected `b"AAA"`, found `b"BBB"`
32   |
33   = note: expected type `ConstBytes<b"AAA">`
34              found type `ConstBytes<b"BBB">`
35
36error: aborting due to 3 previous errors
37
38For more information about this error, try `rustc --explain E0308`.