about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-04-15 21:36:52 -0400
committerMichael Goulet <michael@errs.io>2024-04-15 21:36:52 -0400
commit8a981b6fee5bb52af9311bd317dd8a01ec60dd83 (patch)
tree366ee28c5227c4230c9089d0b920440da46fe5f0
parentccfcd950b333fed046275dd8d54fe736ca498aa7 (diff)
downloadrust-8a981b6fee5bb52af9311bd317dd8a01ec60dd83.tar.gz
rust-8a981b6fee5bb52af9311bd317dd8a01ec60dd83.zip
Use /* value */ as a placeholder
-rw-r--r--compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs2
-rw-r--r--tests/ui/borrowck/borrowck-init-in-fru.stderr4
-rw-r--r--tests/ui/borrowck/borrowck-uninit-ref-chain.stderr4
-rw-r--r--tests/ui/borrowck/issue-103250.stderr4
-rw-r--r--tests/ui/borrowck/suggest-assign-rvalue.stderr4
-rw-r--r--tests/ui/consts/value-suggestion-ice-123906.stderr4
-rw-r--r--tests/ui/loops/loop-break-value.stderr20
-rw-r--r--tests/ui/moves/issue-72649-uninit-in-loop.stderr8
-rw-r--r--tests/ui/moves/move-into-dead-array-1.stderr4
-rw-r--r--tests/ui/moves/move-of-addr-of-mut.stderr4
-rw-r--r--tests/ui/nll/match-on-borrowed.stderr4
11 files changed, 31 insertions, 31 deletions
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 af8713ba3ff..f05e91a2995 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 b5c332a90bc..bfa86b44fe9 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 d6759b8e1cf..b1d508e2ac3 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<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
diff --git a/tests/ui/borrowck/issue-103250.stderr b/tests/ui/borrowck/issue-103250.stderr
index 104bded5b0b..cd048e03a67 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<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
 
diff --git a/tests/ui/borrowck/suggest-assign-rvalue.stderr b/tests/ui/borrowck/suggest-assign-rvalue.stderr
index 4305539f1b6..daaef6e3892 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 8e2c316400d..edb91063e5d 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 0093182422e..0912bdbb221 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 35216f8a66f..a613f35a35e 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 d9b719730d6..6fb3fd83fc0 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 46f7d39a61a..c36ace6ca0f 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 4e0b048fb4b..81163ebe2bc 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