Skip to content

Commit

Permalink
Use /* value */ as a placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Apr 16, 2024
1 parent ccfcd95 commit 8a981b6
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4592,7 +4592,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
.join(", "),
if tys.len() == 1 { "," } else { "" }
),
_ => "value".to_string(),
_ => "/* value */".to_string(),
})
}
}
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/borrowck/borrowck-init-in-fru.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions tests/ui/borrowck/borrowck-uninit-ref-chain.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/borrowck/issue-103250.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions tests/ui/borrowck/suggest-assign-rvalue.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/consts/value-suggestion-ice-123906.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
20 changes: 10 additions & 10 deletions tests/ui/loops/loop-break-value.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions tests/ui/moves/issue-72649-uninit-in-loop.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions tests/ui/moves/move-into-dead-array-1.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions tests/ui/moves/move-of-addr-of-mut.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions tests/ui/nll/match-on-borrowed.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 8a981b6

Please sign in to comment.