fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0308]: mismatched types 2 --> $DIR/brackets-to-braces-single-element.rs:1:24 3 | 4LL | const A: [&str; 1] = { "hello" }; 5 | ^^^^^^^ expected `[&str; 1]`, found `&str` 6 | 7help: to create an array, use square brackets instead of curly braces 8 | 9LL | const A: [&str; 1] = [ "hello" ]; 10 | ~ ~ 11 12error[E0308]: mismatched types 13 --> $DIR/brackets-to-braces-single-element.rs:4:19 14 | 15LL | const B: &[u32] = &{ 1 }; 16 | ^^^^^^ expected `&[u32]`, found `&{integer}` 17 | 18 = note: expected reference `&'static [u32]` 19 found reference `&{integer}` 20help: to create an array, use square brackets instead of curly braces 21 | 22LL | const B: &[u32] = &[ 1 ]; 23 | ~ ~ 24 25error[E0308]: mismatched types 26 --> $DIR/brackets-to-braces-single-element.rs:7:27 27 | 28LL | const C: &&[u32; 1] = &&{ 1 }; 29 | ^ expected `[u32; 1]`, found integer 30 | 31help: to create an array, use square brackets instead of curly braces 32 | 33LL | const C: &&[u32; 1] = &&[ 1 ]; 34 | ~ ~ 35 36error: aborting due to 3 previous errors 37 38For more information about this error, try `rustc --explain E0308`.