about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2025-08-26 14:11:04 +0200
committerlcnr <rust@lcnr.de>2025-09-08 14:17:56 +0200
commitf099b241e20d0d9b2fc02fd66a487529bd597d72 (patch)
tree6e2e8666139b63093c8e26841d3023b6efe76470 /tests
parentbeeb8e3af54295ba494c250e84ecda4c2c5d85ff (diff)
downloadrust-f099b241e20d0d9b2fc02fd66a487529bd597d72.tar.gz
rust-f099b241e20d0d9b2fc02fd66a487529bd597d72.zip
remove outdated opaque type test
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/type-alias-impl-trait/fallback.rs29
-rw-r--r--tests/ui/type-alias-impl-trait/fallback.stderr20
2 files changed, 0 insertions, 49 deletions
diff --git a/tests/ui/type-alias-impl-trait/fallback.rs b/tests/ui/type-alias-impl-trait/fallback.rs
deleted file mode 100644
index a2f25acca0d..00000000000
--- a/tests/ui/type-alias-impl-trait/fallback.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-// Tests that we correctly handle opaque types being used opaquely,
-// even within their defining scope.
-//
-#![feature(type_alias_impl_trait)]
-
-type Foo = impl Copy;
-
-enum Wrapper<T> {
-    First(T),
-    Second,
-}
-
-// This method constrains `Foo` to be `bool`
-#[define_opaque(Foo)]
-fn constrained_foo() -> Foo {
-    true
-}
-
-// This method does not constrain `Foo`.
-// Per RFC 2071, function bodies may either
-// fully constrain an opaque type, or place no
-// constraints on it.
-#[define_opaque(Foo)]
-fn unconstrained_foo() -> Wrapper<Foo> {
-    Wrapper::Second
-    //~^ ERROR: type annotations needed
-}
-
-fn main() {}
diff --git a/tests/ui/type-alias-impl-trait/fallback.stderr b/tests/ui/type-alias-impl-trait/fallback.stderr
deleted file mode 100644
index 1eb0afb13a8..00000000000
--- a/tests/ui/type-alias-impl-trait/fallback.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error[E0283]: type annotations needed
-  --> $DIR/fallback.rs:25:5
-   |
-LL | fn unconstrained_foo() -> Wrapper<Foo> {
-   |                           ------------ type must be known at this point
-LL |     Wrapper::Second
-   |     ^^^^^^^^^^^^^^^
-   |     |
-   |     cannot infer type of the type parameter `T` declared on the enum `Wrapper`
-   |     return type was inferred to be `Wrapper<_>` here
-   |
-   = note: cannot satisfy `_: Copy`
-help: consider specifying the generic argument
-   |
-LL |     Wrapper::<T>::Second
-   |            +++++
-
-error: aborting due to 1 previous error
-
-For more information about this error, try `rustc --explain E0283`.