about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-11-07 05:22:20 +0000
committerMichael Goulet <michael@errs.io>2023-11-07 05:23:09 +0000
commit0add056dee57a0b56f3316596dcecb1bbde17a08 (patch)
tree571d5580fb5612d4927025c52588e94c9cf5eb51 /tests
parent88a37acb26a58472a124e38a8b63d27c204ca5a8 (diff)
downloadrust-0add056dee57a0b56f3316596dcecb1bbde17a08.tar.gz
rust-0add056dee57a0b56f3316596dcecb1bbde17a08.zip
Rework print_disambiguation_help
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/methods/disambiguate-multiple-blanket-impl.stderr12
-rw-r--r--tests/ui/methods/disambiguate-multiple-impl.stderr8
-rw-r--r--tests/ui/methods/disambiguate-multiple-trait-2.stderr28
-rw-r--r--tests/ui/methods/disambiguate-multiple-trait.stderr12
-rw-r--r--tests/ui/methods/method-ambig-two-traits-from-bounds.stderr8
-rw-r--r--tests/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr4
-rw-r--r--tests/ui/span/issue-37767.stderr8
7 files changed, 40 insertions, 40 deletions
diff --git a/tests/ui/methods/disambiguate-multiple-blanket-impl.stderr b/tests/ui/methods/disambiguate-multiple-blanket-impl.stderr
index a9e9c679fdb..ccdd9a95451 100644
--- a/tests/ui/methods/disambiguate-multiple-blanket-impl.stderr
+++ b/tests/ui/methods/disambiguate-multiple-blanket-impl.stderr
@@ -29,10 +29,10 @@ LL |     fn foo(&self) {}
    |     ^^^^^^^^^^^^^
 help: use fully-qualified syntax to disambiguate
    |
-LL |     <T as A>::foo(&s);
-   |     ~~~~~~~~~~
-LL |     <T as B>::foo(&s);
-   |     ~~~~~~~~~~
+LL |     A::foo(&s);
+   |     ~~~
+LL |     B::foo(&s);
+   |     ~~~
 
 error[E0034]: multiple applicable items in scope
   --> $DIR/disambiguate-multiple-blanket-impl.rs:33:8
@@ -52,9 +52,9 @@ LL |     const CONST: usize = 2;
    |     ^^^^^^^^^^^^^^^^^^
 help: use fully-qualified syntax to disambiguate
    |
-LL |     <T as A>::CONST;
+LL |     <S as A>::CONST;
    |     ~~~~~~~~~~
-LL |     <T as B>::CONST;
+LL |     <S as B>::CONST;
    |     ~~~~~~~~~~
 
 error: aborting due to 3 previous errors
diff --git a/tests/ui/methods/disambiguate-multiple-impl.stderr b/tests/ui/methods/disambiguate-multiple-impl.stderr
index 901bfc30a3f..4172120770c 100644
--- a/tests/ui/methods/disambiguate-multiple-impl.stderr
+++ b/tests/ui/methods/disambiguate-multiple-impl.stderr
@@ -29,10 +29,10 @@ LL |     fn foo(&self) {}
    |     ^^^^^^^^^^^^^
 help: use fully-qualified syntax to disambiguate
    |
-LL |     <S as A>::foo(&s);
-   |     ~~~~~~~~~~
-LL |     <S as B>::foo(&s);
-   |     ~~~~~~~~~~
+LL |     A::foo(&s);
+   |     ~~~
+LL |     B::foo(&s);
+   |     ~~~
 
 error[E0034]: multiple applicable items in scope
   --> $DIR/disambiguate-multiple-impl.rs:34:16
diff --git a/tests/ui/methods/disambiguate-multiple-trait-2.stderr b/tests/ui/methods/disambiguate-multiple-trait-2.stderr
index 0f9c60ce243..2778f254a56 100644
--- a/tests/ui/methods/disambiguate-multiple-trait-2.stderr
+++ b/tests/ui/methods/disambiguate-multiple-trait-2.stderr
@@ -37,12 +37,12 @@ LL |     fn foo(&self);
    |     ^^^^^^^^^^^^^^
 help: disambiguate the method for candidate #1
    |
-LL |     A::foo(t);
-   |     ~~~~~~~~~
+LL |     A::foo(&t);
+   |     ~~~~~~~~~~
 help: disambiguate the method for candidate #2
    |
-LL |     B::foo(t);
-   |     ~~~~~~~~~
+LL |     B::foo(&t);
+   |     ~~~~~~~~~~
 
 error[E0034]: multiple applicable items in scope
   --> $DIR/disambiguate-multiple-trait-2.rs:20:16
@@ -62,10 +62,10 @@ LL |     const CONST: usize;
    |     ^^^^^^^^^^^^^^^^^^
 help: use fully-qualified syntax to disambiguate
    |
-LL |     let _ = A::CONST;
-   |             ~~~
-LL |     let _ = B::CONST;
-   |             ~~~
+LL |     let _ = <T as A>::CONST;
+   |             ~~~~~~~~~~
+LL |     let _ = <T as B>::CONST;
+   |             ~~~~~~~~~~
 
 error[E0223]: ambiguous associated type
   --> $DIR/disambiguate-multiple-trait-2.rs:52:12
@@ -98,10 +98,10 @@ LL |     fn foo(&self) {}
    |     ^^^^^^^^^^^^^
 help: use fully-qualified syntax to disambiguate
    |
-LL |     <T as A>::foo(&s);
-   |     ~~~~~~~~~~
-LL |     <T as B>::foo(&s);
-   |     ~~~~~~~~~~
+LL |     A::foo(&s);
+   |     ~~~
+LL |     B::foo(&s);
+   |     ~~~
 
 error[E0034]: multiple applicable items in scope
   --> $DIR/disambiguate-multiple-trait-2.rs:49:16
@@ -121,9 +121,9 @@ LL |     const CONST: usize = 1;
    |     ^^^^^^^^^^^^^^^^^^
 help: use fully-qualified syntax to disambiguate
    |
-LL |     let _ = <T as A>::CONST;
+LL |     let _ = <S as A>::CONST;
    |             ~~~~~~~~~~
-LL |     let _ = <T as B>::CONST;
+LL |     let _ = <S as B>::CONST;
    |             ~~~~~~~~~~
 
 error: aborting due to 6 previous errors
diff --git a/tests/ui/methods/disambiguate-multiple-trait.stderr b/tests/ui/methods/disambiguate-multiple-trait.stderr
index 9a50d51245b..e00498ca62b 100644
--- a/tests/ui/methods/disambiguate-multiple-trait.stderr
+++ b/tests/ui/methods/disambiguate-multiple-trait.stderr
@@ -29,10 +29,10 @@ LL |     fn foo(&self) {}
    |     ^^^^^^^^^^^^^
 help: use fully-qualified syntax to disambiguate
    |
-LL |     <T as A>::foo(&s);
-   |     ~~~~~~~~~~
-LL |     <T as B>::foo(&s);
-   |     ~~~~~~~~~~
+LL |     A::foo(&s);
+   |     ~~~
+LL |     B::foo(&s);
+   |     ~~~
 
 error[E0034]: multiple applicable items in scope
   --> $DIR/disambiguate-multiple-trait.rs:27:16
@@ -52,9 +52,9 @@ LL |     const CONST: usize = 2;
    |     ^^^^^^^^^^^^^^^^^^
 help: use fully-qualified syntax to disambiguate
    |
-LL |     let _ = <T as A>::CONST;
+LL |     let _ = <S as A>::CONST;
    |             ~~~~~~~~~~
-LL |     let _ = <T as B>::CONST;
+LL |     let _ = <S as B>::CONST;
    |             ~~~~~~~~~~
 
 error: aborting due to 3 previous errors
diff --git a/tests/ui/methods/method-ambig-two-traits-from-bounds.stderr b/tests/ui/methods/method-ambig-two-traits-from-bounds.stderr
index 601e6bbb006..9a84768a9f4 100644
--- a/tests/ui/methods/method-ambig-two-traits-from-bounds.stderr
+++ b/tests/ui/methods/method-ambig-two-traits-from-bounds.stderr
@@ -16,12 +16,12 @@ LL | trait B { fn foo(&self); }
    |           ^^^^^^^^^^^^^^
 help: disambiguate the method for candidate #1
    |
-LL |     A::foo(t);
-   |     ~~~~~~~~~
+LL |     A::foo(&t);
+   |     ~~~~~~~~~~
 help: disambiguate the method for candidate #2
    |
-LL |     B::foo(t);
-   |     ~~~~~~~~~
+LL |     B::foo(&t);
+   |     ~~~~~~~~~~
 
 error: aborting due to previous error
 
diff --git a/tests/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr b/tests/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr
index 4e83e4b77f1..755179650bb 100644
--- a/tests/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr
+++ b/tests/ui/methods/method-deref-to-same-trait-object-with-separate-params.stderr
@@ -54,8 +54,8 @@ LL |     let z = NuisanceFoo::foo(x);
    |             ~~~~~~~~~~~~~~~~~~~
 help: disambiguate the method for candidate #3
    |
-LL |     let z = FinalFoo::foo(x);
-   |             ~~~~~~~~~~~~~~~~
+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/tests/ui/span/issue-37767.stderr b/tests/ui/span/issue-37767.stderr
index b612fdf16fc..457870821a1 100644
--- a/tests/ui/span/issue-37767.stderr
+++ b/tests/ui/span/issue-37767.stderr
@@ -16,12 +16,12 @@ LL |     fn foo(&mut self) {}
    |     ^^^^^^^^^^^^^^^^^
 help: disambiguate the method for candidate #1
    |
-LL |     A::foo(&a)
-   |     ~~~~~~~~~~
+LL |     A::foo(&mut a)
+   |     ~~~~~~~~~~~~~~
 help: disambiguate the method for candidate #2
    |
-LL |     B::foo(&a)
-   |     ~~~~~~~~~~
+LL |     B::foo(&mut a)
+   |     ~~~~~~~~~~~~~~
 
 error[E0034]: multiple applicable items in scope
   --> $DIR/issue-37767.rs:22:7