From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- .../missing-trait-bounds/auxiliary/issue-69725.rs | 8 ---- src/test/ui/missing-trait-bounds/issue-35677.fixed | 11 ----- src/test/ui/missing-trait-bounds/issue-35677.rs | 11 ----- .../ui/missing-trait-bounds/issue-35677.stderr | 17 ------- src/test/ui/missing-trait-bounds/issue-69725.fixed | 13 ------ src/test/ui/missing-trait-bounds/issue-69725.rs | 13 ------ .../ui/missing-trait-bounds/issue-69725.stderr | 22 --------- .../missing-trait-bound-for-op.fixed | 7 --- .../missing-trait-bound-for-op.rs | 7 --- .../missing-trait-bound-for-op.stderr | 16 ------- .../missing-trait-bounds-for-method-call.rs | 31 ------------- .../missing-trait-bounds-for-method-call.stderr | 52 ---------------------- 12 files changed, 208 deletions(-) delete mode 100644 src/test/ui/missing-trait-bounds/auxiliary/issue-69725.rs delete mode 100644 src/test/ui/missing-trait-bounds/issue-35677.fixed delete mode 100644 src/test/ui/missing-trait-bounds/issue-35677.rs delete mode 100644 src/test/ui/missing-trait-bounds/issue-35677.stderr delete mode 100644 src/test/ui/missing-trait-bounds/issue-69725.fixed delete mode 100644 src/test/ui/missing-trait-bounds/issue-69725.rs delete mode 100644 src/test/ui/missing-trait-bounds/issue-69725.stderr delete mode 100644 src/test/ui/missing-trait-bounds/missing-trait-bound-for-op.fixed delete mode 100644 src/test/ui/missing-trait-bounds/missing-trait-bound-for-op.rs delete mode 100644 src/test/ui/missing-trait-bounds/missing-trait-bound-for-op.stderr delete mode 100644 src/test/ui/missing-trait-bounds/missing-trait-bounds-for-method-call.rs delete mode 100644 src/test/ui/missing-trait-bounds/missing-trait-bounds-for-method-call.stderr (limited to 'src/test/ui/missing-trait-bounds') diff --git a/src/test/ui/missing-trait-bounds/auxiliary/issue-69725.rs b/src/test/ui/missing-trait-bounds/auxiliary/issue-69725.rs deleted file mode 100644 index 13606e498..000000000 --- a/src/test/ui/missing-trait-bounds/auxiliary/issue-69725.rs +++ /dev/null @@ -1,8 +0,0 @@ -#[derive(Clone)] -pub struct Struct(A); - -impl Struct { - pub fn new() -> Self { - todo!() - } -} diff --git a/src/test/ui/missing-trait-bounds/issue-35677.fixed b/src/test/ui/missing-trait-bounds/issue-35677.fixed deleted file mode 100644 index 08174d8d8..000000000 --- a/src/test/ui/missing-trait-bounds/issue-35677.fixed +++ /dev/null @@ -1,11 +0,0 @@ -// run-rustfix -#![allow(dead_code)] -use std::collections::HashSet; -use std::hash::Hash; - -fn is_subset(this: &HashSet, other: &HashSet) -> bool where T: Eq, T: Hash { - this.is_subset(other) - //~^ ERROR the method -} - -fn main() {} diff --git a/src/test/ui/missing-trait-bounds/issue-35677.rs b/src/test/ui/missing-trait-bounds/issue-35677.rs deleted file mode 100644 index 2cb394386..000000000 --- a/src/test/ui/missing-trait-bounds/issue-35677.rs +++ /dev/null @@ -1,11 +0,0 @@ -// run-rustfix -#![allow(dead_code)] -use std::collections::HashSet; -use std::hash::Hash; - -fn is_subset(this: &HashSet, other: &HashSet) -> bool { - this.is_subset(other) - //~^ ERROR the method -} - -fn main() {} diff --git a/src/test/ui/missing-trait-bounds/issue-35677.stderr b/src/test/ui/missing-trait-bounds/issue-35677.stderr deleted file mode 100644 index a2201b946..000000000 --- a/src/test/ui/missing-trait-bounds/issue-35677.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0599]: the method `is_subset` exists for reference `&HashSet`, but its trait bounds were not satisfied - --> $DIR/issue-35677.rs:7:10 - | -LL | this.is_subset(other) - | ^^^^^^^^^ method cannot be called on `&HashSet` due to unsatisfied trait bounds - | - = note: the following trait bounds were not satisfied: - `T: Eq` - `T: Hash` -help: consider restricting the type parameters to satisfy the trait bounds - | -LL | fn is_subset(this: &HashSet, other: &HashSet) -> bool where T: Eq, T: Hash { - | ++++++++++++++++++++ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0599`. diff --git a/src/test/ui/missing-trait-bounds/issue-69725.fixed b/src/test/ui/missing-trait-bounds/issue-69725.fixed deleted file mode 100644 index d57badcfd..000000000 --- a/src/test/ui/missing-trait-bounds/issue-69725.fixed +++ /dev/null @@ -1,13 +0,0 @@ -// run-rustfix -// aux-build:issue-69725.rs -#![allow(dead_code)] - -extern crate issue_69725; -use issue_69725::Struct; - -fn crash() where A: Clone { - let _ = Struct::::new().clone(); - //~^ ERROR: the method -} - -fn main() {} diff --git a/src/test/ui/missing-trait-bounds/issue-69725.rs b/src/test/ui/missing-trait-bounds/issue-69725.rs deleted file mode 100644 index 9c88969c5..000000000 --- a/src/test/ui/missing-trait-bounds/issue-69725.rs +++ /dev/null @@ -1,13 +0,0 @@ -// run-rustfix -// aux-build:issue-69725.rs -#![allow(dead_code)] - -extern crate issue_69725; -use issue_69725::Struct; - -fn crash() { - let _ = Struct::::new().clone(); - //~^ ERROR: the method -} - -fn main() {} diff --git a/src/test/ui/missing-trait-bounds/issue-69725.stderr b/src/test/ui/missing-trait-bounds/issue-69725.stderr deleted file mode 100644 index 980d9dd16..000000000 --- a/src/test/ui/missing-trait-bounds/issue-69725.stderr +++ /dev/null @@ -1,22 +0,0 @@ -error[E0599]: the method `clone` exists for struct `Struct`, but its trait bounds were not satisfied - --> $DIR/issue-69725.rs:9:32 - | -LL | let _ = Struct::::new().clone(); - | ^^^^^ method cannot be called on `Struct` due to unsatisfied trait bounds - | - ::: $DIR/auxiliary/issue-69725.rs:2:1 - | -LL | pub struct Struct(A); - | -------------------- doesn't satisfy `Struct: Clone` - | - = note: the following trait bounds were not satisfied: - `A: Clone` - which is required by `Struct: Clone` -help: consider restricting the type parameter to satisfy the trait bound - | -LL | fn crash() where A: Clone { - | ++++++++++++++ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0599`. diff --git a/src/test/ui/missing-trait-bounds/missing-trait-bound-for-op.fixed b/src/test/ui/missing-trait-bounds/missing-trait-bound-for-op.fixed deleted file mode 100644 index 6b24375e4..000000000 --- a/src/test/ui/missing-trait-bounds/missing-trait-bound-for-op.fixed +++ /dev/null @@ -1,7 +0,0 @@ -// run-rustfix - -pub fn foo(s: &[T], t: &[T]) { - let _ = s == t; //~ ERROR binary operation `==` cannot be applied to type `&[T]` -} - -fn main() {} diff --git a/src/test/ui/missing-trait-bounds/missing-trait-bound-for-op.rs b/src/test/ui/missing-trait-bounds/missing-trait-bound-for-op.rs deleted file mode 100644 index df47be070..000000000 --- a/src/test/ui/missing-trait-bounds/missing-trait-bound-for-op.rs +++ /dev/null @@ -1,7 +0,0 @@ -// run-rustfix - -pub fn foo(s: &[T], t: &[T]) { - let _ = s == t; //~ ERROR binary operation `==` cannot be applied to type `&[T]` -} - -fn main() {} diff --git a/src/test/ui/missing-trait-bounds/missing-trait-bound-for-op.stderr b/src/test/ui/missing-trait-bounds/missing-trait-bound-for-op.stderr deleted file mode 100644 index cde075501..000000000 --- a/src/test/ui/missing-trait-bounds/missing-trait-bound-for-op.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0369]: binary operation `==` cannot be applied to type `&[T]` - --> $DIR/missing-trait-bound-for-op.rs:4:15 - | -LL | let _ = s == t; - | - ^^ - &[T] - | | - | &[T] - | -help: consider restricting type parameter `T` - | -LL | pub fn foo(s: &[T], t: &[T]) { - | +++++++++++++++++++++ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0369`. diff --git a/src/test/ui/missing-trait-bounds/missing-trait-bounds-for-method-call.rs b/src/test/ui/missing-trait-bounds/missing-trait-bounds-for-method-call.rs deleted file mode 100644 index afd47f71c..000000000 --- a/src/test/ui/missing-trait-bounds/missing-trait-bounds-for-method-call.rs +++ /dev/null @@ -1,31 +0,0 @@ -#[derive(Default, PartialEq)] -struct Foo { - bar: Box<[T]>, -} - -trait Bar { - fn foo(&self) {} -} - -impl Bar for Foo {} - -impl Foo { - fn bar(&self) { - self.foo(); - //~^ ERROR the method - } -} - -struct Fin where T: Bar { - bar: Box<[T]>, -} - -impl Bar for Fin {} - -impl Fin { - fn bar(&self) { - self.foo(); - //~^ ERROR the method - } -} -fn main() {} diff --git a/src/test/ui/missing-trait-bounds/missing-trait-bounds-for-method-call.stderr b/src/test/ui/missing-trait-bounds/missing-trait-bounds-for-method-call.stderr deleted file mode 100644 index 9e94aa2c7..000000000 --- a/src/test/ui/missing-trait-bounds/missing-trait-bounds-for-method-call.stderr +++ /dev/null @@ -1,52 +0,0 @@ -error[E0599]: the method `foo` exists for reference `&Foo`, but its trait bounds were not satisfied - --> $DIR/missing-trait-bounds-for-method-call.rs:14:14 - | -LL | struct Foo { - | ------------- doesn't satisfy `Foo: Bar` -... -LL | self.foo(); - | ^^^ method cannot be called on `&Foo` due to unsatisfied trait bounds - | -note: trait bound `T: Default` was not satisfied - --> $DIR/missing-trait-bounds-for-method-call.rs:10:9 - | -LL | impl Bar for Foo {} - | ^^^^^^^ --- ------ - | | - | unsatisfied trait bound introduced here -note: trait bound `T: Bar` was not satisfied - --> $DIR/missing-trait-bounds-for-method-call.rs:10:19 - | -LL | impl Bar for Foo {} - | ^^^ --- ------ - | | - | unsatisfied trait bound introduced here -help: consider restricting the type parameters to satisfy the trait bounds - | -LL | struct Foo where T: Bar, T: Default { - | ++++++++++++++++++++++++ - -error[E0599]: the method `foo` exists for reference `&Fin`, but its trait bounds were not satisfied - --> $DIR/missing-trait-bounds-for-method-call.rs:27:14 - | -LL | struct Fin where T: Bar { - | ------------- doesn't satisfy `Fin: Bar` -... -LL | self.foo(); - | ^^^ method cannot be called on `&Fin` due to unsatisfied trait bounds - | -note: trait bound `T: Default` was not satisfied - --> $DIR/missing-trait-bounds-for-method-call.rs:23:9 - | -LL | impl Bar for Fin {} - | ^^^^^^^ --- ------ - | | - | unsatisfied trait bound introduced here -help: consider restricting the type parameter to satisfy the trait bound - | -LL | struct Fin where T: Bar, T: Default { - | ++++++++++++ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0599`. -- cgit v1.2.3