about summary refs log tree commit diff
path: root/src/test/ui/methods
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2021-06-21 19:07:19 -0700
committerEsteban Kuber <esteban@kuber.com.ar>2021-08-11 09:46:24 +0000
commit99f2977031706dfef6730764d359b9e5d0f673b4 (patch)
tree16caa7ac1411f6ebe1e56c175e9799a442b59832 /src/test/ui/methods
parentd488de82f30fd1dcb0220d57498638596622394e (diff)
downloadrust-99f2977031706dfef6730764d359b9e5d0f673b4.tar.gz
rust-99f2977031706dfef6730764d359b9e5d0f673b4.zip
Modify structured suggestion output
* On suggestions that include deletions, use a diff inspired output format
* When suggesting addition, use `+` as underline
* Color highlight modified span
Diffstat (limited to 'src/test/ui/methods')
-rw-r--r--src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr2
-rw-r--r--src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr4
-rw-r--r--src/test/ui/methods/method-ambig-two-traits-from-bounds.stderr4
-rw-r--r--src/test/ui/methods/method-ambig-two-traits-from-impls.stderr4
-rw-r--r--src/test/ui/methods/method-ambig-two-traits-from-impls2.stderr4
-rw-r--r--src/test/ui/methods/method-ambig-two-traits-with-default-method.stderr4
-rw-r--r--src/test/ui/methods/method-call-lifetime-args-fail.stderr4
-rw-r--r--src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr6
-rw-r--r--src/test/ui/methods/method-missing-call.stderr4
-rw-r--r--src/test/ui/methods/method-on-ambiguous-numeric-type.stderr8
10 files changed, 22 insertions, 22 deletions
diff --git a/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr b/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr
index 82660a7c416..e725e74efc2 100644
--- a/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr
+++ b/src/test/ui/methods/method-ambig-one-trait-unknown-int-type.stderr
@@ -17,7 +17,7 @@ LL |     let y: usize = x.foo();
 help: you can convert an `isize` to a `usize` and panic if the converted value doesn't fit
    |
 LL |     let y: usize = x.foo().try_into().unwrap();
-   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr b/src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr
index 42802ba1d0f..ed03b37fde2 100644
--- a/src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr
+++ b/src/test/ui/methods/method-ambig-two-traits-cross-crate.stderr
@@ -13,11 +13,11 @@ LL | impl Me2 for usize { fn me(&self) -> usize { *self } }
 help: disambiguate the associated function for candidate #1
    |
 LL | fn main() { Me2::me(&1_usize); }
-   |             ^^^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~~~
 help: disambiguate the associated function for candidate #2
    |
 LL | fn main() { Me::me(&1_usize); }
-   |             ^^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/methods/method-ambig-two-traits-from-bounds.stderr b/src/test/ui/methods/method-ambig-two-traits-from-bounds.stderr
index 5cbed652b0a..1feaa2c73e0 100644
--- a/src/test/ui/methods/method-ambig-two-traits-from-bounds.stderr
+++ b/src/test/ui/methods/method-ambig-two-traits-from-bounds.stderr
@@ -17,11 +17,11 @@ LL | trait B { fn foo(&self); }
 help: disambiguate the associated function for candidate #1
    |
 LL |     A::foo(t);
-   |     ^^^^^^^^^
+   |     ~~~~~~~~~
 help: disambiguate the associated function for candidate #2
    |
 LL |     B::foo(t);
-   |     ^^^^^^^^^
+   |     ~~~~~~~~~
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/methods/method-ambig-two-traits-from-impls.stderr b/src/test/ui/methods/method-ambig-two-traits-from-impls.stderr
index 8585929934e..f69b5689239 100644
--- a/src/test/ui/methods/method-ambig-two-traits-from-impls.stderr
+++ b/src/test/ui/methods/method-ambig-two-traits-from-impls.stderr
@@ -17,11 +17,11 @@ LL |     fn foo(self) {}
 help: disambiguate the associated function for candidate #1
    |
 LL |     A::foo(AB {});
-   |     ^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~
 help: disambiguate the associated function for candidate #2
    |
 LL |     B::foo(AB {});
-   |     ^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/methods/method-ambig-two-traits-from-impls2.stderr b/src/test/ui/methods/method-ambig-two-traits-from-impls2.stderr
index 7bfb8baa0c6..e0a58aed8f4 100644
--- a/src/test/ui/methods/method-ambig-two-traits-from-impls2.stderr
+++ b/src/test/ui/methods/method-ambig-two-traits-from-impls2.stderr
@@ -17,11 +17,11 @@ LL |     fn foo() {}
 help: disambiguate the associated function for candidate #1
    |
 LL |     A::foo();
-   |     ^^^
+   |     ~~~
 help: disambiguate the associated function for candidate #2
    |
 LL |     B::foo();
-   |     ^^^
+   |     ~~~
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/methods/method-ambig-two-traits-with-default-method.stderr b/src/test/ui/methods/method-ambig-two-traits-with-default-method.stderr
index 4ce7236ed96..e84dff8bab7 100644
--- a/src/test/ui/methods/method-ambig-two-traits-with-default-method.stderr
+++ b/src/test/ui/methods/method-ambig-two-traits-with-default-method.stderr
@@ -17,11 +17,11 @@ LL | trait Bar { fn method(&self) {} }
 help: disambiguate the associated function for candidate #1
    |
 LL |     Foo::method(&1_usize);
-   |     ^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~
 help: disambiguate the associated function for candidate #2
    |
 LL |     Bar::method(&1_usize);
-   |     ^^^^^^^^^^^^^^^^^^^^^
+   |     ~~~~~~~~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/methods/method-call-lifetime-args-fail.stderr b/src/test/ui/methods/method-call-lifetime-args-fail.stderr
index ea50815ec1a..835edb4b0ae 100644
--- a/src/test/ui/methods/method-call-lifetime-args-fail.stderr
+++ b/src/test/ui/methods/method-call-lifetime-args-fail.stderr
@@ -14,7 +14,7 @@ LL |     fn early<'a, 'b>(self) -> (&'a u8, &'b u8) { loop {} }
 help: add missing lifetime argument
    |
 LL |     S.early::<'static, 'b>();
-   |                      ^^^^
+   |                      ++++
 
 error[E0107]: this associated function takes 2 lifetime arguments but 3 lifetime arguments were supplied
   --> $DIR/method-call-lifetime-args-fail.rs:18:7
@@ -214,7 +214,7 @@ LL |     fn early<'a, 'b>(self) -> (&'a u8, &'b u8) { loop {} }
 help: add missing lifetime argument
    |
 LL |     S::early::<'static, 'b>(S);
-   |                       ^^^^
+   |                       ++++
 
 error[E0107]: this associated function takes 2 lifetime arguments but 3 lifetime arguments were supplied
   --> $DIR/method-call-lifetime-args-fail.rs:65:8
diff --git a/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr b/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr
index 0a516c89a8b..59075397ea5 100644
--- a/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr
+++ b/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr
@@ -47,15 +47,15 @@ LL |     fn foo(&self) -> u8;
 help: disambiguate the associated function for candidate #1
    |
 LL |     let z = X::foo(x);
-   |             ^^^^^^^^^
+   |             ~~~~~~~~~
 help: disambiguate the associated function for candidate #2
    |
 LL |     let z = NuisanceFoo::foo(x);
-   |             ^^^^^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~~~~~
 help: disambiguate the associated function for candidate #3
    |
 LL |     let z = FinalFoo::foo(x);
-   |             ^^^^^^^^^^^^^^^^
+   |             ~~~~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
   --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:139:24
diff --git a/src/test/ui/methods/method-missing-call.stderr b/src/test/ui/methods/method-missing-call.stderr
index 241c50d7ced..045f9ab7004 100644
--- a/src/test/ui/methods/method-missing-call.stderr
+++ b/src/test/ui/methods/method-missing-call.stderr
@@ -7,7 +7,7 @@ LL |                         .get_x;
 help: use parentheses to call the method
    |
 LL |                         .get_x();
-   |                               ^^
+   |                               ++
 
 error[E0615]: attempted to take value of method `filter_map` on type `Filter<Map<std::slice::Iter<'_, {integer}>, [closure@$DIR/method-missing-call.rs:27:20: 27:25]>, [closure@$DIR/method-missing-call.rs:28:23: 28:35]>`
   --> $DIR/method-missing-call.rs:29:16
@@ -18,7 +18,7 @@ LL |               .filter_map;
 help: use parentheses to call the method
    |
 LL |               .filter_map(_);
-   |                          ^^^
+   |                          +++
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/methods/method-on-ambiguous-numeric-type.stderr b/src/test/ui/methods/method-on-ambiguous-numeric-type.stderr
index c6dde67cfeb..09978b35f7e 100644
--- a/src/test/ui/methods/method-on-ambiguous-numeric-type.stderr
+++ b/src/test/ui/methods/method-on-ambiguous-numeric-type.stderr
@@ -7,7 +7,7 @@ LL |     let x = 2.0.neg();
 help: you must specify a concrete type for this numeric value, like `f32`
    |
 LL |     let x = 2.0_f32.neg();
-   |             ^^^^^^^
+   |             ~~~~~~~
 
 error[E0689]: can't call method `neg` on ambiguous numeric type `{float}`
   --> $DIR/method-on-ambiguous-numeric-type.rs:14:15
@@ -18,7 +18,7 @@ LL |     let x = y.neg();
 help: you must specify a type for this binding, like `f32`
    |
 LL |     let y: f32 = 2.0;
-   |         ^^^^^^
+   |         ~~~~~~
 
 error[E0689]: can't call method `pow` on ambiguous numeric type `{integer}`
   --> $DIR/method-on-ambiguous-numeric-type.rs:19:26
@@ -37,7 +37,7 @@ LL |     local_bar.pow(2);
 help: you must specify a type for this binding, like `i32`
    |
 LL |     ($ident:ident) => { let $ident: i32 = 42; }
-   |                             ^^^^^^^^^^^
+   |                             ~~~~~~~~~~~
 
 error[E0689]: can't call method `pow` on ambiguous numeric type `{integer}`
   --> $DIR/method-on-ambiguous-numeric-type.rs:30:9
@@ -48,7 +48,7 @@ LL |     bar.pow(2);
 help: you must specify a type for this binding, like `i32`
    |
 LL |     ($ident:ident) => { let $ident: i32 = 42; }
-   |                             ^^^^^^^^^^^
+   |                             ~~~~~~~~~~~
 
 error: aborting due to 5 previous errors