diff --git a/src/doc/rustc-dev-guide/src/mir/mir_cfg.svg b/src/doc/rustc-dev-guide/src/mir/mir_cfg.svg index 70705ec0430b3..6f9a4105260ac 100644 --- a/src/doc/rustc-dev-guide/src/mir/mir_cfg.svg +++ b/src/doc/rustc-dev-guide/src/mir/mir_cfg.svg @@ -1,270 +1 @@ - - - - - - -__crate__ - - -cluster_Mir_0_4 - -fn main() -> () -let _1: i32; -let mut _2: i32; -let mut _3: bool; -let mut _4: i32; -let mut _5: i32; -debug x => _1; -debug y => _2; - - -cluster_Mir_0_3 - -fn incr() -> i32 -let mut _1: i32; -let mut _2: bool; -let mut _3: bool; -debug ret => _1; - - - -bb0__0_4 - - -0 - -StorageLive(_1) -_1 = const 5_i32 -StorageLive(_2) -_2 = const 3_i32 -StorageLive(_3) -StorageLive(_4) -_4 = _1 -_3 = Gt(move _4, const 3_i32) -StorageDead(_4) - -switchInt(move _3) - - - -bb1__0_4 - - -1 - -_2 = const 4_i32 -_0 = const () - -goto - - - -bb0__0_4->bb1__0_4 - - -otherwise - - - -bb2__0_4 - - -2 - -StorageLive(_5) - -_5 = incr() - - - -bb0__0_4->bb2__0_4 - - -false - - - -bb4__0_4 - - -4 - -StorageDead(_3) -StorageDead(_2) -StorageDead(_1) - -return - - - -bb1__0_4->bb4__0_4 - - - - - -bb3__0_4 - - -3 - -_2 = Add(_2, move _5) -StorageDead(_5) -_0 = const () - -goto - - - -bb2__0_4->bb3__0_4 - - -return - - - -bb3__0_4->bb4__0_4 - - - - - -bb0__0_3 - - -0 - -StorageLive(_1) -StorageLive(_2) -_2 = const true - -switchInt(move _2) - - - -bb1__0_3 - - -1 - -_1 = const 7_i32 - -goto - - - -bb0__0_3->bb1__0_3 - - -otherwise - - - -bb2__0_3 - - -2 - -StorageLive(_3) -_3 = const true - -switchInt(move _3) - - - -bb0__0_3->bb2__0_3 - - -false - - - -bb6__0_3 - - -6 - -StorageDead(_2) -_1 = Add(_1, const 1_i32) -_0 = _1 -StorageDead(_1) - -return - - - -bb1__0_3->bb6__0_3 - - - - - -bb3__0_3 - - -3 - -_1 = const 8_i32 - -goto - - - -bb2__0_3->bb3__0_3 - - -otherwise - - - -bb4__0_3 - - -4 - -_1 = const 9_i32 - -goto - - - -bb2__0_3->bb4__0_3 - - -false - - - -bb5__0_3 - - -5 - -StorageDead(_3) - -goto - - - -bb3__0_3->bb5__0_3 - - - - - -bb4__0_3->bb5__0_3 - - - - - -bb5__0_3->bb6__0_3 - - - - - +__crate__cluster_Mir_0_4fn main() -> ()let _1: i32;let mut _2: i32;let mut _3: bool;let mut _4: i32;let mut _5: i32;debug x => _1;debug y => _2;cluster_Mir_0_3fn incr() -> i32let mut _1: i32;let mut _2: bool;let mut _3: bool;debug ret => _1;bb0__0_40StorageLive(_1)_1 = const 5_i32StorageLive(_2)_2 = const 3_i32StorageLive(_3)StorageLive(_4)_4 = _1_3 = Gt(move _4, const 3_i32)StorageDead(_4)switchInt(move _3)bb1__0_41_2 = const 4_i32_0 = const ()gotobb0__0_4->bb1__0_4otherwisebb2__0_42StorageLive(_5)_5 = incr()bb0__0_4->bb2__0_4falsebb4__0_44StorageDead(_3)StorageDead(_2)StorageDead(_1)returnbb1__0_4->bb4__0_4bb3__0_43_2 = Add(_2, move _5)StorageDead(_5)_0 = const ()gotobb2__0_4->bb3__0_4returnbb3__0_4->bb4__0_4bb0__0_30StorageLive(_1)StorageLive(_2)_2 = const trueswitchInt(move _2)bb1__0_31_1 = const 7_i32gotobb0__0_3->bb1__0_3otherwisebb2__0_32StorageLive(_3)_3 = const trueswitchInt(move _3)bb0__0_3->bb2__0_3falsebb6__0_36StorageDead(_2)_1 = Add(_1, const 1_i32)_0 = _1StorageDead(_1)returnbb1__0_3->bb6__0_3bb3__0_33_1 = const 8_i32gotobb2__0_3->bb3__0_3otherwisebb4__0_34_1 = const 9_i32gotobb2__0_3->bb4__0_3falsebb5__0_35StorageDead(_3)gotobb3__0_3->bb5__0_3bb4__0_3->bb5__0_3bb5__0_3->bb6__0_3 \ No newline at end of file diff --git a/src/doc/rustc-dev-guide/src/mir/mir_detailed.svg b/src/doc/rustc-dev-guide/src/mir/mir_detailed.svg index 771e9e5dc0a79..b98c4ddd719a2 100644 --- a/src/doc/rustc-dev-guide/src/mir/mir_detailed.svg +++ b/src/doc/rustc-dev-guide/src/mir/mir_detailed.svg @@ -1,300 +1 @@ - - - - - - -G - - - -Operand - -Operand - - - -Constant - -Constant - - - -Operand->Constant - - - - - -Place - -Place - - - -Operand->Place - - -read - - - -Projection - -Projection - - - -Place->Projection - - - - - -LocalId - -LocalId - - - -Place->LocalId - - - - - -Projection->Place - - - - - -Rvalue - -Rvalue - - - -Rvalue\nAggregate - -Rvalue -Aggregate - - - -Rvalue->Rvalue\nAggregate - - - - - -Rvalue\nBinaryOp - -Rvalue -BinaryOp - - - -Rvalue->Rvalue\nBinaryOp - - - - - -Rvalue\nUnaryOp - -Rvalue -UnaryOp - - - -Rvalue->Rvalue\nUnaryOp - - - - - -Rvalue\n... - -Rvalue -... - - - -Rvalue->Rvalue\n... - - - - - -Rvalue\nAggregate->Operand - - -* - - - -Rvalue\nBinaryOp->Operand - - -2 - - - -Rvalue\nUnaryOp->Operand - - - - - -Statement\nAssignment - -Statement -Assignment - - - -Statement\nAssignment->Place - - -write - - - -Statement\nAssignment->Rvalue - - - - - -Statement - -Statement - - - -Statement->Statement\nAssignment - - - - - -Statement\n... - -Statement -... - - - -Statement->Statement\n... - - - - - -Block - -Block - - - -Block->Statement - - -* - - - -Terminator - -Terminator - - - -Block->Terminator - - - - - -Terminator\nSwitchInt - -Terminator -SwitchInt - - - -Terminator->Terminator\nSwitchInt - - - - - -Terminator\n... - -Terminator -... - - - -Terminator->Terminator\n... - - - - - -Terminator\nSwitchInt->Operand - - - - - -Terminator\nSwitchInt->Constant - - -* - - - -BlockId - -BlockId - - - -Terminator\nSwitchInt->BlockId - - -* - - - -Mir - -Mir - - - -Mir->Block - - -* - - - -Local - -Local - - - -Mir->Local - - -* - - - +GOperandOperandConstantConstantOperand->ConstantPlacePlaceOperand->PlacereadProjectionProjectionPlace->ProjectionLocalIdLocalIdPlace->LocalIdProjection->PlaceRvalueRvalueRvalue\nAggregateRvalueAggregateRvalue->Rvalue\nAggregateRvalue\nBinaryOpRvalueBinaryOpRvalue->Rvalue\nBinaryOpRvalue\nUnaryOpRvalueUnaryOpRvalue->Rvalue\nUnaryOpRvalue\n...Rvalue...Rvalue->Rvalue\n...Rvalue\nAggregate->Operand*Rvalue\nBinaryOp->Operand2Rvalue\nUnaryOp->OperandStatement\nAssignmentStatementAssignmentStatement\nAssignment->PlacewriteStatement\nAssignment->RvalueStatementStatementStatement->Statement\nAssignmentStatement\n...Statement...Statement->Statement\n...BlockBlockBlock->Statement*TerminatorTerminatorBlock->TerminatorTerminator\nSwitchIntTerminatorSwitchIntTerminator->Terminator\nSwitchIntTerminator\n...Terminator...Terminator->Terminator\n...Terminator\nSwitchInt->OperandTerminator\nSwitchInt->Constant*BlockIdBlockIdTerminator\nSwitchInt->BlockId*MirMirMir->Block*LocalLocalMir->Local* \ No newline at end of file diff --git a/src/doc/rustc-dev-guide/src/mir/mir_overview.svg b/src/doc/rustc-dev-guide/src/mir/mir_overview.svg index b8f092cd28019..4ba52140b9aa9 100644 --- a/src/doc/rustc-dev-guide/src/mir/mir_overview.svg +++ b/src/doc/rustc-dev-guide/src/mir/mir_overview.svg @@ -1,103 +1 @@ - - - - - - -G - - - -Operand - -Operand - - - -Constant - -Constant - - - -Operand->Constant - - - - - -Place - -Place - - - -Operand->Place - - - - - -Projection - -Projection - - - -Place->Projection - - - - - -Local - -Local - - - -Place->Local - - - - - -Projection->Place - - - - - -Rvalue - -Rvalue - - - -Rvalue->Operand - - - - - -Assignment - -Assignment - - - -Assignment->Operand - - - - - -Assignment->Place - - - - - +GOperandOperandConstantConstantOperand->ConstantPlacePlaceOperand->PlaceProjectionProjectionPlace->ProjectionLocalLocalPlace->LocalProjection->PlaceRvalueRvalueRvalue->OperandAssignmentAssignmentAssignment->OperandAssignment->Place \ No newline at end of file diff --git a/src/librustdoc/html/static/images/favicon.svg b/src/librustdoc/html/static/images/favicon.svg index 8b34b511989e1..fe5236d7819cc 100644 --- a/src/librustdoc/html/static/images/favicon.svg +++ b/src/librustdoc/html/static/images/favicon.svg @@ -1,24 +1 @@ - - - - - + \ No newline at end of file diff --git a/src/librustdoc/html/static/images/rust-logo.svg b/src/librustdoc/html/static/images/rust-logo.svg index 62424d8ffd763..78800c7121493 100644 --- a/src/librustdoc/html/static/images/rust-logo.svg +++ b/src/librustdoc/html/static/images/rust-logo.svg @@ -1,61 +1 @@ - - - + \ No newline at end of file diff --git a/src/tools/rust-analyzer/assets/logo-square.svg b/src/tools/rust-analyzer/assets/logo-square.svg index fe1c1fa02271b..2b40a2a869cb9 100644 --- a/src/tools/rust-analyzer/assets/logo-square.svg +++ b/src/tools/rust-analyzer/assets/logo-square.svg @@ -1,88 +1 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/src/tools/rust-analyzer/assets/logo-wide.svg b/src/tools/rust-analyzer/assets/logo-wide.svg index c5fb55b36a899..888c05e8e17d3 100644 --- a/src/tools/rust-analyzer/assets/logo-wide.svg +++ b/src/tools/rust-analyzer/assets/logo-wide.svg @@ -1,142 +1 @@ - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/tests/ui/codemap_tests/huge_multispan_highlight.ascii.svg b/tests/ui/codemap_tests/huge_multispan_highlight.ascii.svg index 1cedbf75e4bf6..cab943d86342a 100644 --- a/tests/ui/codemap_tests/huge_multispan_highlight.ascii.svg +++ b/tests/ui/codemap_tests/huge_multispan_highlight.ascii.svg @@ -1,106 +1 @@ - - - - - - - error[E0308]: `match` arms have incompatible types - - --> $DIR/huge_multispan_highlight.rs:99:18 - - | - - LL | let _ = match true { - - | ---------- `match` arms have incompatible types - - LL | true => ( - - | _________________- - - ... | - - LL | | ), - - | |_________- this is found to be of type `()` - - LL | false => " - - | __________________^ - - ... | - - LL | | ", - - | |_________^ expected `()`, found `&str` - - - - error[E0308]: `match` arms have incompatible types - - --> $DIR/huge_multispan_highlight.rs:216:18 - - | - - LL | let _ = match true { - - | ---------- `match` arms have incompatible types - - LL | true => ( - - | _________________- - - LL | | - - LL | | 1 // last line shown in multispan header - - ... | - - LL | | ), - - | |_________- this is found to be of type `{integer}` - - LL | false => " - - | __________________^ - - LL | | - - LL | | - - LL | | 1 last line shown in multispan - - ... | - - LL | | ", - - | |_________^ expected integer, found `&str` - - - - error: aborting due to 2 previous errors - - - - For more information about this error, try `rustc --explain E0308`. - - - - - - +error[E0308]: `match` arms have incompatible types --> $DIR/huge_multispan_highlight.rs:99:18 | LL | let _ = match true { | ---------- `match` arms have incompatible types LL | true => ( | _________________- ... | LL | | ), | |_________- this is found to be of type `()` LL | false => " | __________________^ ... | LL | | ", | |_________^ expected `()`, found `&str` error[E0308]: `match` arms have incompatible types --> $DIR/huge_multispan_highlight.rs:216:18 | LL | let _ = match true { | ---------- `match` arms have incompatible types LL | true => ( | _________________- LL | | LL | | 1 // last line shown in multispan header ... | LL | | ), | |_________- this is found to be of type `{integer}` LL | false => " | __________________^ LL | | LL | | LL | | 1 last line shown in multispan ... | LL | | ", | |_________^ expected integer, found `&str` error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0308`. \ No newline at end of file diff --git a/tests/ui/codemap_tests/huge_multispan_highlight.unicode.svg b/tests/ui/codemap_tests/huge_multispan_highlight.unicode.svg index 36a33b7404264..be2da64391372 100644 --- a/tests/ui/codemap_tests/huge_multispan_highlight.unicode.svg +++ b/tests/ui/codemap_tests/huge_multispan_highlight.unicode.svg @@ -1,106 +1 @@ - - - - - - - error[E0308]: `match` arms have incompatible types - - ╭▸ $DIR/huge_multispan_highlight.rs:99:18 - - - - LL let _ = match true { - - ────────── `match` arms have incompatible types - - LL true => ( - - ┌─────────────────┘ - - - - LL ), - - └─────────┘ this is found to be of type `()` - - LL false => " - - ┏━━━━━━━━━━━━━━━━━━┛ - - - - LL ", - - ╰╴┗━━━━━━━━━┛ expected `()`, found `&str` - - - - error[E0308]: `match` arms have incompatible types - - ╭▸ $DIR/huge_multispan_highlight.rs:216:18 - - - - LL let _ = match true { - - ────────── `match` arms have incompatible types - - LL true => ( - - ┌─────────────────┘ - - LL - - LL 1 // last line shown in multispan header - - - - LL ), - - └─────────┘ this is found to be of type `{integer}` - - LL false => " - - ┏━━━━━━━━━━━━━━━━━━┛ - - LL - - LL - - LL 1 last line shown in multispan - - - - LL ", - - ╰╴┗━━━━━━━━━┛ expected integer, found `&str` - - - - error: aborting due to 2 previous errors - - - - For more information about this error, try `rustc --explain E0308`. - - - - - - +error[E0308]: `match` arms have incompatible types ╭▸ $DIR/huge_multispan_highlight.rs:99:18 LL let _ = match true { ────────── `match` arms have incompatible types LL true => ( ┌─────────────────┘ LL ), └─────────┘ this is found to be of type `()` LL false => " ┏━━━━━━━━━━━━━━━━━━┛ LL ", ╰╴┗━━━━━━━━━┛ expected `()`, found `&str` error[E0308]: `match` arms have incompatible types ╭▸ $DIR/huge_multispan_highlight.rs:216:18 LL let _ = match true { ────────── `match` arms have incompatible types LL true => ( ┌─────────────────┘ LL LL 1 // last line shown in multispan header LL ), └─────────┘ this is found to be of type `{integer}` LL false => " ┏━━━━━━━━━━━━━━━━━━┛ LL LL LL 1 last line shown in multispan LL ", ╰╴┗━━━━━━━━━┛ expected integer, found `&str` error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0308`. \ No newline at end of file diff --git a/tests/ui/diagnostic-flags/colored-session-opt-error.svg b/tests/ui/diagnostic-flags/colored-session-opt-error.svg index 69f452f29f31f..32d86fd38aed0 100644 --- a/tests/ui/diagnostic-flags/colored-session-opt-error.svg +++ b/tests/ui/diagnostic-flags/colored-session-opt-error.svg @@ -1,29 +1 @@ - - - - - - - warning: -C remark requires "-C debuginfo=n" to show source locations - - - - - - - - +warning: -C remark requires "-C debuginfo=n" to show source locations \ No newline at end of file diff --git a/tests/ui/error-emitter/E0308-clarification.svg b/tests/ui/error-emitter/E0308-clarification.svg index 9432e3a4ee918..3bd28ea4625f7 100644 --- a/tests/ui/error-emitter/E0308-clarification.svg +++ b/tests/ui/error-emitter/E0308-clarification.svg @@ -1,97 +1 @@ - - - - - - - error[E0308]: mismatched types - - ╭▸ $DIR/E0308-clarification.rs:15:10 - - - - LL fn hide<T: Foo>(x: T) -> impl Foo { - - ┬─────── - - - - the expected opaque type - - the found opaque type - - - - LL x = (x.1, x.0); - - ━━━ expected `u32`, found `i32` - - - - note: expected opaque type `impl Foo` (`u32`) - - found opaque type `impl Foo` (`i32`) - - note: distinct uses of `impl Trait` result in different opaque types - - - - error[E0308]: mismatched types - - ╭▸ $DIR/E0308-clarification.rs:15:15 - - - - LL fn hide<T: Foo>(x: T) -> impl Foo { - - ┬─────── - - - - the expected opaque type - - the found opaque type - - - - LL x = (x.1, x.0); - - ━━━ expected `i32`, found `u32` - - - - note: expected opaque type `impl Foo` (`i32`) - - found opaque type `impl Foo` (`u32`) - - note: distinct uses of `impl Trait` result in different opaque types - - - - error: aborting due to 2 previous errors - - - - For more information about this error, try `rustc --explain E0308`. - - - - - - +error[E0308]: mismatched types ╭▸ $DIR/E0308-clarification.rs:15:10 LL fn hide<T: Foo>(x: T) -> impl Foo { ┬─────── the expected opaque type the found opaque type LL x = (x.1, x.0); ━━━ expected `u32`, found `i32` note: expected opaque type `impl Foo` (`u32`) found opaque type `impl Foo` (`i32`) note: distinct uses of `impl Trait` result in different opaque types error[E0308]: mismatched types ╭▸ $DIR/E0308-clarification.rs:15:15 LL fn hide<T: Foo>(x: T) -> impl Foo { ┬─────── the expected opaque type the found opaque type LL x = (x.1, x.0); ━━━ expected `i32`, found `u32` note: expected opaque type `impl Foo` (`i32`) found opaque type `impl Foo` (`u32`) note: distinct uses of `impl Trait` result in different opaque types error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0308`. \ No newline at end of file diff --git a/tests/ui/error-emitter/highlighting.svg b/tests/ui/error-emitter/highlighting.svg index 19818ab6146c7..cfb878dd1e832 100644 --- a/tests/ui/error-emitter/highlighting.svg +++ b/tests/ui/error-emitter/highlighting.svg @@ -1,72 +1 @@ - - - - - - - error[E0308]: mismatched types - - --> $DIR/highlighting.rs:21:11 - - | - - LL | query(wrapped_fn); - - | ----- ^^^^^^^^^^ one type is more general than the other - - | | - - | arguments to this function are incorrect - - | - - = note: expected fn pointer `for<'a> fn(Box<(dyn Any + Send + 'a)>) -> Pin<_>` - - found fn item `fn(Box<(dyn Any + Send + 'static)>) -> Pin<_> {wrapped_fn}` - - note: function defined here - - --> $DIR/highlighting.rs:10:4 - - | - - LL | fn query(_: fn(Box<(dyn Any + Send + '_)>) -> Pin<Box<( - - | ____^^^^^_- - - LL | | dyn Future<Output = Result<Box<(dyn Any + 'static)>, String>> + Send + 'static - - LL | | )>>) {} - - | |___- - - - - error: aborting due to 1 previous error - - - - For more information about this error, try `rustc --explain E0308`. - - - - - - +error[E0308]: mismatched types --> $DIR/highlighting.rs:21:11 | LL | query(wrapped_fn); | ----- ^^^^^^^^^^ one type is more general than the other | | | arguments to this function are incorrect | = note: expected fn pointer `for<'a> fn(Box<(dyn Any + Send + 'a)>) -> Pin<_>` found fn item `fn(Box<(dyn Any + Send + 'static)>) -> Pin<_> {wrapped_fn}` note: function defined here --> $DIR/highlighting.rs:10:4 | LL | fn query(_: fn(Box<(dyn Any + Send + '_)>) -> Pin<Box<( | ____^^^^^_- LL | | dyn Future<Output = Result<Box<(dyn Any + 'static)>, String>> + Send + 'static LL | | )>>) {} | |___- error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. \ No newline at end of file diff --git a/tests/ui/error-emitter/highlighting.windows.svg b/tests/ui/error-emitter/highlighting.windows.svg index f891bc1d2a687..1059f19d44975 100644 --- a/tests/ui/error-emitter/highlighting.windows.svg +++ b/tests/ui/error-emitter/highlighting.windows.svg @@ -1,73 +1 @@ - - - - - - - error[E0308]: mismatched types - - --> $DIR/highlighting.rs:21:11 - - | - - LL | query(wrapped_fn); - - | ----- ^^^^^^^^^^ one type is more general than the other - - | | - - | arguments to this function are incorrect - - | - - = note: expected fn pointer `for<'a> fn(Box<(dyn Any + Send + 'a)>) -> Pin<_>` - - found fn item `fn(Box<(dyn Any + Send + 'static)>) -> Pin<_> {wrapped_fn}` - - note: function defined here - - --> $DIR/highlighting.rs:10:4 - - | - - LL | fn query(_: fn(Box<(dyn Any + Send + '_)>) -> Pin<Box<( - - | ____^^^^^_- - - LL | | dyn Future<Output = Result<Box<(dyn Any + 'static)>, String>> + Send + 'static - - LL | | )>>) {} - - | |___- - - - - error: aborting due to 1 previous error - - - - For more information about this error, try `rustc --explain E0308`. - - - - - - +error[E0308]: mismatched types --> $DIR/highlighting.rs:21:11 | LL | query(wrapped_fn); | ----- ^^^^^^^^^^ one type is more general than the other | | | arguments to this function are incorrect | = note: expected fn pointer `for<'a> fn(Box<(dyn Any + Send + 'a)>) -> Pin<_>` found fn item `fn(Box<(dyn Any + Send + 'static)>) -> Pin<_> {wrapped_fn}` note: function defined here --> $DIR/highlighting.rs:10:4 | LL | fn query(_: fn(Box<(dyn Any + Send + '_)>) -> Pin<Box<( | ____^^^^^_- LL | | dyn Future<Output = Result<Box<(dyn Any + 'static)>, String>> + Send + 'static LL | | )>>) {} | |___- error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. \ No newline at end of file diff --git a/tests/ui/error-emitter/multiline-multipart-suggestion.svg b/tests/ui/error-emitter/multiline-multipart-suggestion.svg index dd84234236d77..6e1ea6625495b 100644 --- a/tests/ui/error-emitter/multiline-multipart-suggestion.svg +++ b/tests/ui/error-emitter/multiline-multipart-suggestion.svg @@ -1,120 +1 @@ - - - - - - - error[E0106]: missing lifetime specifier - - --> $DIR/multiline-multipart-suggestion.rs:3:34 - - | - - LL | fn short(foo_bar: &Vec<&i32>) -> &i32 { - - | ---------- ^ expected named lifetime parameter - - | - - = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from - - help: consider introducing a named lifetime parameter - - | - - LL | fn short<'a>(foo_bar: &'a Vec<&'a i32>) -> &'a i32 { - - | ++++ ++ ++ ++ - - - - error[E0106]: missing lifetime specifier - - --> $DIR/multiline-multipart-suggestion.rs:10:6 - - | - - LL | foo_bar: &Vec<&i32>, - - | ---------- - - LL | something_very_long_so_that_the_line_will_wrap_around__________: i32, - - LL | ) -> &i32 { - - | ^ expected named lifetime parameter - - | - - = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from - - help: consider introducing a named lifetime parameter - - | - - LL ~ fn long<'a>( - - LL ~ foo_bar: &'a Vec<&'a i32>, - - LL | something_very_long_so_that_the_line_will_wrap_around__________: i32, - - LL ~ ) -> &'a i32 { - - | - - - - error[E0106]: missing lifetime specifier - - --> $DIR/multiline-multipart-suggestion.rs:15:29 - - | - - LL | foo_bar: &Vec<&i32>) -> &i32 { - - | ---------- ^ expected named lifetime parameter - - | - - = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from - - help: consider introducing a named lifetime parameter - - | - - LL ~ fn long2<'a>( - - LL ~ foo_bar: &'a Vec<&'a i32>) -> &'a i32 { - - | - - - - error: aborting due to 3 previous errors - - - - For more information about this error, try `rustc --explain E0106`. - - - - - - +error[E0106]: missing lifetime specifier --> $DIR/multiline-multipart-suggestion.rs:3:34 | LL | fn short(foo_bar: &Vec<&i32>) -> &i32 { | ---------- ^ expected named lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from help: consider introducing a named lifetime parameter | LL | fn short<'a>(foo_bar: &'a Vec<&'a i32>) -> &'a i32 { | ++++ ++ ++ ++ error[E0106]: missing lifetime specifier --> $DIR/multiline-multipart-suggestion.rs:10:6 | LL | foo_bar: &Vec<&i32>, | ---------- LL | something_very_long_so_that_the_line_will_wrap_around__________: i32, LL | ) -> &i32 { | ^ expected named lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from help: consider introducing a named lifetime parameter | LL ~ fn long<'a>( LL ~ foo_bar: &'a Vec<&'a i32>, LL | something_very_long_so_that_the_line_will_wrap_around__________: i32, LL ~ ) -> &'a i32 { | error[E0106]: missing lifetime specifier --> $DIR/multiline-multipart-suggestion.rs:15:29 | LL | foo_bar: &Vec<&i32>) -> &i32 { | ---------- ^ expected named lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from help: consider introducing a named lifetime parameter | LL ~ fn long2<'a>( LL ~ foo_bar: &'a Vec<&'a i32>) -> &'a i32 { | error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0106`. \ No newline at end of file diff --git a/tests/ui/error-emitter/multiline-multipart-suggestion.windows.svg b/tests/ui/error-emitter/multiline-multipart-suggestion.windows.svg index 144e57165da7c..f4ef30fdbd201 100644 --- a/tests/ui/error-emitter/multiline-multipart-suggestion.windows.svg +++ b/tests/ui/error-emitter/multiline-multipart-suggestion.windows.svg @@ -1,120 +1 @@ - - - - - - - error[E0106]: missing lifetime specifier - - --> $DIR/multiline-multipart-suggestion.rs:3:34 - - | - - LL | fn short(foo_bar: &Vec<&i32>) -> &i32 { - - | ---------- ^ expected named lifetime parameter - - | - - = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from - - help: consider introducing a named lifetime parameter - - | - - LL | fn short<'a>(foo_bar: &'a Vec<&'a i32>) -> &'a i32 { - - | ++++ ++ ++ ++ - - - - error[E0106]: missing lifetime specifier - - --> $DIR/multiline-multipart-suggestion.rs:10:6 - - | - - LL | foo_bar: &Vec<&i32>, - - | ---------- - - LL | something_very_long_so_that_the_line_will_wrap_around__________: i32, - - LL | ) -> &i32 { - - | ^ expected named lifetime parameter - - | - - = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from - - help: consider introducing a named lifetime parameter - - | - - LL ~ fn long<'a>( - - LL ~ foo_bar: &'a Vec<&'a i32>, - - LL | something_very_long_so_that_the_line_will_wrap_around__________: i32, - - LL ~ ) -> &'a i32 { - - | - - - - error[E0106]: missing lifetime specifier - - --> $DIR/multiline-multipart-suggestion.rs:15:29 - - | - - LL | foo_bar: &Vec<&i32>) -> &i32 { - - | ---------- ^ expected named lifetime parameter - - | - - = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from - - help: consider introducing a named lifetime parameter - - | - - LL ~ fn long2<'a>( - - LL ~ foo_bar: &'a Vec<&'a i32>) -> &'a i32 { - - | - - - - error: aborting due to 3 previous errors - - - - For more information about this error, try `rustc --explain E0106`. - - - - - - +error[E0106]: missing lifetime specifier --> $DIR/multiline-multipart-suggestion.rs:3:34 | LL | fn short(foo_bar: &Vec<&i32>) -> &i32 { | ---------- ^ expected named lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from help: consider introducing a named lifetime parameter | LL | fn short<'a>(foo_bar: &'a Vec<&'a i32>) -> &'a i32 { | ++++ ++ ++ ++ error[E0106]: missing lifetime specifier --> $DIR/multiline-multipart-suggestion.rs:10:6 | LL | foo_bar: &Vec<&i32>, | ---------- LL | something_very_long_so_that_the_line_will_wrap_around__________: i32, LL | ) -> &i32 { | ^ expected named lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from help: consider introducing a named lifetime parameter | LL ~ fn long<'a>( LL ~ foo_bar: &'a Vec<&'a i32>, LL | something_very_long_so_that_the_line_will_wrap_around__________: i32, LL ~ ) -> &'a i32 { | error[E0106]: missing lifetime specifier --> $DIR/multiline-multipart-suggestion.rs:15:29 | LL | foo_bar: &Vec<&i32>) -> &i32 { | ---------- ^ expected named lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say which one of `foo_bar`'s 2 lifetimes it is borrowed from help: consider introducing a named lifetime parameter | LL ~ fn long2<'a>( LL ~ foo_bar: &'a Vec<&'a i32>) -> &'a i32 { | error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0106`. \ No newline at end of file diff --git a/tests/ui/error-emitter/multiline-removal-suggestion.svg b/tests/ui/error-emitter/multiline-removal-suggestion.svg index 9c9bd163ecd49..0b21b660803f7 100644 --- a/tests/ui/error-emitter/multiline-removal-suggestion.svg +++ b/tests/ui/error-emitter/multiline-removal-suggestion.svg @@ -1,504 +1 @@ - - - - - - - error[E0277]: `(bool, HashSet<u8>)` is not an iterator - - --> $DIR/multiline-removal-suggestion.rs:21:8 - - | - - LL | }).flatten() - - | ^^^^^^^ `(bool, HashSet<u8>)` is not an iterator - - | - - = help: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)` - - = note: required for `(bool, HashSet<u8>)` to implement `IntoIterator` - - note: required by a bound in `flatten` - - --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL - - help: consider removing this method call, as the receiver has type `std::vec::IntoIter<HashSet<u8>>` and `std::vec::IntoIter<HashSet<u8>>: Iterator` trivially holds - - | - - LL - ts.into_iter() - - LL - .map(|t| { - - LL - ( - - LL - is_true, - - LL - t, - - LL - ) - - LL - }).flatten() - - LL + ts.into_iter().flatten() - - | - - - - error[E0277]: `(bool, HashSet<u8>)` is not an iterator - - --> $DIR/multiline-removal-suggestion.rs:13:2 - - | - - LL | / hm.into_iter() - - LL | | .map(|(is_true, ts)| { - - LL | | ts.into_iter() - - LL | | .map(|t| { - - ... | - - LL | | }).flatten() - - LL | | }) - - | |__________^ `(bool, HashSet<u8>)` is not an iterator - - | - - = help: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)` - - = note: required for `(bool, HashSet<u8>)` to implement `IntoIterator` - - note: required by a bound in `Flatten` - - --> $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL - - - - error[E0599]: the method `collect` exists for struct `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}>>`, but its trait bounds were not satisfied - - --> $DIR/multiline-removal-suggestion.rs:24:4 - - | - - LL | / hm.into_iter() - - LL | | .map(|(is_true, ts)| { - - LL | | ts.into_iter() - - LL | | .map(|t| { - - ... | - - LL | | .flatten() - - LL | | .collect() - - | | -^^^^^^^ method cannot be called due to unsatisfied trait bounds - - | |_________| - - | - - | - - = note: the following trait bounds were not satisfied: - - `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:16:10: 16:13}>> as IntoIterator>::IntoIter = _` - - which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}>>: Iterator` - - `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:16:10: 16:13}>> as IntoIterator>::Item = _` - - which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}>>: Iterator` - - `Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:16:10: 16:13}>>: IntoIterator` - - which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}>>: Iterator` - - `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}>>: Iterator` - - which is required by `&mut Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}>>: Iterator` - - - - error[E0277]: `(bool, HashSet<u8>)` is not an iterator - - --> $DIR/multiline-removal-suggestion.rs:32:6 - - | - - LL | .flatten() - - | ^^^^^^^ `(bool, HashSet<u8>)` is not an iterator - - | - - = help: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)` - - = note: required for `(bool, HashSet<u8>)` to implement `IntoIterator` - - note: required by a bound in `flatten` - - --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL - - help: consider removing this method call, as the receiver has type `std::vec::IntoIter<HashSet<u8>>` and `std::vec::IntoIter<HashSet<u8>>: Iterator` trivially holds - - | - - LL - ts.into_iter() - - LL - .map(|t| (is_true, t)) - - LL + ts.into_iter() - - | - - - - error[E0277]: `(bool, HashSet<u8>)` is not an iterator - - --> $DIR/multiline-removal-suggestion.rs:28:2 - - | - - LL | / hm.into_iter() - - LL | | .map(|(is_true, ts)| { - - LL | | ts.into_iter() - - LL | | .map(|t| (is_true, t)) - - LL | | .flatten() - - LL | | }) - - | |__________^ `(bool, HashSet<u8>)` is not an iterator - - | - - = help: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)` - - = note: required for `(bool, HashSet<u8>)` to implement `IntoIterator` - - note: required by a bound in `Flatten` - - --> $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL - - - - error[E0599]: the method `collect` exists for struct `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}>>`, but its trait bounds were not satisfied - - --> $DIR/multiline-removal-suggestion.rs:35:4 - - | - - LL | / hm.into_iter() - - LL | | .map(|(is_true, ts)| { - - LL | | ts.into_iter() - - LL | | .map(|t| (is_true, t)) - - ... | - - LL | | .flatten() - - LL | | .collect() - - | | -^^^^^^^ method cannot be called due to unsatisfied trait bounds - - | |_________| - - | - - | - - = note: the following trait bounds were not satisfied: - - `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:31:10: 31:13}>> as IntoIterator>::IntoIter = _` - - which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}>>: Iterator` - - `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:31:10: 31:13}>> as IntoIterator>::Item = _` - - which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}>>: Iterator` - - `Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:31:10: 31:13}>>: IntoIterator` - - which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}>>: Iterator` - - `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}>>: Iterator` - - which is required by `&mut Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}>>: Iterator` - - - - error[E0277]: `(bool, HashSet<u8>)` is not an iterator - - --> $DIR/multiline-removal-suggestion.rs:43:7 - - | - - LL | }).flatten() - - | ^^^^^^^ `(bool, HashSet<u8>)` is not an iterator - - | - - = help: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)` - - = note: required for `(bool, HashSet<u8>)` to implement `IntoIterator` - - note: required by a bound in `flatten` - - --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL - - help: consider removing this method call, as the receiver has type `std::vec::IntoIter<HashSet<u8>>` and `std::vec::IntoIter<HashSet<u8>>: Iterator` trivially holds - - | - - LL - ts.into_iter().map(|t| { - - LL - (is_true, t) - - LL - }).flatten() - - LL + ts.into_iter().flatten() - - | - - - - error[E0277]: `(bool, HashSet<u8>)` is not an iterator - - --> $DIR/multiline-removal-suggestion.rs:39:2 - - | - - LL | / hm.into_iter() - - LL | | .map(|(is_true, ts)| { - - LL | | ts.into_iter().map(|t| { - - LL | | (is_true, t) - - LL | | }).flatten() - - LL | | }) - - | |__________^ `(bool, HashSet<u8>)` is not an iterator - - | - - = help: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)` - - = note: required for `(bool, HashSet<u8>)` to implement `IntoIterator` - - note: required by a bound in `Flatten` - - --> $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL - - - - error[E0599]: the method `collect` exists for struct `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}>>`, but its trait bounds were not satisfied - - --> $DIR/multiline-removal-suggestion.rs:46:4 - - | - - LL | / hm.into_iter() - - LL | | .map(|(is_true, ts)| { - - LL | | ts.into_iter().map(|t| { - - LL | | (is_true, t) - - ... | - - LL | | .flatten() - - LL | | .collect() - - | | -^^^^^^^ method cannot be called due to unsatisfied trait bounds - - | |_________| - - | - - | - - = note: the following trait bounds were not satisfied: - - `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:41:23: 41:26}>> as IntoIterator>::IntoIter = _` - - which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}>>: Iterator` - - `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:41:23: 41:26}>> as IntoIterator>::Item = _` - - which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}>>: Iterator` - - `Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:41:23: 41:26}>>: IntoIterator` - - which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}>>: Iterator` - - `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}>>: Iterator` - - which is required by `&mut Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}>>: Iterator` - - - - error[E0277]: `(bool, HashSet<u8>)` is not an iterator - - --> $DIR/multiline-removal-suggestion.rs:53:28 - - | - - LL | .map(|t| (is_true, t)).flatten() - - | ^^^^^^^ `(bool, HashSet<u8>)` is not an iterator - - | - - = help: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)` - - = note: required for `(bool, HashSet<u8>)` to implement `IntoIterator` - - note: required by a bound in `flatten` - - --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL - - help: consider removing this method call, as the receiver has type `std::vec::IntoIter<HashSet<u8>>` and `std::vec::IntoIter<HashSet<u8>>: Iterator` trivially holds - - | - - LL - ts.into_iter() - - LL - .map(|t| (is_true, t)).flatten() - - LL + ts.into_iter().flatten() - - | - - - - error[E0277]: `(bool, HashSet<u8>)` is not an iterator - - --> $DIR/multiline-removal-suggestion.rs:50:2 - - | - - LL | / hm.into_iter() - - LL | | .map(|(is_true, ts)| { - - LL | | ts.into_iter() - - LL | | .map(|t| (is_true, t)).flatten() - - LL | | }) - - | |__________^ `(bool, HashSet<u8>)` is not an iterator - - | - - = help: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)` - - = note: required for `(bool, HashSet<u8>)` to implement `IntoIterator` - - note: required by a bound in `Flatten` - - --> $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL - - - - error[E0599]: the method `collect` exists for struct `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}>>`, but its trait bounds were not satisfied - - --> $DIR/multiline-removal-suggestion.rs:56:4 - - | - - LL | / hm.into_iter() - - LL | | .map(|(is_true, ts)| { - - LL | | ts.into_iter() - - LL | | .map(|t| (is_true, t)).flatten() - - LL | | }) - - LL | | .flatten() - - LL | | .collect() - - | | -^^^^^^^ method cannot be called due to unsatisfied trait bounds - - | |_________| - - | - - | - - = note: the following trait bounds were not satisfied: - - `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:53:10: 53:13}>> as IntoIterator>::IntoIter = _` - - which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}>>: Iterator` - - `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:53:10: 53:13}>> as IntoIterator>::Item = _` - - which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}>>: Iterator` - - `Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:53:10: 53:13}>>: IntoIterator` - - which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}>>: Iterator` - - `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}>>: Iterator` - - which is required by `&mut Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}>>: Iterator` - - - - error: aborting due to 12 previous errors - - - - Some errors have detailed explanations: E0277, E0599. - - For more information about an error, try `rustc --explain E0277`. - - - - - - +error[E0277]: `(bool, HashSet<u8>)` is not an iterator --> $DIR/multiline-removal-suggestion.rs:21:8 | LL | }).flatten() | ^^^^^^^ `(bool, HashSet<u8>)` is not an iterator | = help: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)` = note: required for `(bool, HashSet<u8>)` to implement `IntoIterator` note: required by a bound in `flatten` --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL help: consider removing this method call, as the receiver has type `std::vec::IntoIter<HashSet<u8>>` and `std::vec::IntoIter<HashSet<u8>>: Iterator` trivially holds | LL - ts.into_iter() LL - .map(|t| { LL - ( LL - is_true, LL - t, LL - ) LL - }).flatten() LL + ts.into_iter().flatten() | error[E0277]: `(bool, HashSet<u8>)` is not an iterator --> $DIR/multiline-removal-suggestion.rs:13:2 | LL | / hm.into_iter() LL | | .map(|(is_true, ts)| { LL | | ts.into_iter() LL | | .map(|t| { ... | LL | | }).flatten() LL | | }) | |__________^ `(bool, HashSet<u8>)` is not an iterator | = help: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)` = note: required for `(bool, HashSet<u8>)` to implement `IntoIterator` note: required by a bound in `Flatten` --> $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL error[E0599]: the method `collect` exists for struct `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}>>`, but its trait bounds were not satisfied --> $DIR/multiline-removal-suggestion.rs:24:4 | LL | / hm.into_iter() LL | | .map(|(is_true, ts)| { LL | | ts.into_iter() LL | | .map(|t| { ... | LL | | .flatten() LL | | .collect() | | -^^^^^^^ method cannot be called due to unsatisfied trait bounds | |_________| | | = note: the following trait bounds were not satisfied: `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:16:10: 16:13}>> as IntoIterator>::IntoIter = _` which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}>>: Iterator` `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:16:10: 16:13}>> as IntoIterator>::Item = _` which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}>>: Iterator` `Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:16:10: 16:13}>>: IntoIterator` which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}>>: Iterator` `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}>>: Iterator` which is required by `&mut Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:14:8: 14:23}>>: Iterator` error[E0277]: `(bool, HashSet<u8>)` is not an iterator --> $DIR/multiline-removal-suggestion.rs:32:6 | LL | .flatten() | ^^^^^^^ `(bool, HashSet<u8>)` is not an iterator | = help: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)` = note: required for `(bool, HashSet<u8>)` to implement `IntoIterator` note: required by a bound in `flatten` --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL help: consider removing this method call, as the receiver has type `std::vec::IntoIter<HashSet<u8>>` and `std::vec::IntoIter<HashSet<u8>>: Iterator` trivially holds | LL - ts.into_iter() LL - .map(|t| (is_true, t)) LL + ts.into_iter() | error[E0277]: `(bool, HashSet<u8>)` is not an iterator --> $DIR/multiline-removal-suggestion.rs:28:2 | LL | / hm.into_iter() LL | | .map(|(is_true, ts)| { LL | | ts.into_iter() LL | | .map(|t| (is_true, t)) LL | | .flatten() LL | | }) | |__________^ `(bool, HashSet<u8>)` is not an iterator | = help: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)` = note: required for `(bool, HashSet<u8>)` to implement `IntoIterator` note: required by a bound in `Flatten` --> $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL error[E0599]: the method `collect` exists for struct `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}>>`, but its trait bounds were not satisfied --> $DIR/multiline-removal-suggestion.rs:35:4 | LL | / hm.into_iter() LL | | .map(|(is_true, ts)| { LL | | ts.into_iter() LL | | .map(|t| (is_true, t)) ... | LL | | .flatten() LL | | .collect() | | -^^^^^^^ method cannot be called due to unsatisfied trait bounds | |_________| | | = note: the following trait bounds were not satisfied: `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:31:10: 31:13}>> as IntoIterator>::IntoIter = _` which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}>>: Iterator` `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:31:10: 31:13}>> as IntoIterator>::Item = _` which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}>>: Iterator` `Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:31:10: 31:13}>>: IntoIterator` which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}>>: Iterator` `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}>>: Iterator` which is required by `&mut Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:29:8: 29:23}>>: Iterator` error[E0277]: `(bool, HashSet<u8>)` is not an iterator --> $DIR/multiline-removal-suggestion.rs:43:7 | LL | }).flatten() | ^^^^^^^ `(bool, HashSet<u8>)` is not an iterator | = help: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)` = note: required for `(bool, HashSet<u8>)` to implement `IntoIterator` note: required by a bound in `flatten` --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL help: consider removing this method call, as the receiver has type `std::vec::IntoIter<HashSet<u8>>` and `std::vec::IntoIter<HashSet<u8>>: Iterator` trivially holds | LL - ts.into_iter().map(|t| { LL - (is_true, t) LL - }).flatten() LL + ts.into_iter().flatten() | error[E0277]: `(bool, HashSet<u8>)` is not an iterator --> $DIR/multiline-removal-suggestion.rs:39:2 | LL | / hm.into_iter() LL | | .map(|(is_true, ts)| { LL | | ts.into_iter().map(|t| { LL | | (is_true, t) LL | | }).flatten() LL | | }) | |__________^ `(bool, HashSet<u8>)` is not an iterator | = help: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)` = note: required for `(bool, HashSet<u8>)` to implement `IntoIterator` note: required by a bound in `Flatten` --> $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL error[E0599]: the method `collect` exists for struct `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}>>`, but its trait bounds were not satisfied --> $DIR/multiline-removal-suggestion.rs:46:4 | LL | / hm.into_iter() LL | | .map(|(is_true, ts)| { LL | | ts.into_iter().map(|t| { LL | | (is_true, t) ... | LL | | .flatten() LL | | .collect() | | -^^^^^^^ method cannot be called due to unsatisfied trait bounds | |_________| | | = note: the following trait bounds were not satisfied: `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:41:23: 41:26}>> as IntoIterator>::IntoIter = _` which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}>>: Iterator` `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:41:23: 41:26}>> as IntoIterator>::Item = _` which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}>>: Iterator` `Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:41:23: 41:26}>>: IntoIterator` which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}>>: Iterator` `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}>>: Iterator` which is required by `&mut Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:40:8: 40:23}>>: Iterator` error[E0277]: `(bool, HashSet<u8>)` is not an iterator --> $DIR/multiline-removal-suggestion.rs:53:28 | LL | .map(|t| (is_true, t)).flatten() | ^^^^^^^ `(bool, HashSet<u8>)` is not an iterator | = help: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)` = note: required for `(bool, HashSet<u8>)` to implement `IntoIterator` note: required by a bound in `flatten` --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL help: consider removing this method call, as the receiver has type `std::vec::IntoIter<HashSet<u8>>` and `std::vec::IntoIter<HashSet<u8>>: Iterator` trivially holds | LL - ts.into_iter() LL - .map(|t| (is_true, t)).flatten() LL + ts.into_iter().flatten() | error[E0277]: `(bool, HashSet<u8>)` is not an iterator --> $DIR/multiline-removal-suggestion.rs:50:2 | LL | / hm.into_iter() LL | | .map(|(is_true, ts)| { LL | | ts.into_iter() LL | | .map(|t| (is_true, t)).flatten() LL | | }) | |__________^ `(bool, HashSet<u8>)` is not an iterator | = help: the trait `Iterator` is not implemented for `(bool, HashSet<u8>)` = note: required for `(bool, HashSet<u8>)` to implement `IntoIterator` note: required by a bound in `Flatten` --> $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL error[E0599]: the method `collect` exists for struct `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}>>`, but its trait bounds were not satisfied --> $DIR/multiline-removal-suggestion.rs:56:4 | LL | / hm.into_iter() LL | | .map(|(is_true, ts)| { LL | | ts.into_iter() LL | | .map(|t| (is_true, t)).flatten() LL | | }) LL | | .flatten() LL | | .collect() | | -^^^^^^^ method cannot be called due to unsatisfied trait bounds | |_________| | | = note: the following trait bounds were not satisfied: `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:53:10: 53:13}>> as IntoIterator>::IntoIter = _` which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}>>: Iterator` `<Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:53:10: 53:13}>> as IntoIterator>::Item = _` which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}>>: Iterator` `Flatten<Map<std::vec::IntoIter<HashSet<u8>>, {closure@$DIR/multiline-removal-suggestion.rs:53:10: 53:13}>>: IntoIterator` which is required by `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}>>: Iterator` `Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}>>: Iterator` which is required by `&mut Flatten<Map<std::collections::hash_map::IntoIter<bool, Vec<HashSet<u8>>>, {closure@$DIR/multiline-removal-suggestion.rs:51:8: 51:23}>>: Iterator` error: aborting due to 12 previous errors Some errors have detailed explanations: E0277, E0599. For more information about an error, try `rustc --explain E0277`. \ No newline at end of file diff --git a/tests/ui/error-emitter/unicode-output.svg b/tests/ui/error-emitter/unicode-output.svg index b253fff643b0f..f484212d82235 100644 --- a/tests/ui/error-emitter/unicode-output.svg +++ b/tests/ui/error-emitter/unicode-output.svg @@ -1,72 +1 @@ - - - - - - - error[E0308]: mismatched types - - ╭▸ $DIR/unicode-output.rs:20:11 - - - - LL query(wrapped_fn); - - ┬──── ━━━━━━━━━━ one type is more general than the other - - - - arguments to this function are incorrect - - - - note: expected fn pointer `for<'a> fn(Box<(dyn Any + Send + 'a)>) -> Pin<_>` - - found fn item `fn(Box<(dyn Any + Send + 'static)>) -> Pin<_> {wrapped_fn}` - - note: function defined here - - ╭▸ $DIR/unicode-output.rs:9:4 - - - - LL fn query(_: fn(Box<(dyn Any + Send + '_)>) -> Pin<Box<( - - ┌────━━━━━─┘ - - LL dyn Future<Output = Result<Box<(dyn Any + 'static)>, String>> + Send + 'static - - LL )>>) {} - - ╰╴└───┘ - - - - error: aborting due to 1 previous error - - - - For more information about this error, try `rustc --explain E0308`. - - - - - - +error[E0308]: mismatched types ╭▸ $DIR/unicode-output.rs:20:11 LL query(wrapped_fn); ┬──── ━━━━━━━━━━ one type is more general than the other arguments to this function are incorrect note: expected fn pointer `for<'a> fn(Box<(dyn Any + Send + 'a)>) -> Pin<_>` found fn item `fn(Box<(dyn Any + Send + 'static)>) -> Pin<_> {wrapped_fn}` note: function defined here ╭▸ $DIR/unicode-output.rs:9:4 LL fn query(_: fn(Box<(dyn Any + Send + '_)>) -> Pin<Box<( ┌────━━━━━─┘ LL dyn Future<Output = Result<Box<(dyn Any + 'static)>, String>> + Send + 'static LL )>>) {} ╰╴└───┘ error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. \ No newline at end of file diff --git a/tests/ui/suggestions/incorrect-variant-literal.svg b/tests/ui/suggestions/incorrect-variant-literal.svg index 279fd30f2165c..1527506b11b7b 100644 --- a/tests/ui/suggestions/incorrect-variant-literal.svg +++ b/tests/ui/suggestions/incorrect-variant-literal.svg @@ -1,1082 +1 @@ - - - - - - - error[E0533]: expected value, found struct variant `Enum::Struct` - - --> $DIR/incorrect-variant-literal.rs:13:5 - - | - - LL | Enum::Struct; - - | ^^^^^^^^^^^^ not a value - - | - - help: you might have meant to create a new value of the struct - - | - - LL | Enum::Struct { x: /* value */ }; - - | ++++++++++++++++++ - - - - error[E0618]: expected function, found enum variant `Enum::Unit` - - --> $DIR/incorrect-variant-literal.rs:14:5 - - | - - LL | Unit, - - | ---- enum variant `Enum::Unit` defined here - - ... - - LL | Enum::Unit(); - - | ^^^^^^^^^^-- - - | | - - | call expression requires function - - | - - help: `Enum::Unit` is a unit enum variant, and does not take parentheses to be constructed - - | - - LL - Enum::Unit(); - - LL + Enum::Unit; - - | - - - - error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied - - --> $DIR/incorrect-variant-literal.rs:15:5 - - | - - LL | Enum::Tuple(); - - | ^^^^^^^^^^^-- argument #1 of type `i32` is missing - - | - - note: tuple variant defined here - - --> $DIR/incorrect-variant-literal.rs:6:5 - - | - - LL | Tuple(i32), - - | ^^^^^ - - help: provide the argument - - | - - LL | Enum::Tuple(/* i32 */); - - | +++++++++ - - - - error[E0533]: expected value, found struct variant `Enum::Struct` - - --> $DIR/incorrect-variant-literal.rs:16:5 - - | - - LL | Enum::Struct(); - - | ^^^^^^^^^^^^ not a value - - | - - help: you might have meant to create a new value of the struct - - | - - LL - Enum::Struct(); - - LL + Enum::Struct { x: /* value */ }; - - | - - - - error[E0063]: missing field `0` in initializer of `Enum` - - --> $DIR/incorrect-variant-literal.rs:18:5 - - | - - LL | Enum::Tuple {}; - - | ^^^^^^^^^^^ missing `0` - - - - error[E0063]: missing field `x` in initializer of `Enum` - - --> $DIR/incorrect-variant-literal.rs:19:5 - - | - - LL | Enum::Struct {}; - - | ^^^^^^^^^^^^ missing `x` - - - - error[E0618]: expected function, found `Enum` - - --> $DIR/incorrect-variant-literal.rs:20:5 - - | - - LL | Unit, - - | ---- `Enum::Unit` defined here - - ... - - LL | Enum::Unit(0); - - | ^^^^^^^^^^--- - - | | - - | call expression requires function - - - - error[E0533]: expected value, found struct variant `Enum::Struct` - - --> $DIR/incorrect-variant-literal.rs:22:5 - - | - - LL | Enum::Struct(0); - - | ^^^^^^^^^^^^ not a value - - | - - help: you might have meant to create a new value of the struct - - | - - LL - Enum::Struct(0); - - LL + Enum::Struct { x: /* value */ }; - - | - - - - error[E0559]: variant `Enum::Unit` has no field named `x` - - --> $DIR/incorrect-variant-literal.rs:23:18 - - | - - LL | Enum::Unit { x: 0 }; - - | ^ `Enum::Unit` does not have this field - - | - - = note: all struct fields are already assigned - - - - error[E0559]: variant `Enum::Tuple` has no field named `x` - - --> $DIR/incorrect-variant-literal.rs:24:19 - - | - - LL | Tuple(i32), - - | ----- `Enum::Tuple` defined here - - ... - - LL | Enum::Tuple { x: 0 }; - - | ^ field does not exist - - | - - help: `Enum::Tuple` is a tuple variant, use the appropriate syntax - - | - - LL - Enum::Tuple { x: 0 }; - - LL + Enum::Tuple(/* i32 */); - - | - - - - error[E0618]: expected function, found `Enum` - - --> $DIR/incorrect-variant-literal.rs:26:5 - - | - - LL | Unit, - - | ---- `Enum::Unit` defined here - - ... - - LL | Enum::Unit(0, 0); - - | ^^^^^^^^^^------ - - | | - - | call expression requires function - - - - error[E0061]: this enum variant takes 1 argument but 2 arguments were supplied - - --> $DIR/incorrect-variant-literal.rs:27:5 - - | - - LL | Enum::Tuple(0, 0); - - | ^^^^^^^^^^^ - unexpected argument #2 of type `{integer}` - - | - - note: tuple variant defined here - - --> $DIR/incorrect-variant-literal.rs:6:5 - - | - - LL | Tuple(i32), - - | ^^^^^ - - help: remove the extra argument - - | - - LL - Enum::Tuple(0, 0); - - LL + Enum::Tuple(0); - - | - - - - error[E0533]: expected value, found struct variant `Enum::Struct` - - --> $DIR/incorrect-variant-literal.rs:28:5 - - | - - LL | Enum::Struct(0, 0); - - | ^^^^^^^^^^^^ not a value - - | - - help: you might have meant to create a new value of the struct - - | - - LL - Enum::Struct(0, 0); - - LL + Enum::Struct { x: /* value */ }; - - | - - - - error[E0559]: variant `Enum::Unit` has no field named `x` - - --> $DIR/incorrect-variant-literal.rs:29:18 - - | - - LL | Enum::Unit { x: 0, y: 0 }; - - | ^ `Enum::Unit` does not have this field - - | - - = note: all struct fields are already assigned - - - - error[E0559]: variant `Enum::Unit` has no field named `y` - - --> $DIR/incorrect-variant-literal.rs:29:24 - - | - - LL | Enum::Unit { x: 0, y: 0 }; - - | ^ `Enum::Unit` does not have this field - - | - - = note: all struct fields are already assigned - - - - error[E0559]: variant `Enum::Tuple` has no field named `x` - - --> $DIR/incorrect-variant-literal.rs:31:19 - - | - - LL | Tuple(i32), - - | ----- `Enum::Tuple` defined here - - ... - - LL | Enum::Tuple { x: 0, y: 0 }; - - | ^ field does not exist - - | - - help: `Enum::Tuple` is a tuple variant, use the appropriate syntax - - | - - LL - Enum::Tuple { x: 0, y: 0 }; - - LL + Enum::Tuple(/* i32 */); - - | - - - - error[E0559]: variant `Enum::Tuple` has no field named `y` - - --> $DIR/incorrect-variant-literal.rs:31:25 - - | - - LL | Tuple(i32), - - | ----- `Enum::Tuple` defined here - - ... - - LL | Enum::Tuple { x: 0, y: 0 }; - - | ^ field does not exist - - | - - help: `Enum::Tuple` is a tuple variant, use the appropriate syntax - - | - - LL - Enum::Tuple { x: 0, y: 0 }; - - LL + Enum::Tuple(/* i32 */); - - | - - - - error[E0559]: variant `Enum::Struct` has no field named `y` - - --> $DIR/incorrect-variant-literal.rs:33:26 - - | - - LL | Enum::Struct { x: 0, y: 0 }; - - | ^ `Enum::Struct` does not have this field - - | - - = note: all struct fields are already assigned - - - - error[E0599]: no variant or associated item named `unit` found for enum `Enum` in the current scope - - --> $DIR/incorrect-variant-literal.rs:34:11 - - | - - LL | enum Enum { - - | --------- variant or associated item `unit` not found for this enum - - ... - - LL | Enum::unit; - - | ^^^^ variant or associated item not found in `Enum` - - | - - help: there is a variant with a similar name (notice the capitalization difference) - - | - - LL - Enum::unit; - - LL + Enum::Unit; - - | - - - - error[E0599]: no variant or associated item named `tuple` found for enum `Enum` in the current scope - - --> $DIR/incorrect-variant-literal.rs:35:11 - - | - - LL | enum Enum { - - | --------- variant or associated item `tuple` not found for this enum - - ... - - LL | Enum::tuple; - - | ^^^^^ variant or associated item not found in `Enum` - - | - - help: there is a variant with a similar name - - | - - LL - Enum::tuple; - - LL + Enum::Tuple(/* i32 */); - - | - - - - error[E0599]: no variant or associated item named `r#struct` found for enum `Enum` in the current scope - - --> $DIR/incorrect-variant-literal.rs:36:11 - - | - - LL | enum Enum { - - | --------- variant or associated item `r#struct` not found for this enum - - ... - - LL | Enum::r#struct; - - | ^^^^^^^^ variant or associated item not found in `Enum` - - | - - help: there is a variant with a similar name - - | - - LL - Enum::r#struct; - - LL + Enum::Struct { x: /* value */ }; - - | - - - - error[E0599]: no variant or associated item named `unit` found for enum `Enum` in the current scope - - --> $DIR/incorrect-variant-literal.rs:37:11 - - | - - LL | enum Enum { - - | --------- variant or associated item `unit` not found for this enum - - ... - - LL | Enum::unit(); - - | ^^^^ variant or associated item not found in `Enum` - - | - - help: there is a variant with a similar name - - | - - LL - Enum::unit(); - - LL + Enum::Unit; - - | - - - - error[E0599]: no variant or associated item named `tuple` found for enum `Enum` in the current scope - - --> $DIR/incorrect-variant-literal.rs:38:11 - - | - - LL | enum Enum { - - | --------- variant or associated item `tuple` not found for this enum - - ... - - LL | Enum::tuple(); - - | ^^^^^ variant or associated item not found in `Enum` - - | - - help: there is a variant with a similar name - - | - - LL - Enum::tuple(); - - LL + Enum::Tuple(/* i32 */); - - | - - - - error[E0599]: no variant or associated item named `r#struct` found for enum `Enum` in the current scope - - --> $DIR/incorrect-variant-literal.rs:39:11 - - | - - LL | enum Enum { - - | --------- variant or associated item `r#struct` not found for this enum - - ... - - LL | Enum::r#struct(); - - | ^^^^^^^^ variant or associated item not found in `Enum` - - | - - help: there is a variant with a similar name - - | - - LL - Enum::r#struct(); - - LL + Enum::Struct { x: /* value */ }; - - | - - - - error[E0599]: no variant named `unit` found for enum `Enum` - - --> $DIR/incorrect-variant-literal.rs:40:11 - - | - - LL | enum Enum { - - | --------- variant `unit` not found here - - ... - - LL | Enum::unit {}; - - | ^^^^ - - | - - help: there is a variant with a similar name - - | - - LL - Enum::unit {}; - - LL + Enum::Unit; - - | - - - - error[E0599]: no variant named `tuple` found for enum `Enum` - - --> $DIR/incorrect-variant-literal.rs:41:11 - - | - - LL | enum Enum { - - | --------- variant `tuple` not found here - - ... - - LL | Enum::tuple {}; - - | ^^^^^ - - | - - help: there is a variant with a similar name - - | - - LL - Enum::tuple {}; - - LL + Enum::Tuple(/* i32 */); - - | - - - - error[E0599]: no variant named `r#struct` found for enum `Enum` - - --> $DIR/incorrect-variant-literal.rs:42:11 - - | - - LL | enum Enum { - - | --------- variant `r#struct` not found here - - ... - - LL | Enum::r#struct {}; - - | ^^^^^^^^ - - | - - help: there is a variant with a similar name - - | - - LL - Enum::r#struct {}; - - LL + Enum::Struct { x: /* value */ }; - - | - - - - error[E0599]: no variant or associated item named `unit` found for enum `Enum` in the current scope - - --> $DIR/incorrect-variant-literal.rs:43:11 - - | - - LL | enum Enum { - - | --------- variant or associated item `unit` not found for this enum - - ... - - LL | Enum::unit(0); - - | ^^^^ variant or associated item not found in `Enum` - - | - - help: there is a variant with a similar name - - | - - LL - Enum::unit(0); - - LL + Enum::Unit; - - | - - - - error[E0599]: no variant or associated item named `tuple` found for enum `Enum` in the current scope - - --> $DIR/incorrect-variant-literal.rs:44:11 - - | - - LL | enum Enum { - - | --------- variant or associated item `tuple` not found for this enum - - ... - - LL | Enum::tuple(0); - - | ^^^^^ variant or associated item not found in `Enum` - - | - - help: there is a variant with a similar name - - | - - LL - Enum::tuple(0); - - LL + Enum::Tuple(0); - - | - - - - error[E0599]: no variant or associated item named `r#struct` found for enum `Enum` in the current scope - - --> $DIR/incorrect-variant-literal.rs:45:11 - - | - - LL | enum Enum { - - | --------- variant or associated item `r#struct` not found for this enum - - ... - - LL | Enum::r#struct(0); - - | ^^^^^^^^ variant or associated item not found in `Enum` - - | - - help: there is a variant with a similar name - - | - - LL - Enum::r#struct(0); - - LL + Enum::Struct { x: /* value */ }; - - | - - - - error[E0599]: no variant named `unit` found for enum `Enum` - - --> $DIR/incorrect-variant-literal.rs:46:11 - - | - - LL | enum Enum { - - | --------- variant `unit` not found here - - ... - - LL | Enum::unit { x: 0 }; - - | ^^^^ - - | - - help: there is a variant with a similar name - - | - - LL - Enum::unit { x: 0 }; - - LL + Enum::Unit; - - | - - - - error[E0599]: no variant named `tuple` found for enum `Enum` - - --> $DIR/incorrect-variant-literal.rs:47:11 - - | - - LL | enum Enum { - - | --------- variant `tuple` not found here - - ... - - LL | Enum::tuple { x: 0 }; - - | ^^^^^ - - | - - help: there is a variant with a similar name - - | - - LL - Enum::tuple { x: 0 }; - - LL + Enum::Tuple(/* i32 */); - - | - - - - error[E0599]: no variant named `r#struct` found for enum `Enum` - - --> $DIR/incorrect-variant-literal.rs:48:11 - - | - - LL | enum Enum { - - | --------- variant `r#struct` not found here - - ... - - LL | Enum::r#struct { x: 0 }; - - | ^^^^^^^^ - - | - - help: there is a variant with a similar name - - | - - LL - Enum::r#struct { x: 0 }; - - LL + Enum::Struct { x: /* value */ }; - - | - - - - error[E0599]: no variant or associated item named `unit` found for enum `Enum` in the current scope - - --> $DIR/incorrect-variant-literal.rs:49:11 - - | - - LL | enum Enum { - - | --------- variant or associated item `unit` not found for this enum - - ... - - LL | Enum::unit(0, 0); - - | ^^^^ variant or associated item not found in `Enum` - - | - - help: there is a variant with a similar name - - | - - LL - Enum::unit(0, 0); - - LL + Enum::Unit; - - | - - - - error[E0599]: no variant or associated item named `tuple` found for enum `Enum` in the current scope - - --> $DIR/incorrect-variant-literal.rs:50:11 - - | - - LL | enum Enum { - - | --------- variant or associated item `tuple` not found for this enum - - ... - - LL | Enum::tuple(0, 0); - - | ^^^^^ variant or associated item not found in `Enum` - - | - - help: there is a variant with a similar name - - | - - LL - Enum::tuple(0, 0); - - LL + Enum::Tuple(/* i32 */); - - | - - - - error[E0599]: no variant or associated item named `r#struct` found for enum `Enum` in the current scope - - --> $DIR/incorrect-variant-literal.rs:51:11 - - | - - LL | enum Enum { - - | --------- variant or associated item `r#struct` not found for this enum - - ... - - LL | Enum::r#struct(0, 0); - - | ^^^^^^^^ variant or associated item not found in `Enum` - - | - - help: there is a variant with a similar name - - | - - LL - Enum::r#struct(0, 0); - - LL + Enum::Struct { x: /* value */ }; - - | - - - - error[E0599]: no variant named `unit` found for enum `Enum` - - --> $DIR/incorrect-variant-literal.rs:52:11 - - | - - LL | enum Enum { - - | --------- variant `unit` not found here - - ... - - LL | Enum::unit { x: 0, y: 0 }; - - | ^^^^ - - | - - help: there is a variant with a similar name - - | - - LL - Enum::unit { x: 0, y: 0 }; - - LL + Enum::Unit; - - | - - - - error[E0599]: no variant named `tuple` found for enum `Enum` - - --> $DIR/incorrect-variant-literal.rs:53:11 - - | - - LL | enum Enum { - - | --------- variant `tuple` not found here - - ... - - LL | Enum::tuple { x: 0, y: 0 }; - - | ^^^^^ - - | - - help: there is a variant with a similar name - - | - - LL - Enum::tuple { x: 0, y: 0 }; - - LL + Enum::Tuple(/* i32 */); - - | - - - - error[E0599]: no variant named `r#struct` found for enum `Enum` - - --> $DIR/incorrect-variant-literal.rs:54:11 - - | - - LL | enum Enum { - - | --------- variant `r#struct` not found here - - ... - - LL | Enum::r#struct { x: 0, y: 0 }; - - | ^^^^^^^^ - - | - - help: there is a variant with a similar name - - | - - LL - Enum::r#struct { x: 0, y: 0 }; - - LL + Enum::Struct { x: /* value */ }; - - | - - - - error: aborting due to 39 previous errors - - - - Some errors have detailed explanations: E0061, E0063, E0533, E0559, E0599, E0618. - - For more information about an error, try `rustc --explain E0061`. - - - - - - +error[E0533]: expected value, found struct variant `Enum::Struct` --> $DIR/incorrect-variant-literal.rs:13:5 | LL | Enum::Struct; | ^^^^^^^^^^^^ not a value | help: you might have meant to create a new value of the struct | LL | Enum::Struct { x: /* value */ }; | ++++++++++++++++++ error[E0618]: expected function, found enum variant `Enum::Unit` --> $DIR/incorrect-variant-literal.rs:14:5 | LL | Unit, | ---- enum variant `Enum::Unit` defined here ... LL | Enum::Unit(); | ^^^^^^^^^^-- | | | call expression requires function | help: `Enum::Unit` is a unit enum variant, and does not take parentheses to be constructed | LL - Enum::Unit(); LL + Enum::Unit; | error[E0061]: this enum variant takes 1 argument but 0 arguments were supplied --> $DIR/incorrect-variant-literal.rs:15:5 | LL | Enum::Tuple(); | ^^^^^^^^^^^-- argument #1 of type `i32` is missing | note: tuple variant defined here --> $DIR/incorrect-variant-literal.rs:6:5 | LL | Tuple(i32), | ^^^^^ help: provide the argument | LL | Enum::Tuple(/* i32 */); | +++++++++ error[E0533]: expected value, found struct variant `Enum::Struct` --> $DIR/incorrect-variant-literal.rs:16:5 | LL | Enum::Struct(); | ^^^^^^^^^^^^ not a value | help: you might have meant to create a new value of the struct | LL - Enum::Struct(); LL + Enum::Struct { x: /* value */ }; | error[E0063]: missing field `0` in initializer of `Enum` --> $DIR/incorrect-variant-literal.rs:18:5 | LL | Enum::Tuple {}; | ^^^^^^^^^^^ missing `0` error[E0063]: missing field `x` in initializer of `Enum` --> $DIR/incorrect-variant-literal.rs:19:5 | LL | Enum::Struct {}; | ^^^^^^^^^^^^ missing `x` error[E0618]: expected function, found `Enum` --> $DIR/incorrect-variant-literal.rs:20:5 | LL | Unit, | ---- `Enum::Unit` defined here ... LL | Enum::Unit(0); | ^^^^^^^^^^--- | | | call expression requires function error[E0533]: expected value, found struct variant `Enum::Struct` --> $DIR/incorrect-variant-literal.rs:22:5 | LL | Enum::Struct(0); | ^^^^^^^^^^^^ not a value | help: you might have meant to create a new value of the struct | LL - Enum::Struct(0); LL + Enum::Struct { x: /* value */ }; | error[E0559]: variant `Enum::Unit` has no field named `x` --> $DIR/incorrect-variant-literal.rs:23:18 | LL | Enum::Unit { x: 0 }; | ^ `Enum::Unit` does not have this field | = note: all struct fields are already assigned error[E0559]: variant `Enum::Tuple` has no field named `x` --> $DIR/incorrect-variant-literal.rs:24:19 | LL | Tuple(i32), | ----- `Enum::Tuple` defined here ... LL | Enum::Tuple { x: 0 }; | ^ field does not exist | help: `Enum::Tuple` is a tuple variant, use the appropriate syntax | LL - Enum::Tuple { x: 0 }; LL + Enum::Tuple(/* i32 */); | error[E0618]: expected function, found `Enum` --> $DIR/incorrect-variant-literal.rs:26:5 | LL | Unit, | ---- `Enum::Unit` defined here ... LL | Enum::Unit(0, 0); | ^^^^^^^^^^------ | | | call expression requires function error[E0061]: this enum variant takes 1 argument but 2 arguments were supplied --> $DIR/incorrect-variant-literal.rs:27:5 | LL | Enum::Tuple(0, 0); | ^^^^^^^^^^^ - unexpected argument #2 of type `{integer}` | note: tuple variant defined here --> $DIR/incorrect-variant-literal.rs:6:5 | LL | Tuple(i32), | ^^^^^ help: remove the extra argument | LL - Enum::Tuple(0, 0); LL + Enum::Tuple(0); | error[E0533]: expected value, found struct variant `Enum::Struct` --> $DIR/incorrect-variant-literal.rs:28:5 | LL | Enum::Struct(0, 0); | ^^^^^^^^^^^^ not a value | help: you might have meant to create a new value of the struct | LL - Enum::Struct(0, 0); LL + Enum::Struct { x: /* value */ }; | error[E0559]: variant `Enum::Unit` has no field named `x` --> $DIR/incorrect-variant-literal.rs:29:18 | LL | Enum::Unit { x: 0, y: 0 }; | ^ `Enum::Unit` does not have this field | = note: all struct fields are already assigned error[E0559]: variant `Enum::Unit` has no field named `y` --> $DIR/incorrect-variant-literal.rs:29:24 | LL | Enum::Unit { x: 0, y: 0 }; | ^ `Enum::Unit` does not have this field | = note: all struct fields are already assigned error[E0559]: variant `Enum::Tuple` has no field named `x` --> $DIR/incorrect-variant-literal.rs:31:19 | LL | Tuple(i32), | ----- `Enum::Tuple` defined here ... LL | Enum::Tuple { x: 0, y: 0 }; | ^ field does not exist | help: `Enum::Tuple` is a tuple variant, use the appropriate syntax | LL - Enum::Tuple { x: 0, y: 0 }; LL + Enum::Tuple(/* i32 */); | error[E0559]: variant `Enum::Tuple` has no field named `y` --> $DIR/incorrect-variant-literal.rs:31:25 | LL | Tuple(i32), | ----- `Enum::Tuple` defined here ... LL | Enum::Tuple { x: 0, y: 0 }; | ^ field does not exist | help: `Enum::Tuple` is a tuple variant, use the appropriate syntax | LL - Enum::Tuple { x: 0, y: 0 }; LL + Enum::Tuple(/* i32 */); | error[E0559]: variant `Enum::Struct` has no field named `y` --> $DIR/incorrect-variant-literal.rs:33:26 | LL | Enum::Struct { x: 0, y: 0 }; | ^ `Enum::Struct` does not have this field | = note: all struct fields are already assigned error[E0599]: no variant or associated item named `unit` found for enum `Enum` in the current scope --> $DIR/incorrect-variant-literal.rs:34:11 | LL | enum Enum { | --------- variant or associated item `unit` not found for this enum ... LL | Enum::unit; | ^^^^ variant or associated item not found in `Enum` | help: there is a variant with a similar name (notice the capitalization difference) | LL - Enum::unit; LL + Enum::Unit; | error[E0599]: no variant or associated item named `tuple` found for enum `Enum` in the current scope --> $DIR/incorrect-variant-literal.rs:35:11 | LL | enum Enum { | --------- variant or associated item `tuple` not found for this enum ... LL | Enum::tuple; | ^^^^^ variant or associated item not found in `Enum` | help: there is a variant with a similar name | LL - Enum::tuple; LL + Enum::Tuple(/* i32 */); | error[E0599]: no variant or associated item named `r#struct` found for enum `Enum` in the current scope --> $DIR/incorrect-variant-literal.rs:36:11 | LL | enum Enum { | --------- variant or associated item `r#struct` not found for this enum ... LL | Enum::r#struct; | ^^^^^^^^ variant or associated item not found in `Enum` | help: there is a variant with a similar name | LL - Enum::r#struct; LL + Enum::Struct { x: /* value */ }; | error[E0599]: no variant or associated item named `unit` found for enum `Enum` in the current scope --> $DIR/incorrect-variant-literal.rs:37:11 | LL | enum Enum { | --------- variant or associated item `unit` not found for this enum ... LL | Enum::unit(); | ^^^^ variant or associated item not found in `Enum` | help: there is a variant with a similar name | LL - Enum::unit(); LL + Enum::Unit; | error[E0599]: no variant or associated item named `tuple` found for enum `Enum` in the current scope --> $DIR/incorrect-variant-literal.rs:38:11 | LL | enum Enum { | --------- variant or associated item `tuple` not found for this enum ... LL | Enum::tuple(); | ^^^^^ variant or associated item not found in `Enum` | help: there is a variant with a similar name | LL - Enum::tuple(); LL + Enum::Tuple(/* i32 */); | error[E0599]: no variant or associated item named `r#struct` found for enum `Enum` in the current scope --> $DIR/incorrect-variant-literal.rs:39:11 | LL | enum Enum { | --------- variant or associated item `r#struct` not found for this enum ... LL | Enum::r#struct(); | ^^^^^^^^ variant or associated item not found in `Enum` | help: there is a variant with a similar name | LL - Enum::r#struct(); LL + Enum::Struct { x: /* value */ }; | error[E0599]: no variant named `unit` found for enum `Enum` --> $DIR/incorrect-variant-literal.rs:40:11 | LL | enum Enum { | --------- variant `unit` not found here ... LL | Enum::unit {}; | ^^^^ | help: there is a variant with a similar name | LL - Enum::unit {}; LL + Enum::Unit; | error[E0599]: no variant named `tuple` found for enum `Enum` --> $DIR/incorrect-variant-literal.rs:41:11 | LL | enum Enum { | --------- variant `tuple` not found here ... LL | Enum::tuple {}; | ^^^^^ | help: there is a variant with a similar name | LL - Enum::tuple {}; LL + Enum::Tuple(/* i32 */); | error[E0599]: no variant named `r#struct` found for enum `Enum` --> $DIR/incorrect-variant-literal.rs:42:11 | LL | enum Enum { | --------- variant `r#struct` not found here ... LL | Enum::r#struct {}; | ^^^^^^^^ | help: there is a variant with a similar name | LL - Enum::r#struct {}; LL + Enum::Struct { x: /* value */ }; | error[E0599]: no variant or associated item named `unit` found for enum `Enum` in the current scope --> $DIR/incorrect-variant-literal.rs:43:11 | LL | enum Enum { | --------- variant or associated item `unit` not found for this enum ... LL | Enum::unit(0); | ^^^^ variant or associated item not found in `Enum` | help: there is a variant with a similar name | LL - Enum::unit(0); LL + Enum::Unit; | error[E0599]: no variant or associated item named `tuple` found for enum `Enum` in the current scope --> $DIR/incorrect-variant-literal.rs:44:11 | LL | enum Enum { | --------- variant or associated item `tuple` not found for this enum ... LL | Enum::tuple(0); | ^^^^^ variant or associated item not found in `Enum` | help: there is a variant with a similar name | LL - Enum::tuple(0); LL + Enum::Tuple(0); | error[E0599]: no variant or associated item named `r#struct` found for enum `Enum` in the current scope --> $DIR/incorrect-variant-literal.rs:45:11 | LL | enum Enum { | --------- variant or associated item `r#struct` not found for this enum ... LL | Enum::r#struct(0); | ^^^^^^^^ variant or associated item not found in `Enum` | help: there is a variant with a similar name | LL - Enum::r#struct(0); LL + Enum::Struct { x: /* value */ }; | error[E0599]: no variant named `unit` found for enum `Enum` --> $DIR/incorrect-variant-literal.rs:46:11 | LL | enum Enum { | --------- variant `unit` not found here ... LL | Enum::unit { x: 0 }; | ^^^^ | help: there is a variant with a similar name | LL - Enum::unit { x: 0 }; LL + Enum::Unit; | error[E0599]: no variant named `tuple` found for enum `Enum` --> $DIR/incorrect-variant-literal.rs:47:11 | LL | enum Enum { | --------- variant `tuple` not found here ... LL | Enum::tuple { x: 0 }; | ^^^^^ | help: there is a variant with a similar name | LL - Enum::tuple { x: 0 }; LL + Enum::Tuple(/* i32 */); | error[E0599]: no variant named `r#struct` found for enum `Enum` --> $DIR/incorrect-variant-literal.rs:48:11 | LL | enum Enum { | --------- variant `r#struct` not found here ... LL | Enum::r#struct { x: 0 }; | ^^^^^^^^ | help: there is a variant with a similar name | LL - Enum::r#struct { x: 0 }; LL + Enum::Struct { x: /* value */ }; | error[E0599]: no variant or associated item named `unit` found for enum `Enum` in the current scope --> $DIR/incorrect-variant-literal.rs:49:11 | LL | enum Enum { | --------- variant or associated item `unit` not found for this enum ... LL | Enum::unit(0, 0); | ^^^^ variant or associated item not found in `Enum` | help: there is a variant with a similar name | LL - Enum::unit(0, 0); LL + Enum::Unit; | error[E0599]: no variant or associated item named `tuple` found for enum `Enum` in the current scope --> $DIR/incorrect-variant-literal.rs:50:11 | LL | enum Enum { | --------- variant or associated item `tuple` not found for this enum ... LL | Enum::tuple(0, 0); | ^^^^^ variant or associated item not found in `Enum` | help: there is a variant with a similar name | LL - Enum::tuple(0, 0); LL + Enum::Tuple(/* i32 */); | error[E0599]: no variant or associated item named `r#struct` found for enum `Enum` in the current scope --> $DIR/incorrect-variant-literal.rs:51:11 | LL | enum Enum { | --------- variant or associated item `r#struct` not found for this enum ... LL | Enum::r#struct(0, 0); | ^^^^^^^^ variant or associated item not found in `Enum` | help: there is a variant with a similar name | LL - Enum::r#struct(0, 0); LL + Enum::Struct { x: /* value */ }; | error[E0599]: no variant named `unit` found for enum `Enum` --> $DIR/incorrect-variant-literal.rs:52:11 | LL | enum Enum { | --------- variant `unit` not found here ... LL | Enum::unit { x: 0, y: 0 }; | ^^^^ | help: there is a variant with a similar name | LL - Enum::unit { x: 0, y: 0 }; LL + Enum::Unit; | error[E0599]: no variant named `tuple` found for enum `Enum` --> $DIR/incorrect-variant-literal.rs:53:11 | LL | enum Enum { | --------- variant `tuple` not found here ... LL | Enum::tuple { x: 0, y: 0 }; | ^^^^^ | help: there is a variant with a similar name | LL - Enum::tuple { x: 0, y: 0 }; LL + Enum::Tuple(/* i32 */); | error[E0599]: no variant named `r#struct` found for enum `Enum` --> $DIR/incorrect-variant-literal.rs:54:11 | LL | enum Enum { | --------- variant `r#struct` not found here ... LL | Enum::r#struct { x: 0, y: 0 }; | ^^^^^^^^ | help: there is a variant with a similar name | LL - Enum::r#struct { x: 0, y: 0 }; LL + Enum::Struct { x: /* value */ }; | error: aborting due to 39 previous errors Some errors have detailed explanations: E0061, E0063, E0533, E0559, E0599, E0618. For more information about an error, try `rustc --explain E0061`. \ No newline at end of file