diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2024-07-09 22:30:26 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2025-02-10 20:21:39 +0000 |
| commit | f0845adb0c1b7a7fa1bef73e749b2d7e1d7f374d (patch) | |
| tree | e97d87013709bda13934fdc452a2a459a069876a /tests/ui/span | |
| parent | 8c04e395952022a451138dc4dbead6dd6ae65203 (diff) | |
| download | rust-f0845adb0c1b7a7fa1bef73e749b2d7e1d7f374d.tar.gz rust-f0845adb0c1b7a7fa1bef73e749b2d7e1d7f374d.zip | |
Show diff suggestion format on verbose replacement
```
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> $DIR/attempted-access-non-fatal.rs:7:15
|
LL | let _ = 2.l;
| ^
|
help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix
|
LL - let _ = 2.l;
LL + let _ = 2.0f64;
|
```
Diffstat (limited to 'tests/ui/span')
| -rw-r--r-- | tests/ui/span/issue-35987.stderr | 10 | ||||
| -rw-r--r-- | tests/ui/span/issue-37767.stderr | 30 | ||||
| -rw-r--r-- | tests/ui/span/issue-81800.stderr | 5 | ||||
| -rw-r--r-- | tests/ui/span/missing-unit-argument.stderr | 30 |
4 files changed, 45 insertions, 30 deletions
diff --git a/tests/ui/span/issue-35987.stderr b/tests/ui/span/issue-35987.stderr index 36c59137b31..634bb5ed68f 100644 --- a/tests/ui/span/issue-35987.stderr +++ b/tests/ui/span/issue-35987.stderr @@ -17,10 +17,12 @@ LL | fn add(self, rhs: Self) -> Self::Output { | help: use fully-qualified syntax | -LL | fn add(self, rhs: Self) -> <Foo<T> as BitOr>::Output { - | ~~~~~~~~~~~~~~~~~~~~~~~~~ -LL | fn add(self, rhs: Self) -> <Foo<T> as IntoFuture>::Output { - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +LL - fn add(self, rhs: Self) -> Self::Output { +LL + fn add(self, rhs: Self) -> <Foo<T> as BitOr>::Output { + | +LL - fn add(self, rhs: Self) -> Self::Output { +LL + fn add(self, rhs: Self) -> <Foo<T> as IntoFuture>::Output { + | error: aborting due to 2 previous errors diff --git a/tests/ui/span/issue-37767.stderr b/tests/ui/span/issue-37767.stderr index 457870821a1..2bb64e3da86 100644 --- a/tests/ui/span/issue-37767.stderr +++ b/tests/ui/span/issue-37767.stderr @@ -16,12 +16,14 @@ LL | fn foo(&mut self) {} | ^^^^^^^^^^^^^^^^^ help: disambiguate the method for candidate #1 | -LL | A::foo(&mut a) - | ~~~~~~~~~~~~~~ +LL - a.foo() +LL + A::foo(&mut a) + | help: disambiguate the method for candidate #2 | -LL | B::foo(&mut a) - | ~~~~~~~~~~~~~~ +LL - a.foo() +LL + B::foo(&mut a) + | error[E0034]: multiple applicable items in scope --> $DIR/issue-37767.rs:22:7 @@ -41,12 +43,14 @@ LL | fn foo(&self) {} | ^^^^^^^^^^^^^ help: disambiguate the method for candidate #1 | -LL | C::foo(&a) - | ~~~~~~~~~~ +LL - a.foo() +LL + C::foo(&a) + | help: disambiguate the method for candidate #2 | -LL | D::foo(&a) - | ~~~~~~~~~~ +LL - a.foo() +LL + D::foo(&a) + | error[E0034]: multiple applicable items in scope --> $DIR/issue-37767.rs:34:7 @@ -66,12 +70,14 @@ LL | fn foo(self) {} | ^^^^^^^^^^^^ help: disambiguate the method for candidate #1 | -LL | E::foo(a) - | ~~~~~~~~~ +LL - a.foo() +LL + E::foo(a) + | help: disambiguate the method for candidate #2 | -LL | F::foo(a) - | ~~~~~~~~~ +LL - a.foo() +LL + F::foo(a) + | error: aborting due to 3 previous errors diff --git a/tests/ui/span/issue-81800.stderr b/tests/ui/span/issue-81800.stderr index 86c64573b14..c1583c3ef8f 100644 --- a/tests/ui/span/issue-81800.stderr +++ b/tests/ui/span/issue-81800.stderr @@ -6,8 +6,9 @@ LL | fn x˂- | help: Unicode character '˂' (Modifier Letter Left Arrowhead) looks like '<' (Less-Than Sign), but it is not | -LL | fn x<- - | ~ +LL - fn x˂- +LL + fn x<- + | error: expected one of `#`, `>`, `const`, identifier, or lifetime, found `-` --> $DIR/issue-81800.rs:1:6 diff --git a/tests/ui/span/missing-unit-argument.stderr b/tests/ui/span/missing-unit-argument.stderr index 6261831b752..e77ec3c8447 100644 --- a/tests/ui/span/missing-unit-argument.stderr +++ b/tests/ui/span/missing-unit-argument.stderr @@ -8,8 +8,9 @@ note: tuple variant defined here --> $SRC_DIR/core/src/result.rs:LL:COL help: provide the argument | -LL | let _: Result<(), String> = Ok(()); - | ~~~~ +LL - let _: Result<(), String> = Ok(); +LL + let _: Result<(), String> = Ok(()); + | error[E0061]: this function takes 2 arguments but 0 arguments were supplied --> $DIR/missing-unit-argument.rs:12:5 @@ -24,8 +25,9 @@ LL | fn foo(():(), ():()) {} | ^^^ ----- ----- help: provide the arguments | -LL | foo((), ()); - | ~~~~~~~~ +LL - foo(); +LL + foo((), ()); + | error[E0061]: this function takes 2 arguments but 1 argument was supplied --> $DIR/missing-unit-argument.rs:13:5 @@ -40,8 +42,9 @@ LL | fn foo(():(), ():()) {} | ^^^ ----- help: provide the argument | -LL | foo((), ()); - | ~~~~~~~~ +LL - foo(()); +LL + foo((), ()); + | error[E0061]: this function takes 1 argument but 0 arguments were supplied --> $DIR/missing-unit-argument.rs:14:5 @@ -56,8 +59,9 @@ LL | fn bar(():()) {} | ^^^ ----- help: provide the argument | -LL | bar(()); - | ~~~~ +LL - bar(); +LL + bar(()); + | error[E0061]: this method takes 1 argument but 0 arguments were supplied --> $DIR/missing-unit-argument.rs:15:7 @@ -72,8 +76,9 @@ LL | fn baz(self, (): ()) { } | ^^^ ------ help: provide the argument | -LL | S.baz(()); - | ~~~~ +LL - S.baz(); +LL + S.baz(()); + | error[E0061]: this method takes 1 argument but 0 arguments were supplied --> $DIR/missing-unit-argument.rs:16:7 @@ -88,8 +93,9 @@ LL | fn generic<T>(self, _: T) { } | ^^^^^^^ ---- help: provide the argument | -LL | S.generic::<()>(()); - | ~~~~ +LL - S.generic::<()>(); +LL + S.generic::<()>(()); + | error: aborting due to 6 previous errors |
