From cf9bcb26a6582dcc9cceebb455acf330feda28f6 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Thu, 27 Jun 2024 11:09:20 +0000 Subject: [PATCH 1/2] Remove duplicate of tests/ui/impl-trait/nested-return-type2.rs --- tests/ui/type/subtyping-opaque-type.rs | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 tests/ui/type/subtyping-opaque-type.rs diff --git a/tests/ui/type/subtyping-opaque-type.rs b/tests/ui/type/subtyping-opaque-type.rs deleted file mode 100644 index e17114a3647..00000000000 --- a/tests/ui/type/subtyping-opaque-type.rs +++ /dev/null @@ -1,19 +0,0 @@ -//@ check-pass -//@ compile-flags: -Zvalidate-mir -trait Duh {} - -impl Duh for i32 {} - -trait Trait { - type Assoc: Duh; -} - -impl R> Trait for F { - type Assoc = R; -} - -fn foo() -> impl Trait { - || 42 -} - -fn main() {} From 10a513bacc994ebffcd088b798caa52c55064332 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Thu, 27 Jun 2024 11:10:55 +0000 Subject: [PATCH 2/2] Remove duplicate of tests/ui/impl-trait/nested-return-type2-tait2.rs --- ...it-in-function-return-type-issue-101903.rs | 29 ------------------- ...n-function-return-type-issue-101903.stderr | 13 --------- 2 files changed, 42 deletions(-) delete mode 100644 tests/ui/type-alias-impl-trait/tait-in-function-return-type-issue-101903.rs delete mode 100644 tests/ui/type-alias-impl-trait/tait-in-function-return-type-issue-101903.stderr diff --git a/tests/ui/type-alias-impl-trait/tait-in-function-return-type-issue-101903.rs b/tests/ui/type-alias-impl-trait/tait-in-function-return-type-issue-101903.rs deleted file mode 100644 index 4f9d54737dc..00000000000 --- a/tests/ui/type-alias-impl-trait/tait-in-function-return-type-issue-101903.rs +++ /dev/null @@ -1,29 +0,0 @@ -//@ check-pass - -// See https://doc.rust-lang.org/1.77.0/nightly-rustc/rustc_lint/opaque_hidden_inferred_bound/static.OPAQUE_HIDDEN_INFERRED_BOUND.html#example - -#![feature(type_alias_impl_trait)] -#![allow(dead_code)] - -trait Duh {} - -impl Duh for i32 {} - -trait Trait { - type Assoc: Duh; -} - -impl R> Trait for F { - type Assoc = R; -} - -type Sendable = impl Send; - -type Foo = impl Trait; - //~^ WARNING opaque type `Foo` does not satisfy its associated type bounds - -fn foo() -> Foo { - || 42 -} - -fn main() {} diff --git a/tests/ui/type-alias-impl-trait/tait-in-function-return-type-issue-101903.stderr b/tests/ui/type-alias-impl-trait/tait-in-function-return-type-issue-101903.stderr deleted file mode 100644 index 68def454c7f..00000000000 --- a/tests/ui/type-alias-impl-trait/tait-in-function-return-type-issue-101903.stderr +++ /dev/null @@ -1,13 +0,0 @@ -warning: opaque type `Foo` does not satisfy its associated type bounds - --> $DIR/tait-in-function-return-type-issue-101903.rs:22:23 - | -LL | type Assoc: Duh; - | --- this associated type bound is unsatisfied for `Sendable` -... -LL | type Foo = impl Trait; - | ^^^^^^^^^^^^^^^^ - | - = note: `#[warn(opaque_hidden_inferred_bound)]` on by default - -warning: 1 warning emitted -