summaryrefslogtreecommitdiffstats
path: root/src/test/ui/specialization
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/specialization')
-rw-r--r--src/test/ui/specialization/issue-43037.current.stderr (renamed from src/test/ui/specialization/issue-43037.stderr)2
-rw-r--r--src/test/ui/specialization/issue-43037.negative.stderr12
-rw-r--r--src/test/ui/specialization/issue-43037.rs2
-rw-r--r--src/test/ui/specialization/issue-45814.current.stderr (renamed from src/test/ui/specialization/issue-45814.stderr)2
-rw-r--r--src/test/ui/specialization/issue-45814.negative.stderr14
-rw-r--r--src/test/ui/specialization/issue-45814.rs3
-rw-r--r--src/test/ui/specialization/specialization-overlap-negative.stderr2
-rw-r--r--src/test/ui/specialization/specialization-overlap.stderr4
8 files changed, 35 insertions, 6 deletions
diff --git a/src/test/ui/specialization/issue-43037.stderr b/src/test/ui/specialization/issue-43037.current.stderr
index 4249cd894..26db9d7c9 100644
--- a/src/test/ui/specialization/issue-43037.stderr
+++ b/src/test/ui/specialization/issue-43037.current.stderr
@@ -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
diff --git a/src/test/ui/specialization/issue-43037.negative.stderr b/src/test/ui/specialization/issue-43037.negative.stderr
new file mode 100644
index 000000000..26db9d7c9
--- /dev/null
+++ b/src/test/ui/specialization/issue-43037.negative.stderr
@@ -0,0 +1,12 @@
+error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
+ --> $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
+ |
+ = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local
+ = note: only traits defined in the current crate can be implemented for a type parameter
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0210`.
diff --git a/src/test/ui/specialization/issue-43037.rs b/src/test/ui/specialization/issue-43037.rs
index c49119f9c..a1e3f998b 100644
--- a/src/test/ui/specialization/issue-43037.rs
+++ b/src/test/ui/specialization/issue-43037.rs
@@ -1,4 +1,6 @@
+// revisions: current negative
#![feature(specialization)]
+#![cfg_attr(negative, feature(with_negative_coherence))]
#![allow(incomplete_features)]
trait X {}
diff --git a/src/test/ui/specialization/issue-45814.stderr b/src/test/ui/specialization/issue-45814.current.stderr
index 419345add..5013559b8 100644
--- a/src/test/ui/specialization/issue-45814.stderr
+++ b/src/test/ui/specialization/issue-45814.current.stderr
@@ -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 {}
| ^^^^^^^^ ^
diff --git a/src/test/ui/specialization/issue-45814.negative.stderr b/src/test/ui/specialization/issue-45814.negative.stderr
new file mode 100644
index 000000000..5013559b8
--- /dev/null
+++ b/src/test/ui/specialization/issue-45814.negative.stderr
@@ -0,0 +1,14 @@
+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:9:20
+ |
+LL | default impl<T, U> Trait<T> for U {}
+ | ^^^^^^^^ ^
+ = note: 128 redundant requirements hidden
+ = note: required for `T` to implement `Trait<_>`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0275`.
diff --git a/src/test/ui/specialization/issue-45814.rs b/src/test/ui/specialization/issue-45814.rs
index 8ee5d3e2e..fce236390 100644
--- a/src/test/ui/specialization/issue-45814.rs
+++ b/src/test/ui/specialization/issue-45814.rs
@@ -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> {}
diff --git a/src/test/ui/specialization/specialization-overlap-negative.stderr b/src/test/ui/specialization/specialization-overlap-negative.stderr
index fb3d9723a..1fe4869ff 100644
--- a/src/test/ui/specialization/specialization-overlap-negative.stderr
+++ b/src/test/ui/specialization/specialization-overlap-negative.stderr
@@ -8,7 +8,7 @@ LL | #![feature(specialization)]
= help: consider using `min_specialization` instead, which is more stable and complete
= note: `#[warn(incomplete_features)]` on by default
-error[E0751]: found both positive and negative implementation of trait `std::marker::Send` for type `TestType<_>`:
+error[E0751]: found both positive and negative implementation of trait `Send` for type `TestType<_>`:
--> $DIR/specialization-overlap-negative.rs:9:1
|
LL | unsafe impl<T: Clone> Send for TestType<T> {}
diff --git a/src/test/ui/specialization/specialization-overlap.stderr b/src/test/ui/specialization/specialization-overlap.stderr
index 989264467..098bf4a70 100644
--- a/src/test/ui/specialization/specialization-overlap.stderr
+++ b/src/test/ui/specialization/specialization-overlap.stderr
@@ -8,13 +8,13 @@ LL | #![feature(specialization)]
= help: consider using `min_specialization` instead, which is more stable and complete
= note: `#[warn(incomplete_features)]` on by default
-error[E0119]: conflicting implementations of trait `Foo` for type `std::vec::Vec<_>`
+error[E0119]: conflicting implementations of trait `Foo` for type `Vec<_>`
--> $DIR/specialization-overlap.rs:5:1
|
LL | impl<T: Clone> Foo for T {}
| ------------------------ first implementation here
LL | impl<T> Foo for Vec<T> {}
- | ^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `std::vec::Vec<_>`
+ | ^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Vec<_>`
error[E0119]: conflicting implementations of trait `Bar` for type `(u8, u8)`
--> $DIR/specialization-overlap.rs:9:1