about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorBoxy <rust@boxyuwu.dev>2024-11-30 19:31:06 +0000
committerBoxy <rust@boxyuwu.dev>2024-12-03 23:39:51 +0000
commitec036cda3fee341d938336b64bc38cd11df7231d (patch)
tree2397765ef5e6e6afa1fcfbebc1eb3cd8cf7764a2 /tests
parentc44b3d50fea96a3e0417e8264c16ea21a0a3fca2 (diff)
downloadrust-ec036cda3fee341d938336b64bc38cd11df7231d.tar.gz
rust-ec036cda3fee341d938336b64bc38cd11df7231d.zip
Don't try and handle unfed `type_of` on anon consts
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/coroutine/coroutine-in-orphaned-anon-const.rs2
-rw-r--r--tests/ui/coroutine/coroutine-in-orphaned-anon-const.stderr10
-rw-r--r--tests/ui/traits/bound/unknown-assoc-with-const-arg.rs2
-rw-r--r--tests/ui/traits/bound/unknown-assoc-with-const-arg.stderr22
4 files changed, 4 insertions, 32 deletions
diff --git a/tests/ui/coroutine/coroutine-in-orphaned-anon-const.rs b/tests/ui/coroutine/coroutine-in-orphaned-anon-const.rs
index 07c13239a2c..c98ec1de17e 100644
--- a/tests/ui/coroutine/coroutine-in-orphaned-anon-const.rs
+++ b/tests/ui/coroutine/coroutine-in-orphaned-anon-const.rs
@@ -3,8 +3,6 @@
 trait X {
     fn test() -> Self::Assoc<{ async {} }>;
     //~^ ERROR associated type `Assoc` not found for `Self`
-    //~| ERROR associated type `Assoc` not found for `Self`
-
 }
 
 pub fn main() {}
diff --git a/tests/ui/coroutine/coroutine-in-orphaned-anon-const.stderr b/tests/ui/coroutine/coroutine-in-orphaned-anon-const.stderr
index 864c6556d79..58553728753 100644
--- a/tests/ui/coroutine/coroutine-in-orphaned-anon-const.stderr
+++ b/tests/ui/coroutine/coroutine-in-orphaned-anon-const.stderr
@@ -4,14 +4,6 @@ error[E0220]: associated type `Assoc` not found for `Self`
 LL |     fn test() -> Self::Assoc<{ async {} }>;
    |                        ^^^^^ associated type `Assoc` not found
 
-error[E0220]: associated type `Assoc` not found for `Self`
-  --> $DIR/coroutine-in-orphaned-anon-const.rs:4:24
-   |
-LL |     fn test() -> Self::Assoc<{ async {} }>;
-   |                        ^^^^^ associated type `Assoc` not found
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
 For more information about this error, try `rustc --explain E0220`.
diff --git a/tests/ui/traits/bound/unknown-assoc-with-const-arg.rs b/tests/ui/traits/bound/unknown-assoc-with-const-arg.rs
index 48a98efea5e..0da68afb592 100644
--- a/tests/ui/traits/bound/unknown-assoc-with-const-arg.rs
+++ b/tests/ui/traits/bound/unknown-assoc-with-const-arg.rs
@@ -3,7 +3,6 @@
 trait X {
     fn a<T>() -> T::unknown<{}> {}
     //~^ ERROR: associated type `unknown` not found for `T`
-    //~| ERROR: associated type `unknown` not found for `T`
 }
 
 trait Y {
@@ -14,7 +13,6 @@ trait Y {
 trait Z<T> {
     fn a() -> T::unknown<{}> {}
     //~^ ERROR: associated type `unknown` not found for `T`
-    //~| ERROR: associated type `unknown` not found for `T`
 }
 
 fn main() {}
diff --git a/tests/ui/traits/bound/unknown-assoc-with-const-arg.stderr b/tests/ui/traits/bound/unknown-assoc-with-const-arg.stderr
index 9598c373e6e..49e41f75ff3 100644
--- a/tests/ui/traits/bound/unknown-assoc-with-const-arg.stderr
+++ b/tests/ui/traits/bound/unknown-assoc-with-const-arg.stderr
@@ -5,34 +5,18 @@ LL |     fn a<T>() -> T::unknown<{}> {}
    |                     ^^^^^^^ associated type `unknown` not found
 
 error[E0220]: associated type `unknown` not found for `T`
-  --> $DIR/unknown-assoc-with-const-arg.rs:15:18
+  --> $DIR/unknown-assoc-with-const-arg.rs:14:18
    |
 LL |     fn a() -> T::unknown<{}> {}
    |                  ^^^^^^^ associated type `unknown` not found
 
-error[E0220]: associated type `unknown` not found for `T`
-  --> $DIR/unknown-assoc-with-const-arg.rs:4:21
-   |
-LL |     fn a<T>() -> T::unknown<{}> {}
-   |                     ^^^^^^^ associated type `unknown` not found
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0220]: associated type `unknown` not found for `T`
-  --> $DIR/unknown-assoc-with-const-arg.rs:15:18
-   |
-LL |     fn a() -> T::unknown<{}> {}
-   |                  ^^^^^^^ associated type `unknown` not found
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
 error[E0433]: failed to resolve: use of undeclared type `NOT_EXIST`
-  --> $DIR/unknown-assoc-with-const-arg.rs:10:15
+  --> $DIR/unknown-assoc-with-const-arg.rs:9:15
    |
 LL |     fn a() -> NOT_EXIST::unknown<{}> {}
    |               ^^^^^^^^^ use of undeclared type `NOT_EXIST`
 
-error: aborting due to 5 previous errors
+error: aborting due to 3 previous errors
 
 Some errors have detailed explanations: E0220, E0433.
 For more information about an error, try `rustc --explain E0220`.