diff options
| author | bors <bors@rust-lang.org> | 2020-10-27 09:25:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-10-27 09:25:54 +0000 |
| commit | 20b1e05a8d0e1773dc840a3286aa37916e87d84b (patch) | |
| tree | eab6e728ec3e7f34021c2fb4b4ca69998392711a /src/test/ui | |
| parent | 824f900a96d752da2d882863c65f9736e5f2b347 (diff) | |
| parent | ac1454001cee3f344a1104fd0cf4012b93443b0b (diff) | |
Auto merge of #77502 - varkor:const-generics-suggest-enclosing-braces, r=petrochenkov
Suggest that expressions that look like const generic arguments should be enclosed in brackets I pulled out the changes for const expressions from https://github.com/rust-lang/rust/pull/71592 (without the trait object diagnostic changes) and made some small changes; the implementation is `@estebank's.` We're also going to want to make some changes separately to account for trait objects (they result in poor diagnostics, as is evident from one of the test cases here), such as an adaption of https://github.com/rust-lang/rust/pull/72273. Fixes https://github.com/rust-lang/rust/issues/70753. r? `@petrochenkov`
Diffstat (limited to 'src/test/ui')
12 files changed, 575 insertions, 12 deletions
diff --git a/src/test/ui/const-generics/closing-args-token.full.stderr b/src/test/ui/const-generics/closing-args-token.full.stderr new file mode 100644 index 00000000000..1c3ddd345a5 --- /dev/null +++ b/src/test/ui/const-generics/closing-args-token.full.stderr @@ -0,0 +1,52 @@ +error: expressions must be enclosed in braces to be used as const generic arguments + --> $DIR/closing-args-token.rs:11:9 + | +LL | S::<5 + 2 >> 7>; + | ^^^^^ + | +help: enclose the `const` expression in braces + | +LL | S::<{ 5 + 2 } >> 7>; + | ^ ^ + +error: comparison operators cannot be chained + --> $DIR/closing-args-token.rs:11:16 + | +LL | S::<5 + 2 >> 7>; + | ^ ^ + | +help: split the comparison into two + | +LL | S::<5 + 2 >> 7 && 7>; + | ^^^^ + +error: comparison operators cannot be chained + --> $DIR/closing-args-token.rs:17:20 + | +LL | S::<{ 5 + 2 } >> 7>; + | ^ ^ + | +help: split the comparison into two + | +LL | S::<{ 5 + 2 } >> 7 && 7>; + | ^^^^ + +error: expected expression, found `;` + --> $DIR/closing-args-token.rs:22:16 + | +LL | T::<0 >= 3>; + | ^ expected expression + +error: comparison operators cannot be chained + --> $DIR/closing-args-token.rs:28:12 + | +LL | T::<x >>= 2 > 0>; + | ^^ ^ + | +help: split the comparison into two + | +LL | T::<x >>= 2 && 2 > 0>; + | ^^^^ + +error: aborting due to 5 previous errors + diff --git a/src/test/ui/const-generics/closing-args-token.min.stderr b/src/test/ui/const-generics/closing-args-token.min.stderr new file mode 100644 index 00000000000..1c3ddd345a5 --- /dev/null +++ b/src/test/ui/const-generics/closing-args-token.min.stderr @@ -0,0 +1,52 @@ +error: expressions must be enclosed in braces to be used as const generic arguments + --> $DIR/closing-args-token.rs:11:9 + | +LL | S::<5 + 2 >> 7>; + | ^^^^^ + | +help: enclose the `const` expression in braces + | +LL | S::<{ 5 + 2 } >> 7>; + | ^ ^ + +error: comparison operators cannot be chained + --> $DIR/closing-args-token.rs:11:16 + | +LL | S::<5 + 2 >> 7>; + | ^ ^ + | +help: split the comparison into two + | +LL | S::<5 + 2 >> 7 && 7>; + | ^^^^ + +error: comparison operators cannot be chained + --> $DIR/closing-args-token.rs:17:20 + | +LL | S::<{ 5 + 2 } >> 7>; + | ^ ^ + | +help: split the comparison into two + | +LL | S::<{ 5 + 2 } >> 7 && 7>; + | ^^^^ + +error: expected expression, found `;` + --> $DIR/closing-args-token.rs:22:16 + | +LL | T::<0 >= 3>; + | ^ expected expression + +error: comparison operators cannot be chained + --> $DIR/closing-args-token.rs:28:12 + | +LL | T::<x >>= 2 > 0>; + | ^^ ^ + | +help: split the comparison into two + | +LL | T::<x >>= 2 && 2 > 0>; + | ^^^^ + +error: aborting due to 5 previous errors + diff --git a/src/test/ui/const-generics/closing-args-token.rs b/src/test/ui/const-generics/closing-args-token.rs new file mode 100644 index 00000000000..8699637c54e --- /dev/null +++ b/src/test/ui/const-generics/closing-args-token.rs @@ -0,0 +1,32 @@ +// revisions: full min + +#![cfg_attr(full, feature(const_generics))] +#![cfg_attr(full, allow(incomplete_features))] +#![cfg_attr(min, feature(min_const_generics))] + +struct S<const X: u32>; +struct T<const X: bool>; + +fn bad_args_1() { + S::<5 + 2 >> 7>; + //~^ ERROR expressions must be enclosed in braces to be used as const generic arguments + //~| ERROR comparison operators cannot be chained +} + +fn bad_args_2() { + S::<{ 5 + 2 } >> 7>; + //~^ ERROR comparison operators cannot be chained +} + +fn bad_args_3() { + T::<0 >= 3>; + //~^ ERROR expected expression, found `;` +} + +fn bad_args_4() { + let mut x = 0; + T::<x >>= 2 > 0>; + //~^ ERROR comparison operators cannot be chained +} + +fn main() {} diff --git a/src/test/ui/const-generics/const-expression-parameter.full.stderr b/src/test/ui/const-generics/const-expression-parameter.full.stderr index 496af9c6e02..0615a4c206d 100644 --- a/src/test/ui/const-generics/const-expression-parameter.full.stderr +++ b/src/test/ui/const-generics/const-expression-parameter.full.stderr @@ -1,8 +1,13 @@ -error: expected one of `,` or `>`, found `+` - --> $DIR/const-expression-parameter.rs:16:22 +error: expressions must be enclosed in braces to be used as const generic arguments + --> $DIR/const-expression-parameter.rs:16:20 | LL | i32_identity::<1 + 2>(); - | ^ expected one of `,` or `>` + | ^^^^^ + | +help: enclose the `const` expression in braces + | +LL | i32_identity::<{ 1 + 2 }>(); + | ^ ^ error: aborting due to previous error diff --git a/src/test/ui/const-generics/const-expression-parameter.min.stderr b/src/test/ui/const-generics/const-expression-parameter.min.stderr index 496af9c6e02..0615a4c206d 100644 --- a/src/test/ui/const-generics/const-expression-parameter.min.stderr +++ b/src/test/ui/const-generics/const-expression-parameter.min.stderr @@ -1,8 +1,13 @@ -error: expected one of `,` or `>`, found `+` - --> $DIR/const-expression-parameter.rs:16:22 +error: expressions must be enclosed in braces to be used as const generic arguments + --> $DIR/const-expression-parameter.rs:16:20 | LL | i32_identity::<1 + 2>(); - | ^ expected one of `,` or `>` + | ^^^^^ + | +help: enclose the `const` expression in braces + | +LL | i32_identity::<{ 1 + 2 }>(); + | ^ ^ error: aborting due to previous error diff --git a/src/test/ui/const-generics/const-expression-parameter.rs b/src/test/ui/const-generics/const-expression-parameter.rs index 7a1eaf9f939..3ef7c8b32e0 100644 --- a/src/test/ui/const-generics/const-expression-parameter.rs +++ b/src/test/ui/const-generics/const-expression-parameter.rs @@ -13,7 +13,7 @@ fn foo_a() { } fn foo_b() { - i32_identity::<1 + 2>(); //~ ERROR expected one of `,` or `>`, found `+` + i32_identity::<1 + 2>(); //~ ERROR expressions must be enclosed in braces } fn foo_c() { diff --git a/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces-without-turbofish.rs b/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces-without-turbofish.rs new file mode 100644 index 00000000000..b9afd226430 --- /dev/null +++ b/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces-without-turbofish.rs @@ -0,0 +1,49 @@ +#![feature(min_const_generics)] + +fn foo<const C: usize>() {} + +const BAR: usize = 42; + +fn a() { + foo<BAR + 3>(); //~ ERROR comparison operators cannot be chained +} +fn b() { + foo<BAR + BAR>(); //~ ERROR comparison operators cannot be chained +} +fn c() { + foo<3 + 3>(); //~ ERROR comparison operators cannot be chained +} +fn d() { + foo<BAR - 3>(); //~ ERROR comparison operators cannot be chained +} +fn e() { + foo<BAR - BAR>(); //~ ERROR comparison operators cannot be chained +} +fn f() { + foo<100 - BAR>(); //~ ERROR comparison operators cannot be chained +} +fn g() { + foo<bar<i32>()>(); //~ ERROR comparison operators cannot be chained + //~^ ERROR expected one of `;` or `}`, found `>` +} +fn h() { + foo<bar::<i32>()>(); //~ ERROR comparison operators cannot be chained +} +fn i() { + foo<bar::<i32>() + BAR>(); //~ ERROR comparison operators cannot be chained +} +fn j() { + foo<bar::<i32>() - BAR>(); //~ ERROR comparison operators cannot be chained +} +fn k() { + foo<BAR - bar::<i32>()>(); //~ ERROR comparison operators cannot be chained +} +fn l() { + foo<BAR - bar::<i32>()>(); //~ ERROR comparison operators cannot be chained +} + +const fn bar<const C: usize>() -> usize { + C +} + +fn main() {} diff --git a/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces-without-turbofish.stderr b/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces-without-turbofish.stderr new file mode 100644 index 00000000000..103a295fced --- /dev/null +++ b/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces-without-turbofish.stderr @@ -0,0 +1,140 @@ +error: comparison operators cannot be chained + --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:8:8 + | +LL | foo<BAR + 3>(); + | ^ ^ + | +help: use `::<...>` instead of `<...>` to specify type arguments + | +LL | foo::<BAR + 3>(); + | ^^ + +error: comparison operators cannot be chained + --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:11:8 + | +LL | foo<BAR + BAR>(); + | ^ ^ + | +help: use `::<...>` instead of `<...>` to specify type arguments + | +LL | foo::<BAR + BAR>(); + | ^^ + +error: comparison operators cannot be chained + --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:14:8 + | +LL | foo<3 + 3>(); + | ^ ^ + | +help: use `::<...>` instead of `<...>` to specify type arguments + | +LL | foo::<3 + 3>(); + | ^^ + +error: comparison operators cannot be chained + --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:17:8 + | +LL | foo<BAR - 3>(); + | ^ ^ + | +help: use `::<...>` instead of `<...>` to specify type arguments + | +LL | foo::<BAR - 3>(); + | ^^ + +error: comparison operators cannot be chained + --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:20:8 + | +LL | foo<BAR - BAR>(); + | ^ ^ + | +help: use `::<...>` instead of `<...>` to specify type arguments + | +LL | foo::<BAR - BAR>(); + | ^^ + +error: comparison operators cannot be chained + --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:23:8 + | +LL | foo<100 - BAR>(); + | ^ ^ + | +help: use `::<...>` instead of `<...>` to specify type arguments + | +LL | foo::<100 - BAR>(); + | ^^ + +error: comparison operators cannot be chained + --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:26:8 + | +LL | foo<bar<i32>()>(); + | ^ ^ + | +help: use `::<...>` instead of `<...>` to specify type arguments + | +LL | foo::<bar<i32>()>(); + | ^^ + +error: expected one of `;` or `}`, found `>` + --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:26:19 + | +LL | foo<bar<i32>()>(); + | ^ expected one of `;` or `}` + +error: comparison operators cannot be chained + --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:30:8 + | +LL | foo<bar::<i32>()>(); + | ^ ^ + | +help: use `::<...>` instead of `<...>` to specify type arguments + | +LL | foo::<bar::<i32>()>(); + | ^^ + +error: comparison operators cannot be chained + --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:33:8 + | +LL | foo<bar::<i32>() + BAR>(); + | ^ ^ + | +help: use `::<...>` instead of `<...>` to specify type arguments + | +LL | foo::<bar::<i32>() + BAR>(); + | ^^ + +error: comparison operators cannot be chained + --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:36:8 + | +LL | foo<bar::<i32>() - BAR>(); + | ^ ^ + | +help: use `::<...>` instead of `<...>` to specify type arguments + | +LL | foo::<bar::<i32>() - BAR>(); + | ^^ + +error: comparison operators cannot be chained + --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:39:8 + | +LL | foo<BAR - bar::<i32>()>(); + | ^ ^ + | +help: use `::<...>` instead of `<...>` to specify type arguments + | +LL | foo::<BAR - bar::<i32>()>(); + | ^^ + +error: comparison operators cannot be chained + --> $DIR/const-expression-suggest-missing-braces-without-turbofish.rs:42:8 + | +LL | foo<BAR - bar::<i32>()>(); + | ^ ^ + | +help: use `::<...>` instead of `<...>` to specify type arguments + | +LL | foo::<BAR - bar::<i32>()>(); + | ^^ + +error: aborting due to 13 previous errors + diff --git a/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.rs b/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.rs new file mode 100644 index 00000000000..aea3def5aeb --- /dev/null +++ b/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.rs @@ -0,0 +1,55 @@ +#![feature(min_const_generics)] + +fn foo<const C: usize>() {} + +const BAR: usize = 42; + +fn a() { + foo::<BAR + 3>(); //~ ERROR expected one of +} +fn b() { + // FIXME(const_generics): these diagnostics are awful, because trait objects without `dyn` were + // a terrible mistake. + foo::<BAR + BAR>(); + //~^ ERROR expected trait, found constant `BAR` + //~| ERROR expected trait, found constant `BAR` + //~| ERROR wrong number of const arguments: expected 1, found 0 + //~| ERROR wrong number of type arguments: expected 0, found 1 + //~| WARN trait objects without an explicit `dyn` are deprecated +} +fn c() { + foo::<3 + 3>(); //~ ERROR expressions must be enclosed in braces +} +fn d() { + foo::<BAR - 3>(); //~ ERROR expected one of +} +fn e() { + foo::<BAR - BAR>(); //~ ERROR expected one of +} +fn f() { + foo::<100 - BAR>(); //~ ERROR expressions must be enclosed in braces +} +fn g() { + foo::<bar<i32>()>(); //~ ERROR expected one of +} +fn h() { + foo::<bar::<i32>()>(); //~ ERROR expected one of +} +fn i() { + foo::<bar::<i32>() + BAR>(); //~ ERROR expected one of +} +fn j() { + foo::<bar::<i32>() - BAR>(); //~ ERROR expected one of +} +fn k() { + foo::<BAR - bar::<i32>()>(); //~ ERROR expected one of +} +fn l() { + foo::<BAR - bar::<i32>()>(); //~ ERROR expected one of +} + +const fn bar<const C: usize>() -> usize { + C +} + +fn main() {} diff --git a/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.stderr b/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.stderr new file mode 100644 index 00000000000..47e9dc034ef --- /dev/null +++ b/src/test/ui/const-generics/min_const_generics/const-expression-suggest-missing-braces.stderr @@ -0,0 +1,157 @@ +error: expected one of `,` or `>`, found `3` + --> $DIR/const-expression-suggest-missing-braces.rs:8:17 + | +LL | foo::<BAR + 3>(); + | ^ expected one of `,` or `>` + | +help: expressions must be enclosed in braces to be used as const generic arguments + | +LL | foo::<{ BAR + 3 }>(); + | ^ ^ + +error: expressions must be enclosed in braces to be used as const generic arguments + --> $DIR/const-expression-suggest-missing-braces.rs:21:11 + | +LL | foo::<3 + 3>(); + | ^^^^^ + | +help: enclose the `const` expression in braces + | +LL | foo::<{ 3 + 3 }>(); + | ^ ^ + +error: expected one of `,` or `>`, found `-` + --> $DIR/const-expression-suggest-missing-braces.rs:24:15 + | +LL | foo::<BAR - 3>(); + | ^ expected one of `,` or `>` + | +help: expressions must be enclosed in braces to be used as const generic arguments + | +LL | foo::<{ BAR - 3 }>(); + | ^ ^ + +error: expected one of `,` or `>`, found `-` + --> $DIR/const-expression-suggest-missing-braces.rs:27:15 + | +LL | foo::<BAR - BAR>(); + | ^ expected one of `,` or `>` + | +help: expressions must be enclosed in braces to be used as const generic arguments + | +LL | foo::<{ BAR - BAR }>(); + | ^ ^ + +error: expressions must be enclosed in braces to be used as const generic arguments + --> $DIR/const-expression-suggest-missing-braces.rs:30:11 + | +LL | foo::<100 - BAR>(); + | ^^^^^^^^^ + | +help: enclose the `const` expression in braces + | +LL | foo::<{ 100 - BAR }>(); + | ^ ^ + +error: expected one of `,` or `>`, found `(` + --> $DIR/const-expression-suggest-missing-braces.rs:33:19 + | +LL | foo::<bar<i32>()>(); + | ^ expected one of `,` or `>` + | +help: expressions must be enclosed in braces to be used as const generic arguments + | +LL | foo::<{ bar<i32>() }>(); + | ^ ^ + +error: expected one of `,` or `>`, found `(` + --> $DIR/const-expression-suggest-missing-braces.rs:36:21 + | +LL | foo::<bar::<i32>()>(); + | ^ expected one of `,` or `>` + | +help: expressions must be enclosed in braces to be used as const generic arguments + | +LL | foo::<{ bar::<i32>() }>(); + | ^ ^ + +error: expected one of `,` or `>`, found `(` + --> $DIR/const-expression-suggest-missing-braces.rs:39:21 + | +LL | foo::<bar::<i32>() + BAR>(); + | ^ expected one of `,` or `>` + | +help: expressions must be enclosed in braces to be used as const generic arguments + | +LL | foo::<{ bar::<i32>() + BAR }>(); + | ^ ^ + +error: expected one of `,` or `>`, found `(` + --> $DIR/const-expression-suggest-missing-braces.rs:42:21 + | +LL | foo::<bar::<i32>() - BAR>(); + | ^ expected one of `,` or `>` + | +help: expressions must be enclosed in braces to be used as const generic arguments + | +LL | foo::<{ bar::<i32>() - BAR }>(); + | ^ ^ + +error: expected one of `,` or `>`, found `-` + --> $DIR/const-expression-suggest-missing-braces.rs:45:15 + | +LL | foo::<BAR - bar::<i32>()>(); + | ^ expected one of `,` or `>` + | +help: expressions must be enclosed in braces to be used as const generic arguments + | +LL | foo::<{ BAR - bar::<i32>() }>(); + | ^ ^ + +error: expected one of `,` or `>`, found `-` + --> $DIR/const-expression-suggest-missing-braces.rs:48:15 + | +LL | foo::<BAR - bar::<i32>()>(); + | ^ expected one of `,` or `>` + | +help: expressions must be enclosed in braces to be used as const generic arguments + | +LL | foo::<{ BAR - bar::<i32>() }>(); + | ^ ^ + +error[E0404]: expected trait, found constant `BAR` + --> $DIR/const-expression-suggest-missing-braces.rs:13:11 + | +LL | foo::<BAR + BAR>(); + | ^^^ not a trait + +error[E0404]: expected trait, found constant `BAR` + --> $DIR/const-expression-suggest-missing-braces.rs:13:17 + | +LL | foo::<BAR + BAR>(); + | ^^^ not a trait + +warning: trait objects without an explicit `dyn` are deprecated + --> $DIR/const-expression-suggest-missing-braces.rs:13:11 + | +LL | foo::<BAR + BAR>(); + | ^^^^^^^^^ help: use `dyn`: `dyn BAR + BAR` + | + = note: `#[warn(bare_trait_objects)]` on by default + +error[E0107]: wrong number of const arguments: expected 1, found 0 + --> $DIR/const-expression-suggest-missing-braces.rs:13:5 + | +LL | foo::<BAR + BAR>(); + | ^^^^^^^^^^^^^^^^ expected 1 const argument + +error[E0107]: wrong number of type arguments: expected 0, found 1 + --> $DIR/const-expression-suggest-missing-braces.rs:13:11 + | +LL | foo::<BAR + BAR>(); + | ^^^^^^^^^ unexpected type argument + +error: aborting due to 15 previous errors; 1 warning emitted + +Some errors have detailed explanations: E0107, E0404. +For more information about an error, try `rustc --explain E0107`. diff --git a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.rs b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.rs index 25c7fe760d3..aeee27a151e 100644 --- a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.rs +++ b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.rs @@ -233,6 +233,8 @@ fn inside_const_generic_arguments() { // admit non-IDENT expressions in const generic arguments. if A::< - true && let 1 = 1 //~ ERROR expected one of `,` or `>`, found `&&` + true && let 1 = 1 + //~^ ERROR `let` expressions are not supported here + //~| ERROR expressions must be enclosed in braces >::O == 5 {} } diff --git a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr index bd39650702c..11155038a91 100644 --- a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr +++ b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr @@ -1,8 +1,13 @@ -error: expected one of `,` or `>`, found `&&` - --> $DIR/disallowed-positions.rs:236:14 +error: expressions must be enclosed in braces to be used as const generic arguments + --> $DIR/disallowed-positions.rs:236:9 | LL | true && let 1 = 1 - | ^^ expected one of `,` or `>` + | ^^^^^^^^^^^^^^^^^ + | +help: enclose the `const` expression in braces + | +LL | { true && let 1 = 1 } + | ^ ^ error: `let` expressions are not supported here --> $DIR/disallowed-positions.rs:32:9 @@ -499,6 +504,15 @@ LL | true && let 1 = 1 = note: only supported directly in conditions of `if`- and `while`-expressions = note: as well as when nested within `&&` and parenthesis in those conditions +error: `let` expressions are not supported here + --> $DIR/disallowed-positions.rs:236:17 + | +LL | true && let 1 = 1 + | ^^^^^^^^^ + | + = note: only supported directly in conditions of `if`- and `while`-expressions + = note: as well as when nested within `&&` and parenthesis in those conditions + warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes --> $DIR/disallowed-positions.rs:20:12 | @@ -961,7 +975,7 @@ LL | let 0 = 0?; = help: the trait `Try` is not implemented for `{integer}` = note: required by `into_result` -error: aborting due to 103 previous errors; 2 warnings emitted +error: aborting due to 104 previous errors; 2 warnings emitted Some errors have detailed explanations: E0277, E0308, E0600, E0614. For more information about an error, try `rustc --explain E0277`. |
