Rollup merge of #104575 - lcnr:dedup-tests, r=jackh726

deduplicate tests

originally added in #100514. Using revisions for this reduces the amount of tests in the repo
This commit is contained in:
Dylan DPC 2022-11-19 11:54:46 +05:30 committed by GitHub
commit 686c170751
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 9 additions and 39 deletions

View File

@ -1,12 +0,0 @@
//~ ERROR overflow evaluating the requirement `T: Trait<_>`
#![feature(specialization, with_negative_coherence)]
#![allow(incomplete_features)]
pub trait Trait<T> {}
default impl<T, U> Trait<T> for U {}
impl<T> Trait<<T as Iterator>::Item> for T {}
fn main() {}

View File

@ -1,21 +0,0 @@
#![crate_type = "lib"]
#![feature(specialization, with_negative_coherence)]
#![allow(incomplete_features)]
trait X {}
trait Y: X {}
trait Z {
type Assoc: Y;
}
struct A<T>(T);
impl<T> Y for T where T: X {}
impl<T: X> Z for A<T> {
type Assoc = T;
}
// this impl is invalid, but causes an ICE anyway
impl<T> From<<A<T> as Z>::Assoc> for T {}
//~^ ERROR type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
fn main() {}

View File

@ -1,5 +1,5 @@
error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
--> $DIR/issue-43037.rs:17:6
--> $DIR/issue-43037.rs:19:6
|
LL | impl<T> From<<A<T> as Z>::Assoc> for T {}
| ^ type parameter `T` must be used as the type parameter for some local type

View File

@ -1,5 +1,5 @@
error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
--> $DIR/issue-100191.rs:18:6
--> $DIR/issue-43037.rs:19:6
|
LL | impl<T> From<<A<T> as Z>::Assoc> for T {}
| ^ type parameter `T` must be used as the type parameter for some local type

View File

@ -1,4 +1,6 @@
// revisions: current negative
#![feature(specialization)]
#![cfg_attr(negative, feature(with_negative_coherence))]
#![allow(incomplete_features)]
trait X {}

View File

@ -2,7 +2,7 @@ error[E0275]: overflow evaluating the requirement `T: Trait<_>`
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_45814`)
note: required for `T` to implement `Trait<_>`
--> $DIR/issue-45814.rs:8:20
--> $DIR/issue-45814.rs:9:20
|
LL | default impl<T, U> Trait<T> for U {}
| ^^^^^^^^ ^

View File

@ -1,8 +1,8 @@
error[E0275]: overflow evaluating the requirement `T: Trait<_>`
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_100191_2`)
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_45814`)
note: required for `T` to implement `Trait<_>`
--> $DIR/issue-100191-2.rs:8:20
--> $DIR/issue-45814.rs:9:20
|
LL | default impl<T, U> Trait<T> for U {}
| ^^^^^^^^ ^

View File

@ -1,6 +1,7 @@
//~ ERROR overflow evaluating the requirement `T: Trait<_>`
// revisions: current negative
#![feature(specialization)]
#![cfg_attr(negative, feature(with_negative_coherence))]
#![allow(incomplete_features)]
pub trait Trait<T> {}