diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs index af8713ba3ff9..f05e91a29954 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs @@ -4592,7 +4592,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> { .join(", "), if tys.len() == 1 { "," } else { "" } ), - _ => "value".to_string(), + _ => "/* value */".to_string(), }) } } diff --git a/tests/ui/borrowck/borrowck-init-in-fru.stderr b/tests/ui/borrowck/borrowck-init-in-fru.stderr index b5c332a90bcd..bfa86b44fe9d 100644 --- a/tests/ui/borrowck/borrowck-init-in-fru.stderr +++ b/tests/ui/borrowck/borrowck-init-in-fru.stderr @@ -8,8 +8,8 @@ LL | origin = Point { x: 10, ..origin }; | help: consider assigning a value | -LL | let mut origin: Point = value; - | +++++++ +LL | let mut origin: Point = /* value */; + | +++++++++++++ error: aborting due to 1 previous error diff --git a/tests/ui/borrowck/borrowck-uninit-ref-chain.stderr b/tests/ui/borrowck/borrowck-uninit-ref-chain.stderr index d6759b8e1cf4..b1d508e2ac39 100644 --- a/tests/ui/borrowck/borrowck-uninit-ref-chain.stderr +++ b/tests/ui/borrowck/borrowck-uninit-ref-chain.stderr @@ -21,8 +21,8 @@ LL | let _y = &**x; | help: consider assigning a value | -LL | let x: &&S = &&value; - | +++++++++ +LL | let x: &&S = &&/* value */; + | +++++++++++++++ error[E0381]: used binding `x` isn't initialized --> $DIR/borrowck-uninit-ref-chain.rs:14:14 diff --git a/tests/ui/borrowck/issue-103250.stderr b/tests/ui/borrowck/issue-103250.stderr index 104bded5b0b5..cd048e03a678 100644 --- a/tests/ui/borrowck/issue-103250.stderr +++ b/tests/ui/borrowck/issue-103250.stderr @@ -9,8 +9,8 @@ LL | Err(last_error) | help: consider assigning a value | -LL | let mut last_error: Box = Box::new(value); - | +++++++++++++++++ +LL | let mut last_error: Box = Box::new(/* value */); + | +++++++++++++++++++++++ error: aborting due to 1 previous error diff --git a/tests/ui/borrowck/suggest-assign-rvalue.stderr b/tests/ui/borrowck/suggest-assign-rvalue.stderr index 4305539f1b62..daaef6e3892d 100644 --- a/tests/ui/borrowck/suggest-assign-rvalue.stderr +++ b/tests/ui/borrowck/suggest-assign-rvalue.stderr @@ -50,8 +50,8 @@ LL | println!("demo_no: {:?}", demo_no); = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider assigning a value | -LL | let demo_no: DemoNoDef = value; - | +++++++ +LL | let demo_no: DemoNoDef = /* value */; + | +++++++++++++ error[E0381]: used binding `arr` isn't initialized --> $DIR/suggest-assign-rvalue.rs:34:27 diff --git a/tests/ui/consts/value-suggestion-ice-123906.stderr b/tests/ui/consts/value-suggestion-ice-123906.stderr index 8e2c316400d6..edb91063e5d4 100644 --- a/tests/ui/consts/value-suggestion-ice-123906.stderr +++ b/tests/ui/consts/value-suggestion-ice-123906.stderr @@ -10,8 +10,8 @@ LL | break; | help: give the `break` a value of the expected type | -LL | break value; - | +++++ +LL | break /* value */; + | +++++++++++ error: aborting due to 1 previous error diff --git a/tests/ui/loops/loop-break-value.stderr b/tests/ui/loops/loop-break-value.stderr index 0093182422e1..0912bdbb221e 100644 --- a/tests/ui/loops/loop-break-value.stderr +++ b/tests/ui/loops/loop-break-value.stderr @@ -246,8 +246,8 @@ LL | break; | help: give the `break` a value of the expected type | -LL | break value; - | +++++ +LL | break /* value */; + | +++++++++++ error[E0308]: mismatched types --> $DIR/loop-break-value.rs:112:9 @@ -260,8 +260,8 @@ LL | break; | help: give the `break` a value of the expected type | -LL | break value; - | +++++ +LL | break /* value */; + | +++++++++++ error[E0308]: mismatched types --> $DIR/loop-break-value.rs:124:9 @@ -274,8 +274,8 @@ LL | break 'a; | help: give the `break` a value of the expected type | -LL | break 'a value; - | +++++ +LL | break 'a /* value */; + | +++++++++++ error[E0308]: mismatched types --> $DIR/loop-break-value.rs:135:15 @@ -297,8 +297,8 @@ LL | break 'a; | help: give the `break` a value of the expected type | -LL | break 'a value; - | +++++ +LL | break 'a /* value */; + | +++++++++++ error[E0308]: mismatched types --> $DIR/loop-break-value.rs:147:15 @@ -320,8 +320,8 @@ LL | break 'a; | help: give the `break` a value of the expected type | -LL | break 'a value; - | +++++ +LL | break 'a /* value */; + | +++++++++++ error[E0308]: mismatched types --> $DIR/loop-break-value.rs:159:15 diff --git a/tests/ui/moves/issue-72649-uninit-in-loop.stderr b/tests/ui/moves/issue-72649-uninit-in-loop.stderr index 35216f8a66f5..a613f35a35e0 100644 --- a/tests/ui/moves/issue-72649-uninit-in-loop.stderr +++ b/tests/ui/moves/issue-72649-uninit-in-loop.stderr @@ -80,8 +80,8 @@ LL | let _used = value; | help: consider assigning a value | -LL | let value: NonCopy = value; - | +++++++ +LL | let value: NonCopy = /* value */; + | +++++++++++++ error[E0381]: used binding `value` isn't initialized --> $DIR/issue-72649-uninit-in-loop.rs:73:21 @@ -94,8 +94,8 @@ LL | let _used = value; | help: consider assigning a value | -LL | let mut value: NonCopy = value; - | +++++++ +LL | let mut value: NonCopy = /* value */; + | +++++++++++++ error: aborting due to 6 previous errors diff --git a/tests/ui/moves/move-into-dead-array-1.stderr b/tests/ui/moves/move-into-dead-array-1.stderr index d9b719730d69..6fb3fd83fc03 100644 --- a/tests/ui/moves/move-into-dead-array-1.stderr +++ b/tests/ui/moves/move-into-dead-array-1.stderr @@ -8,8 +8,8 @@ LL | a[i] = d(); | help: consider assigning a value | -LL | let mut a: [D; 4] = [value; 4]; - | ++++++++++++ +LL | let mut a: [D; 4] = [/* value */; 4]; + | ++++++++++++++++++ error: aborting due to 1 previous error diff --git a/tests/ui/moves/move-of-addr-of-mut.stderr b/tests/ui/moves/move-of-addr-of-mut.stderr index 46f7d39a61af..c36ace6ca0f1 100644 --- a/tests/ui/moves/move-of-addr-of-mut.stderr +++ b/tests/ui/moves/move-of-addr-of-mut.stderr @@ -9,8 +9,8 @@ LL | std::ptr::addr_of_mut!(x); = note: this error originates in the macro `std::ptr::addr_of_mut` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider assigning a value | -LL | let mut x: S = value; - | +++++++ +LL | let mut x: S = /* value */; + | +++++++++++++ error: aborting due to 1 previous error diff --git a/tests/ui/nll/match-on-borrowed.stderr b/tests/ui/nll/match-on-borrowed.stderr index 4e0b048fb4b5..81163ebe2bcc 100644 --- a/tests/ui/nll/match-on-borrowed.stderr +++ b/tests/ui/nll/match-on-borrowed.stderr @@ -43,8 +43,8 @@ LL | match n {} | help: consider assigning a value | -LL | let n: Never = value; - | +++++++ +LL | let n: Never = /* value */; + | +++++++++++++ error: aborting due to 4 previous errors