Use /* value */ as a placeholder

This commit is contained in:
Michael Goulet 2024-04-15 21:36:52 -04:00
parent ccfcd950b3
commit 8a981b6fee
11 changed files with 31 additions and 31 deletions

View File

@ -4592,7 +4592,7 @@ fn ty_kind_suggestion(&self, param_env: ty::ParamEnv<'tcx>, ty: Ty<'tcx>) -> Opt
.join(", "),
if tys.len() == 1 { "," } else { "" }
),
_ => "value".to_string(),
_ => "/* value */".to_string(),
})
}
}

View File

@ -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

View File

@ -21,8 +21,8 @@ LL | let _y = &**x;
|
help: consider assigning a value
|
LL | let x: &&S<i32, i32> = &&value;
| +++++++++
LL | let x: &&S<i32, i32> = &&/* value */;
| +++++++++++++++
error[E0381]: used binding `x` isn't initialized
--> $DIR/borrowck-uninit-ref-chain.rs:14:14

View File

@ -9,8 +9,8 @@ LL | Err(last_error)
|
help: consider assigning a value
|
LL | let mut last_error: Box<dyn std::error::Error> = Box::new(value);
| +++++++++++++++++
LL | let mut last_error: Box<dyn std::error::Error> = Box::new(/* value */);
| +++++++++++++++++++++++
error: aborting due to 1 previous error

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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