about summary refs log tree commit diff
path: root/tests/ui/parser
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-04-03 21:41:16 +0000
committerMichael Goulet <michael@errs.io>2023-04-07 05:33:52 +0000
commitd5b1ef1c3f5f5fae73baee4b463e264842c8a73d (patch)
tree95063432ab1dfb7e605d7f908e4e5c124efe15f5 /tests/ui/parser
parentc934ce9e0a267340920a8bef96d7c59a46910c55 (diff)
downloadrust-d5b1ef1c3f5f5fae73baee4b463e264842c8a73d.tar.gz
rust-d5b1ef1c3f5f5fae73baee4b463e264842c8a73d.zip
Use smart-resolve when checking for trait in RHS of UFCS
Diffstat (limited to 'tests/ui/parser')
-rw-r--r--tests/ui/parser/dyn-trait-compatibility.rs2
-rw-r--r--tests/ui/parser/dyn-trait-compatibility.stderr16
2 files changed, 9 insertions, 9 deletions
diff --git a/tests/ui/parser/dyn-trait-compatibility.rs b/tests/ui/parser/dyn-trait-compatibility.rs
index d2b02cc2af5..6341e053277 100644
--- a/tests/ui/parser/dyn-trait-compatibility.rs
+++ b/tests/ui/parser/dyn-trait-compatibility.rs
@@ -9,6 +9,6 @@ type A2 = dyn<dyn, dyn>;
 type A3 = dyn<<dyn as dyn>::dyn>;
 //~^ ERROR cannot find type `dyn` in this scope
 //~| ERROR cannot find type `dyn` in this scope
-//~| ERROR use of undeclared crate or module `dyn`
+//~| ERROR cannot find trait `dyn` in this scope
 
 fn main() {}
diff --git a/tests/ui/parser/dyn-trait-compatibility.stderr b/tests/ui/parser/dyn-trait-compatibility.stderr
index 0cae01bd1e3..653be5b3b71 100644
--- a/tests/ui/parser/dyn-trait-compatibility.stderr
+++ b/tests/ui/parser/dyn-trait-compatibility.stderr
@@ -4,12 +4,6 @@ error[E0433]: failed to resolve: use of undeclared crate or module `dyn`
 LL | type A1 = dyn::dyn;
    |           ^^^ use of undeclared crate or module `dyn`
 
-error[E0433]: failed to resolve: use of undeclared crate or module `dyn`
-  --> $DIR/dyn-trait-compatibility.rs:9:23
-   |
-LL | type A3 = dyn<<dyn as dyn>::dyn>;
-   |                       ^^^ use of undeclared crate or module `dyn`
-
 error[E0412]: cannot find type `dyn` in this scope
   --> $DIR/dyn-trait-compatibility.rs:1:11
    |
@@ -40,6 +34,12 @@ error[E0412]: cannot find type `dyn` in this scope
 LL | type A3 = dyn<<dyn as dyn>::dyn>;
    |           ^^^ not found in this scope
 
+error[E0405]: cannot find trait `dyn` in this scope
+  --> $DIR/dyn-trait-compatibility.rs:9:23
+   |
+LL | type A3 = dyn<<dyn as dyn>::dyn>;
+   |                       ^^^ not found in this scope
+
 error[E0412]: cannot find type `dyn` in this scope
   --> $DIR/dyn-trait-compatibility.rs:9:16
    |
@@ -48,5 +48,5 @@ LL | type A3 = dyn<<dyn as dyn>::dyn>;
 
 error: aborting due to 8 previous errors
 
-Some errors have detailed explanations: E0412, E0433.
-For more information about an error, try `rustc --explain E0412`.
+Some errors have detailed explanations: E0405, E0412, E0433.
+For more information about an error, try `rustc --explain E0405`.