From a4b7ed7a42c716ab9f05e351f003d589124fd55d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:58 +0200 Subject: Adding upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- .../ui/where-clauses/auxiliary/where_clauses_xc.rs | 19 ---------- .../higher-ranked-fn-type.quiet.stderr | 18 ---------- src/test/ui/where-clauses/higher-ranked-fn-type.rs | 25 ------------- .../higher-ranked-fn-type.verbose.stderr | 18 ---------- .../where-clause-bounds-inconsistency.rs | 23 ------------ ...ause-constraints-are-local-for-inherent-impl.rs | 18 ---------- ...-constraints-are-local-for-inherent-impl.stderr | 21 ----------- ...-clause-constraints-are-local-for-trait-impl.rs | 23 ------------ ...use-constraints-are-local-for-trait-impl.stderr | 21 ----------- .../where-clause-early-bound-lifetimes.rs | 18 ---------- .../where-clause-method-substituion-rpass.rs | 23 ------------ .../where-clause-method-substituion.rs | 22 ------------ .../where-clause-method-substituion.stderr | 15 -------- .../where-clauses/where-clause-region-outlives.rs | 12 ------- .../ui/where-clauses/where-clauses-cross-crate.rs | 13 ------- .../ui/where-clauses/where-clauses-lifetimes.rs | 10 ------ .../where-clauses-method-unsatisfied.rs | 20 ----------- .../where-clauses-method-unsatisfied.stderr | 19 ---------- src/test/ui/where-clauses/where-clauses-method.rs | 20 ----------- .../where-clauses-unboxed-closures.rs | 17 --------- .../ui/where-clauses/where-clauses-unsatisfied.rs | 8 ----- .../where-clauses/where-clauses-unsatisfied.stderr | 19 ---------- src/test/ui/where-clauses/where-clauses.rs | 27 -------------- .../ui/where-clauses/where-equality-constraints.rs | 6 ---- .../where-equality-constraints.stderr | 18 ---------- src/test/ui/where-clauses/where-for-self-2.rs | 24 ------------- src/test/ui/where-clauses/where-for-self-2.stderr | 11 ------ src/test/ui/where-clauses/where-for-self.rs | 19 ---------- src/test/ui/where-clauses/where-for-self.stderr | 9 ----- .../ui/where-clauses/where-lifetime-resolution.rs | 12 ------- .../where-clauses/where-lifetime-resolution.stderr | 42 ---------------------- 31 files changed, 570 deletions(-) delete mode 100644 src/test/ui/where-clauses/auxiliary/where_clauses_xc.rs delete mode 100644 src/test/ui/where-clauses/higher-ranked-fn-type.quiet.stderr delete mode 100644 src/test/ui/where-clauses/higher-ranked-fn-type.rs delete mode 100644 src/test/ui/where-clauses/higher-ranked-fn-type.verbose.stderr delete mode 100644 src/test/ui/where-clauses/where-clause-bounds-inconsistency.rs delete mode 100644 src/test/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.rs delete mode 100644 src/test/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.stderr delete mode 100644 src/test/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.rs delete mode 100644 src/test/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.stderr delete mode 100644 src/test/ui/where-clauses/where-clause-early-bound-lifetimes.rs delete mode 100644 src/test/ui/where-clauses/where-clause-method-substituion-rpass.rs delete mode 100644 src/test/ui/where-clauses/where-clause-method-substituion.rs delete mode 100644 src/test/ui/where-clauses/where-clause-method-substituion.stderr delete mode 100644 src/test/ui/where-clauses/where-clause-region-outlives.rs delete mode 100644 src/test/ui/where-clauses/where-clauses-cross-crate.rs delete mode 100644 src/test/ui/where-clauses/where-clauses-lifetimes.rs delete mode 100644 src/test/ui/where-clauses/where-clauses-method-unsatisfied.rs delete mode 100644 src/test/ui/where-clauses/where-clauses-method-unsatisfied.stderr delete mode 100644 src/test/ui/where-clauses/where-clauses-method.rs delete mode 100644 src/test/ui/where-clauses/where-clauses-unboxed-closures.rs delete mode 100644 src/test/ui/where-clauses/where-clauses-unsatisfied.rs delete mode 100644 src/test/ui/where-clauses/where-clauses-unsatisfied.stderr delete mode 100644 src/test/ui/where-clauses/where-clauses.rs delete mode 100644 src/test/ui/where-clauses/where-equality-constraints.rs delete mode 100644 src/test/ui/where-clauses/where-equality-constraints.stderr delete mode 100644 src/test/ui/where-clauses/where-for-self-2.rs delete mode 100644 src/test/ui/where-clauses/where-for-self-2.stderr delete mode 100644 src/test/ui/where-clauses/where-for-self.rs delete mode 100644 src/test/ui/where-clauses/where-for-self.stderr delete mode 100644 src/test/ui/where-clauses/where-lifetime-resolution.rs delete mode 100644 src/test/ui/where-clauses/where-lifetime-resolution.stderr (limited to 'src/test/ui/where-clauses') diff --git a/src/test/ui/where-clauses/auxiliary/where_clauses_xc.rs b/src/test/ui/where-clauses/auxiliary/where_clauses_xc.rs deleted file mode 100644 index 7c8043b20..000000000 --- a/src/test/ui/where-clauses/auxiliary/where_clauses_xc.rs +++ /dev/null @@ -1,19 +0,0 @@ -pub trait Equal { - fn equal(&self, other: &Self) -> bool; - fn equals(&self, this: &T, that: &T, x: &U, y: &U) -> bool - where T: Eq, U: Eq; -} - -impl Equal for T where T: Eq { - fn equal(&self, other: &T) -> bool { - self == other - } - fn equals(&self, this: &U, other: &U, x: &X, y: &X) -> bool - where U: Eq, X: Eq { - this == other && x == y - } -} - -pub fn equal(x: &T, y: &T) -> bool where T: Eq { - x == y -} diff --git a/src/test/ui/where-clauses/higher-ranked-fn-type.quiet.stderr b/src/test/ui/where-clauses/higher-ranked-fn-type.quiet.stderr deleted file mode 100644 index 30248a7a3..000000000 --- a/src/test/ui/where-clauses/higher-ranked-fn-type.quiet.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error[E0277]: the trait bound `for<'b> fn(&'b ()): Foo` is not satisfied - --> $DIR/higher-ranked-fn-type.rs:20:5 - | -LL | called() - | ^^^^^^ the trait `for<'b> Foo` is not implemented for `fn(&'b ())` - | -note: required by a bound in `called` - --> $DIR/higher-ranked-fn-type.rs:12:25 - | -LL | fn called() - | ------ required by a bound in this -LL | where -LL | for<'b> fn(&'b ()): Foo, - | ^^^ required by this bound in `called` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/where-clauses/higher-ranked-fn-type.rs b/src/test/ui/where-clauses/higher-ranked-fn-type.rs deleted file mode 100644 index c19e75eb7..000000000 --- a/src/test/ui/where-clauses/higher-ranked-fn-type.rs +++ /dev/null @@ -1,25 +0,0 @@ -// revisions: quiet verbose -// [verbose]compile-flags: -Zverbose - -#![allow(unused_parens)] - -trait Foo { - type Assoc; -} - -fn called() -where - for<'b> fn(&'b ()): Foo, -{ -} - -fn caller() -where - (for<'a> fn(&'a ())): Foo, -{ - called() - //[quiet]~^ ERROR the trait bound `for<'b> fn(&'b ()): Foo` is not satisfied - //[verbose]~^^ ERROR the trait bound `for fn(&ReLateBound(DebruijnIndex(1), BoundRegion { var: 0, kind: BrNamed(DefId(0:6 ~ higher_ranked_fn_type[1209]::called::'b), 'b) }) ()): Foo` is not satisfied - --> $DIR/higher-ranked-fn-type.rs:20:5 - | -LL | called() - | ^^^^^^ the trait `for Foo` is not implemented for `fn(&ReLateBound(DebruijnIndex(1), BoundRegion { var: 0, kind: BrNamed(DefId(0:6 ~ higher_ranked_fn_type[1209]::called::'b), 'b) }) ())` - | -note: required by a bound in `called` - --> $DIR/higher-ranked-fn-type.rs:12:25 - | -LL | fn called() - | ------ required by a bound in this -LL | where -LL | for<'b> fn(&'b ()): Foo, - | ^^^ required by this bound in `called` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/where-clauses/where-clause-bounds-inconsistency.rs b/src/test/ui/where-clauses/where-clause-bounds-inconsistency.rs deleted file mode 100644 index cf7d06b61..000000000 --- a/src/test/ui/where-clauses/where-clause-bounds-inconsistency.rs +++ /dev/null @@ -1,23 +0,0 @@ -// run-pass -// pretty-expanded FIXME #23616 - -trait Bound { - fn dummy(&self) { } -} - -trait Trait { - fn a(&self, _: T) where T: Bound; - fn b(&self, _: T) where T: Bound; - fn c(&self, _: T); - fn d(&self, _: T); -} - -impl Trait for bool { - fn a(&self, _: T) {} - //^~ This gets rejected but should be accepted - fn b(&self, _: T) where T: Bound {} - fn c(&self, _: T) {} - fn d(&self, _: T) where T: Bound {} -} - -fn main() {} diff --git a/src/test/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.rs b/src/test/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.rs deleted file mode 100644 index 0e8bb61a7..000000000 --- a/src/test/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.rs +++ /dev/null @@ -1,18 +0,0 @@ -fn require_copy(x: T) {} - -struct Foo { x: T } - -// Ensure constraints are only attached to methods locally -impl Foo { - fn needs_copy(self) where T: Copy { - require_copy(self.x); - - } - - fn fails_copy(self) { - require_copy(self.x); - //~^ ERROR the trait bound `T: Copy` is not satisfied - } -} - -fn main() {} diff --git a/src/test/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.stderr b/src/test/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.stderr deleted file mode 100644 index 43fbc0a90..000000000 --- a/src/test/ui/where-clauses/where-clause-constraints-are-local-for-inherent-impl.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0277]: the trait bound `T: Copy` is not satisfied - --> $DIR/where-clause-constraints-are-local-for-inherent-impl.rs:13:22 - | -LL | require_copy(self.x); - | ------------ ^^^^^^ the trait `Copy` is not implemented for `T` - | | - | required by a bound introduced by this call - | -note: required by a bound in `require_copy` - --> $DIR/where-clause-constraints-are-local-for-inherent-impl.rs:1:20 - | -LL | fn require_copy(x: T) {} - | ^^^^ required by this bound in `require_copy` -help: consider restricting type parameter `T` - | -LL | impl Foo { - | +++++++++++++++++++ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.rs b/src/test/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.rs deleted file mode 100644 index 25c46330e..000000000 --- a/src/test/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.rs +++ /dev/null @@ -1,23 +0,0 @@ -fn require_copy(x: T) {} - -struct Bar { x: T } - -trait Foo { - fn needs_copy(self) where T: Copy; - fn fails_copy(self); -} - -// Ensure constraints are only attached to methods locally -impl Foo for Bar { - fn needs_copy(self) where T: Copy { - require_copy(self.x); - - } - - fn fails_copy(self) { - require_copy(self.x); - //~^ ERROR the trait bound `T: Copy` is not satisfied - } -} - -fn main() {} diff --git a/src/test/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.stderr b/src/test/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.stderr deleted file mode 100644 index f2db8fcc4..000000000 --- a/src/test/ui/where-clauses/where-clause-constraints-are-local-for-trait-impl.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0277]: the trait bound `T: Copy` is not satisfied - --> $DIR/where-clause-constraints-are-local-for-trait-impl.rs:18:22 - | -LL | require_copy(self.x); - | ------------ ^^^^^^ the trait `Copy` is not implemented for `T` - | | - | required by a bound introduced by this call - | -note: required by a bound in `require_copy` - --> $DIR/where-clause-constraints-are-local-for-trait-impl.rs:1:20 - | -LL | fn require_copy(x: T) {} - | ^^^^ required by this bound in `require_copy` -help: consider restricting type parameter `T` - | -LL | impl Foo for Bar { - | +++++++++++++++++++ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/where-clauses/where-clause-early-bound-lifetimes.rs b/src/test/ui/where-clauses/where-clause-early-bound-lifetimes.rs deleted file mode 100644 index 6fc570b9b..000000000 --- a/src/test/ui/where-clauses/where-clause-early-bound-lifetimes.rs +++ /dev/null @@ -1,18 +0,0 @@ -// run-pass -#![allow(non_upper_case_globals)] - -// pretty-expanded FIXME #23616 - -trait TheTrait { fn dummy(&self) { } } - -impl TheTrait for &'static isize { } - -fn foo<'a,T>(_: &'a T) where &'a T : TheTrait { } - -fn bar(_: &'static T) where &'static T : TheTrait { } - -fn main() { - static x: isize = 1; - foo(&x); - bar(&x); -} diff --git a/src/test/ui/where-clauses/where-clause-method-substituion-rpass.rs b/src/test/ui/where-clauses/where-clause-method-substituion-rpass.rs deleted file mode 100644 index daa3c8dd8..000000000 --- a/src/test/ui/where-clauses/where-clause-method-substituion-rpass.rs +++ /dev/null @@ -1,23 +0,0 @@ -// run-pass -#![allow(unused_variables)] -// pretty-expanded FIXME #23616 - -trait Foo { fn dummy(&self, arg: T) { } } - -trait Bar { - fn method(&self) where A: Foo; -} - -struct S; -struct X; - -impl Foo for X {} - -impl Bar for i32 { - fn method(&self) where X: Foo { - } -} - -fn main() { - 1.method::(); -} diff --git a/src/test/ui/where-clauses/where-clause-method-substituion.rs b/src/test/ui/where-clauses/where-clause-method-substituion.rs deleted file mode 100644 index 4607783c0..000000000 --- a/src/test/ui/where-clauses/where-clause-method-substituion.rs +++ /dev/null @@ -1,22 +0,0 @@ -trait Foo { - fn dummy(&self, t: T) { } -} - -trait Bar { - fn method(&self) where A: Foo; -} - -struct S; -struct X; - -// Remove this impl causing the below resolution to fail // impl Foo for X {} - -impl Bar for isize { - fn method(&self) where X: Foo { - } -} - -fn main() { - 1.method::(); - //~^ ERROR the trait bound `X: Foo` is not satisfied -} diff --git a/src/test/ui/where-clauses/where-clause-method-substituion.stderr b/src/test/ui/where-clauses/where-clause-method-substituion.stderr deleted file mode 100644 index 8c47ed6d4..000000000 --- a/src/test/ui/where-clauses/where-clause-method-substituion.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0277]: the trait bound `X: Foo` is not satisfied - --> $DIR/where-clause-method-substituion.rs:20:16 - | -LL | 1.method::(); - | ^ the trait `Foo` is not implemented for `X` - | -note: required by a bound in `Bar::method` - --> $DIR/where-clause-method-substituion.rs:6:34 - | -LL | fn method(&self) where A: Foo; - | ^^^^^^ required by this bound in `Bar::method` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/where-clauses/where-clause-region-outlives.rs b/src/test/ui/where-clauses/where-clause-region-outlives.rs deleted file mode 100644 index 84925345d..000000000 --- a/src/test/ui/where-clauses/where-clause-region-outlives.rs +++ /dev/null @@ -1,12 +0,0 @@ -// run-pass -#![allow(dead_code)] -#![allow(unused_variables)] -// pretty-expanded FIXME #23616 - -struct A<'a, 'b> where 'a : 'b { x: &'a isize, y: &'b isize } - -fn main() { - let x = 1; - let y = 1; - let a = A { x: &x, y: &y }; -} diff --git a/src/test/ui/where-clauses/where-clauses-cross-crate.rs b/src/test/ui/where-clauses/where-clauses-cross-crate.rs deleted file mode 100644 index 9edf0bd5b..000000000 --- a/src/test/ui/where-clauses/where-clauses-cross-crate.rs +++ /dev/null @@ -1,13 +0,0 @@ -// run-pass -// aux-build:where_clauses_xc.rs - -extern crate where_clauses_xc; - -use where_clauses_xc::{Equal, equal}; - -fn main() { - println!("{}", equal(&1, &2)); - println!("{}", equal(&1, &1)); - println!("{}", "hello".equal(&"hello")); - println!("{}", "hello".equals::(&1, &1, &"foo", &"bar")); -} diff --git a/src/test/ui/where-clauses/where-clauses-lifetimes.rs b/src/test/ui/where-clauses/where-clauses-lifetimes.rs deleted file mode 100644 index 4bfd9e659..000000000 --- a/src/test/ui/where-clauses/where-clauses-lifetimes.rs +++ /dev/null @@ -1,10 +0,0 @@ -// run-pass -#![allow(unused_mut)] -#![allow(unused_variables)] -// pretty-expanded FIXME #23616 - -fn foo<'a, I>(mut it: I) where I: Iterator {} - -fn main() { - foo([1, 2].iter()); -} diff --git a/src/test/ui/where-clauses/where-clauses-method-unsatisfied.rs b/src/test/ui/where-clauses/where-clauses-method-unsatisfied.rs deleted file mode 100644 index a8ae02964..000000000 --- a/src/test/ui/where-clauses/where-clauses-method-unsatisfied.rs +++ /dev/null @@ -1,20 +0,0 @@ -// Test that a where clause attached to a method allows us to add -// additional constraints to a parameter out of scope. - -struct Foo { - value: T -} - -struct Bar; // does not implement Eq - -impl Foo { - fn equals(&self, u: &Foo) -> bool where T : Eq { - self.value == u.value - } -} - -fn main() { - let x = Foo { value: Bar }; - x.equals(&x); - //~^ ERROR `Bar: Eq` is not satisfied -} diff --git a/src/test/ui/where-clauses/where-clauses-method-unsatisfied.stderr b/src/test/ui/where-clauses/where-clauses-method-unsatisfied.stderr deleted file mode 100644 index e90502977..000000000 --- a/src/test/ui/where-clauses/where-clauses-method-unsatisfied.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error[E0277]: the trait bound `Bar: Eq` is not satisfied - --> $DIR/where-clauses-method-unsatisfied.rs:18:7 - | -LL | x.equals(&x); - | ^^^^^^ the trait `Eq` is not implemented for `Bar` - | -note: required by a bound in `Foo::::equals` - --> $DIR/where-clauses-method-unsatisfied.rs:11:52 - | -LL | fn equals(&self, u: &Foo) -> bool where T : Eq { - | ^^ required by this bound in `Foo::::equals` -help: consider annotating `Bar` with `#[derive(Eq)]` - | -LL | #[derive(Eq)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/where-clauses/where-clauses-method.rs b/src/test/ui/where-clauses/where-clauses-method.rs deleted file mode 100644 index feecff435..000000000 --- a/src/test/ui/where-clauses/where-clauses-method.rs +++ /dev/null @@ -1,20 +0,0 @@ -// run-pass -// Test that a where clause attached to a method allows us to add -// additional constraints to a parameter out of scope. - -struct Foo { - value: T -} - -impl Foo { - fn equals(&self, u: &Foo) -> bool where T : Eq { - self.value == u.value - } -} - -fn main() { - let x = Foo { value: 1 }; - let y = Foo { value: 2 }; - println!("{}", x.equals(&x)); - println!("{}", x.equals(&y)); -} diff --git a/src/test/ui/where-clauses/where-clauses-unboxed-closures.rs b/src/test/ui/where-clauses/where-clauses-unboxed-closures.rs deleted file mode 100644 index 6964cfa2e..000000000 --- a/src/test/ui/where-clauses/where-clauses-unboxed-closures.rs +++ /dev/null @@ -1,17 +0,0 @@ -// run-pass -#![allow(unused_variables)] -// pretty-expanded FIXME #23616 - -struct Bencher; - -// ICE -fn warm_up<'a, F>(f: F) where F: Fn(&'a mut Bencher) { -} - -fn main() { - // ICE trigger - warm_up(|b: &mut Bencher| () ); - - // OK - warm_up(|b| () ); -} diff --git a/src/test/ui/where-clauses/where-clauses-unsatisfied.rs b/src/test/ui/where-clauses/where-clauses-unsatisfied.rs deleted file mode 100644 index 8b067d30a..000000000 --- a/src/test/ui/where-clauses/where-clauses-unsatisfied.rs +++ /dev/null @@ -1,8 +0,0 @@ -fn equal(a: &T, b: &T) -> bool where T : Eq { a == b } - -struct Struct; - -fn main() { - drop(equal(&Struct, &Struct)) - //~^ ERROR the trait bound `Struct: Eq` is not satisfied -} diff --git a/src/test/ui/where-clauses/where-clauses-unsatisfied.stderr b/src/test/ui/where-clauses/where-clauses-unsatisfied.stderr deleted file mode 100644 index b1805a452..000000000 --- a/src/test/ui/where-clauses/where-clauses-unsatisfied.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error[E0277]: the trait bound `Struct: Eq` is not satisfied - --> $DIR/where-clauses-unsatisfied.rs:6:10 - | -LL | drop(equal(&Struct, &Struct)) - | ^^^^^ the trait `Eq` is not implemented for `Struct` - | -note: required by a bound in `equal` - --> $DIR/where-clauses-unsatisfied.rs:1:45 - | -LL | fn equal(a: &T, b: &T) -> bool where T : Eq { a == b } - | ^^ required by this bound in `equal` -help: consider annotating `Struct` with `#[derive(Eq)]` - | -LL | #[derive(Eq)] - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/where-clauses/where-clauses.rs b/src/test/ui/where-clauses/where-clauses.rs deleted file mode 100644 index 905ef7c5e..000000000 --- a/src/test/ui/where-clauses/where-clauses.rs +++ /dev/null @@ -1,27 +0,0 @@ -// run-pass -trait Equal { - fn equal(&self, other: &Self) -> bool; - fn equals(&self, this: &T, that: &T, x: &U, y: &U) -> bool - where T: Eq, U: Eq; -} - -impl Equal for T where T: Eq { - fn equal(&self, other: &T) -> bool { - self == other - } - fn equals(&self, this: &U, other: &U, x: &X, y: &X) -> bool - where U: Eq, X: Eq { - this == other && x == y - } -} - -fn equal(x: &T, y: &T) -> bool where T: Eq { - x == y -} - -fn main() { - println!("{}", equal(&1, &2)); - println!("{}", equal(&1, &1)); - println!("{}", "hello".equal(&"hello")); - println!("{}", "hello".equals::(&1, &1, &"foo", &"bar")); -} diff --git a/src/test/ui/where-clauses/where-equality-constraints.rs b/src/test/ui/where-clauses/where-equality-constraints.rs deleted file mode 100644 index 8828f09d9..000000000 --- a/src/test/ui/where-clauses/where-equality-constraints.rs +++ /dev/null @@ -1,6 +0,0 @@ -fn f() where u8 = u16 {} -//~^ ERROR equality constraints are not yet supported in `where` clauses -fn g() where for<'a> &'static (u8,) == u16, {} -//~^ ERROR equality constraints are not yet supported in `where` clauses - -fn main() {} diff --git a/src/test/ui/where-clauses/where-equality-constraints.stderr b/src/test/ui/where-clauses/where-equality-constraints.stderr deleted file mode 100644 index 9d8fac02e..000000000 --- a/src/test/ui/where-clauses/where-equality-constraints.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error: equality constraints are not yet supported in `where` clauses - --> $DIR/where-equality-constraints.rs:1:14 - | -LL | fn f() where u8 = u16 {} - | ^^^^^^^^ not supported - | - = note: see issue #20041 for more information - -error: equality constraints are not yet supported in `where` clauses - --> $DIR/where-equality-constraints.rs:3:14 - | -LL | fn g() where for<'a> &'static (u8,) == u16, {} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not supported - | - = note: see issue #20041 for more information - -error: aborting due to 2 previous errors - diff --git a/src/test/ui/where-clauses/where-for-self-2.rs b/src/test/ui/where-clauses/where-for-self-2.rs deleted file mode 100644 index 37c6954fd..000000000 --- a/src/test/ui/where-clauses/where-for-self-2.rs +++ /dev/null @@ -1,24 +0,0 @@ -// Test that we can quantify lifetimes outside a constraint (i.e., including -// the self type) in a where clause. Specifically, test that implementing for a -// specific lifetime is not enough to satisfy the `for<'a> ...` constraint, which -// should require *all* lifetimes. - -static X: &'static u32 = &42; - -trait Bar { - fn bar(&self); -} - -impl Bar for &'static u32 { - fn bar(&self) {} -} - -fn foo(x: &T) -where - for<'a> &'a T: Bar, -{ -} - -fn main() { - foo(&X); //~ ERROR implementation of `Bar` is not general enough -} diff --git a/src/test/ui/where-clauses/where-for-self-2.stderr b/src/test/ui/where-clauses/where-for-self-2.stderr deleted file mode 100644 index f65db78fc..000000000 --- a/src/test/ui/where-clauses/where-for-self-2.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error: implementation of `Bar` is not general enough - --> $DIR/where-for-self-2.rs:23:5 - | -LL | foo(&X); - | ^^^^^^^ implementation of `Bar` is not general enough - | - = note: `&'0 u32` must implement `Bar`, for any lifetime `'0`... - = note: ...but `Bar` is actually implemented for the type `&'static u32` - -error: aborting due to previous error - diff --git a/src/test/ui/where-clauses/where-for-self.rs b/src/test/ui/where-clauses/where-for-self.rs deleted file mode 100644 index 9380e72cd..000000000 --- a/src/test/ui/where-clauses/where-for-self.rs +++ /dev/null @@ -1,19 +0,0 @@ -// Test that we can quantify lifetimes outside a constraint (i.e., including -// the self type) in a where clause. Specifically, test that we cannot nest -// quantification in constraints (to be clear, there is no reason this should not -// we're testing we don't crash or do something stupid). - -trait Bar<'a> { - fn bar(&self); -} - -impl<'a, 'b> Bar<'b> for &'a u32 { - fn bar(&self) {} -} - -fn foo(x: &T) - where for<'a> &'a T: for<'b> Bar<'b> - //~^ error: nested quantification of lifetimes -{} - -fn main() {} diff --git a/src/test/ui/where-clauses/where-for-self.stderr b/src/test/ui/where-clauses/where-for-self.stderr deleted file mode 100644 index d06afc1e4..000000000 --- a/src/test/ui/where-clauses/where-for-self.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0316]: nested quantification of lifetimes - --> $DIR/where-for-self.rs:15:26 - | -LL | where for<'a> &'a T: for<'b> Bar<'b> - | ^^^^^^^^^^^^^^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0316`. diff --git a/src/test/ui/where-clauses/where-lifetime-resolution.rs b/src/test/ui/where-clauses/where-lifetime-resolution.rs deleted file mode 100644 index d8677ee95..000000000 --- a/src/test/ui/where-clauses/where-lifetime-resolution.rs +++ /dev/null @@ -1,12 +0,0 @@ -trait Trait1<'a> {} -trait Trait2<'a, 'b> {} - -fn f() where - for<'a> dyn Trait1<'a>: Trait1<'a>, // OK - (dyn for<'a> Trait1<'a>): Trait1<'a>, - //~^ ERROR use of undeclared lifetime name `'a` - for<'a> dyn for<'b> Trait2<'a, 'b>: Trait2<'a, 'b>, - //~^ ERROR use of undeclared lifetime name `'b` -{} - -fn main() {} diff --git a/src/test/ui/where-clauses/where-lifetime-resolution.stderr b/src/test/ui/where-clauses/where-lifetime-resolution.stderr deleted file mode 100644 index e8df02fba..000000000 --- a/src/test/ui/where-clauses/where-lifetime-resolution.stderr +++ /dev/null @@ -1,42 +0,0 @@ -error[E0261]: use of undeclared lifetime name `'a` - --> $DIR/where-lifetime-resolution.rs:6:38 - | -LL | (dyn for<'a> Trait1<'a>): Trait1<'a>, - | ^^ undeclared lifetime - | - = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html -help: consider making the bound lifetime-generic with a new `'a` lifetime - | -LL | (dyn for<'a> Trait1<'a>): for<'a> Trait1<'a>, - | +++++++ -help: consider making the bound lifetime-generic with a new `'a` lifetime - | -LL | for<'a> (dyn for<'a> Trait1<'a>): Trait1<'a>, - | +++++++ -help: consider introducing lifetime `'a` here - | -LL | fn f<'a>() where - | ++++ - -error[E0261]: use of undeclared lifetime name `'b` - --> $DIR/where-lifetime-resolution.rs:8:52 - | -LL | for<'a> dyn for<'b> Trait2<'a, 'b>: Trait2<'a, 'b>, - | ^^ undeclared lifetime - | -help: consider making the bound lifetime-generic with a new `'b` lifetime - | -LL | for<'a> dyn for<'b> Trait2<'a, 'b>: for<'b> Trait2<'a, 'b>, - | +++++++ -help: consider making the bound lifetime-generic with a new `'b` lifetime - | -LL | for<'b, 'a> dyn for<'b> Trait2<'a, 'b>: Trait2<'a, 'b>, - | +++ -help: consider introducing lifetime `'b` here - | -LL | fn f<'b>() where - | ++++ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0261`. -- cgit v1.2.3