diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/specialization/min_specialization/auxiliary/specialization-trait.rs (renamed from src/test/ui/specialization/min_specialization/auxiliary/specialization-trait.rs) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/dyn-trait-assoc-types.rs (renamed from src/test/ui/specialization/min_specialization/dyn-trait-assoc-types.rs) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/dyn-trait-assoc-types.stderr (renamed from src/test/ui/specialization/min_specialization/dyn-trait-assoc-types.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/impl-on-nonexisting.rs (renamed from src/test/ui/specialization/min_specialization/impl-on-nonexisting.rs) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/impl-on-nonexisting.stderr (renamed from src/test/ui/specialization/min_specialization/impl-on-nonexisting.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/impl_specialization_trait.rs (renamed from src/test/ui/specialization/min_specialization/impl_specialization_trait.rs) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/impl_specialization_trait.stderr (renamed from src/test/ui/specialization/min_specialization/impl_specialization_trait.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/implcit-well-formed-bounds.rs (renamed from src/test/ui/specialization/min_specialization/implcit-well-formed-bounds.rs) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/issue-79224.rs | 26 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/issue-79224.stderr | 27 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/repeated_projection_type.rs (renamed from src/test/ui/specialization/min_specialization/repeated_projection_type.rs) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/repeated_projection_type.stderr (renamed from src/test/ui/specialization/min_specialization/repeated_projection_type.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/repeating_lifetimes.rs (renamed from src/test/ui/specialization/min_specialization/repeating_lifetimes.rs) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/repeating_lifetimes.stderr (renamed from src/test/ui/specialization/min_specialization/repeating_lifetimes.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/repeating_param.rs (renamed from src/test/ui/specialization/min_specialization/repeating_param.rs) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/repeating_param.stderr (renamed from src/test/ui/specialization/min_specialization/repeating_param.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/spec-iter.rs (renamed from src/test/ui/specialization/min_specialization/spec-iter.rs) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/spec-marker-supertraits.rs (renamed from src/test/ui/specialization/min_specialization/spec-marker-supertraits.rs) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/spec-marker-supertraits.stderr (renamed from src/test/ui/specialization/min_specialization/spec-marker-supertraits.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/spec-reference.rs (renamed from src/test/ui/specialization/min_specialization/spec-reference.rs) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/specialization_marker.rs (renamed from src/test/ui/specialization/min_specialization/specialization_marker.rs) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/specialization_marker.stderr (renamed from src/test/ui/specialization/min_specialization/specialization_marker.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/specialization_super_trait.rs (renamed from src/test/ui/specialization/min_specialization/specialization_super_trait.rs) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/specialization_super_trait.stderr (renamed from src/test/ui/specialization/min_specialization/specialization_super_trait.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/specialization_trait.rs (renamed from src/test/ui/specialization/min_specialization/specialization_trait.rs) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/specialization_trait.stderr (renamed from src/test/ui/specialization/min_specialization/specialization_trait.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/specialize_on_marker.rs (renamed from src/test/ui/specialization/min_specialization/specialize_on_marker.rs) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/specialize_on_spec_trait.rs (renamed from src/test/ui/specialization/min_specialization/specialize_on_spec_trait.rs) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/specialize_on_static.rs (renamed from src/test/ui/specialization/min_specialization/specialize_on_static.rs) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/specialize_on_static.stderr (renamed from src/test/ui/specialization/min_specialization/specialize_on_static.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/specialize_on_trait.rs (renamed from src/test/ui/specialization/min_specialization/specialize_on_trait.rs) | 0 | ||||
-rw-r--r-- | tests/ui/specialization/min_specialization/specialize_on_trait.stderr (renamed from src/test/ui/specialization/min_specialization/specialize_on_trait.stderr) | 0 |
32 files changed, 53 insertions, 0 deletions
diff --git a/src/test/ui/specialization/min_specialization/auxiliary/specialization-trait.rs b/tests/ui/specialization/min_specialization/auxiliary/specialization-trait.rs index 6ec0d261d..6ec0d261d 100644 --- a/src/test/ui/specialization/min_specialization/auxiliary/specialization-trait.rs +++ b/tests/ui/specialization/min_specialization/auxiliary/specialization-trait.rs diff --git a/src/test/ui/specialization/min_specialization/dyn-trait-assoc-types.rs b/tests/ui/specialization/min_specialization/dyn-trait-assoc-types.rs index 03cab00b0..03cab00b0 100644 --- a/src/test/ui/specialization/min_specialization/dyn-trait-assoc-types.rs +++ b/tests/ui/specialization/min_specialization/dyn-trait-assoc-types.rs diff --git a/src/test/ui/specialization/min_specialization/dyn-trait-assoc-types.stderr b/tests/ui/specialization/min_specialization/dyn-trait-assoc-types.stderr index db5558f16..db5558f16 100644 --- a/src/test/ui/specialization/min_specialization/dyn-trait-assoc-types.stderr +++ b/tests/ui/specialization/min_specialization/dyn-trait-assoc-types.stderr diff --git a/src/test/ui/specialization/min_specialization/impl-on-nonexisting.rs b/tests/ui/specialization/min_specialization/impl-on-nonexisting.rs index 77a64320d..77a64320d 100644 --- a/src/test/ui/specialization/min_specialization/impl-on-nonexisting.rs +++ b/tests/ui/specialization/min_specialization/impl-on-nonexisting.rs diff --git a/src/test/ui/specialization/min_specialization/impl-on-nonexisting.stderr b/tests/ui/specialization/min_specialization/impl-on-nonexisting.stderr index b032ccbe5..b032ccbe5 100644 --- a/src/test/ui/specialization/min_specialization/impl-on-nonexisting.stderr +++ b/tests/ui/specialization/min_specialization/impl-on-nonexisting.stderr diff --git a/src/test/ui/specialization/min_specialization/impl_specialization_trait.rs b/tests/ui/specialization/min_specialization/impl_specialization_trait.rs index 723ed71c3..723ed71c3 100644 --- a/src/test/ui/specialization/min_specialization/impl_specialization_trait.rs +++ b/tests/ui/specialization/min_specialization/impl_specialization_trait.rs diff --git a/src/test/ui/specialization/min_specialization/impl_specialization_trait.stderr b/tests/ui/specialization/min_specialization/impl_specialization_trait.stderr index 934103d49..934103d49 100644 --- a/src/test/ui/specialization/min_specialization/impl_specialization_trait.stderr +++ b/tests/ui/specialization/min_specialization/impl_specialization_trait.stderr diff --git a/src/test/ui/specialization/min_specialization/implcit-well-formed-bounds.rs b/tests/ui/specialization/min_specialization/implcit-well-formed-bounds.rs index 98d7f9194..98d7f9194 100644 --- a/src/test/ui/specialization/min_specialization/implcit-well-formed-bounds.rs +++ b/tests/ui/specialization/min_specialization/implcit-well-formed-bounds.rs diff --git a/tests/ui/specialization/min_specialization/issue-79224.rs b/tests/ui/specialization/min_specialization/issue-79224.rs new file mode 100644 index 000000000..104bddd07 --- /dev/null +++ b/tests/ui/specialization/min_specialization/issue-79224.rs @@ -0,0 +1,26 @@ +#![feature(min_specialization)] +use std::fmt::{self, Display}; + +pub enum Cow<'a, B: ?Sized + 'a, O = <B as ToOwned>::Owned> +where + B: ToOwned, +{ + Borrowed(&'a B), + Owned(O), +} + +impl ToString for Cow<'_, str> { + fn to_string(&self) -> String { + String::new() + } +} + +impl<B: ?Sized> Display for Cow<'_, B> { + //~^ ERROR: the trait bound `B: Clone` is not satisfied [E0277] + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + //~^ ERROR: the trait bound `B: Clone` is not satisfied [E0277] + write!(f, "foo") + } +} + +fn main() {} diff --git a/tests/ui/specialization/min_specialization/issue-79224.stderr b/tests/ui/specialization/min_specialization/issue-79224.stderr new file mode 100644 index 000000000..505baa23c --- /dev/null +++ b/tests/ui/specialization/min_specialization/issue-79224.stderr @@ -0,0 +1,27 @@ +error[E0277]: the trait bound `B: Clone` is not satisfied + --> $DIR/issue-79224.rs:18:29 + | +LL | impl<B: ?Sized> Display for Cow<'_, B> { + | ^^^^^^^^^^ the trait `Clone` is not implemented for `B` + | + = note: required for `B` to implement `ToOwned` +help: consider further restricting this bound + | +LL | impl<B: ?Sized + std::clone::Clone> Display for Cow<'_, B> { + | +++++++++++++++++++ + +error[E0277]: the trait bound `B: Clone` is not satisfied + --> $DIR/issue-79224.rs:20:12 + | +LL | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + | ^^^^^ the trait `Clone` is not implemented for `B` + | + = note: required for `B` to implement `ToOwned` +help: consider further restricting this bound + | +LL | impl<B: ?Sized + std::clone::Clone> Display for Cow<'_, B> { + | +++++++++++++++++++ + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/specialization/min_specialization/repeated_projection_type.rs b/tests/ui/specialization/min_specialization/repeated_projection_type.rs index f21f39f06..f21f39f06 100644 --- a/src/test/ui/specialization/min_specialization/repeated_projection_type.rs +++ b/tests/ui/specialization/min_specialization/repeated_projection_type.rs diff --git a/src/test/ui/specialization/min_specialization/repeated_projection_type.stderr b/tests/ui/specialization/min_specialization/repeated_projection_type.stderr index a751ba793..a751ba793 100644 --- a/src/test/ui/specialization/min_specialization/repeated_projection_type.stderr +++ b/tests/ui/specialization/min_specialization/repeated_projection_type.stderr diff --git a/src/test/ui/specialization/min_specialization/repeating_lifetimes.rs b/tests/ui/specialization/min_specialization/repeating_lifetimes.rs index 49bfacec0..49bfacec0 100644 --- a/src/test/ui/specialization/min_specialization/repeating_lifetimes.rs +++ b/tests/ui/specialization/min_specialization/repeating_lifetimes.rs diff --git a/src/test/ui/specialization/min_specialization/repeating_lifetimes.stderr b/tests/ui/specialization/min_specialization/repeating_lifetimes.stderr index 16dccb10b..16dccb10b 100644 --- a/src/test/ui/specialization/min_specialization/repeating_lifetimes.stderr +++ b/tests/ui/specialization/min_specialization/repeating_lifetimes.stderr diff --git a/src/test/ui/specialization/min_specialization/repeating_param.rs b/tests/ui/specialization/min_specialization/repeating_param.rs index 5a1c97fd3..5a1c97fd3 100644 --- a/src/test/ui/specialization/min_specialization/repeating_param.rs +++ b/tests/ui/specialization/min_specialization/repeating_param.rs diff --git a/src/test/ui/specialization/min_specialization/repeating_param.stderr b/tests/ui/specialization/min_specialization/repeating_param.stderr index 5e6adf723..5e6adf723 100644 --- a/src/test/ui/specialization/min_specialization/repeating_param.stderr +++ b/tests/ui/specialization/min_specialization/repeating_param.stderr diff --git a/src/test/ui/specialization/min_specialization/spec-iter.rs b/tests/ui/specialization/min_specialization/spec-iter.rs index e17e9dd5f..e17e9dd5f 100644 --- a/src/test/ui/specialization/min_specialization/spec-iter.rs +++ b/tests/ui/specialization/min_specialization/spec-iter.rs diff --git a/src/test/ui/specialization/min_specialization/spec-marker-supertraits.rs b/tests/ui/specialization/min_specialization/spec-marker-supertraits.rs index 3bb2480e9..3bb2480e9 100644 --- a/src/test/ui/specialization/min_specialization/spec-marker-supertraits.rs +++ b/tests/ui/specialization/min_specialization/spec-marker-supertraits.rs diff --git a/src/test/ui/specialization/min_specialization/spec-marker-supertraits.stderr b/tests/ui/specialization/min_specialization/spec-marker-supertraits.stderr index ba9d6bbe3..ba9d6bbe3 100644 --- a/src/test/ui/specialization/min_specialization/spec-marker-supertraits.stderr +++ b/tests/ui/specialization/min_specialization/spec-marker-supertraits.stderr diff --git a/src/test/ui/specialization/min_specialization/spec-reference.rs b/tests/ui/specialization/min_specialization/spec-reference.rs index 377889e2c..377889e2c 100644 --- a/src/test/ui/specialization/min_specialization/spec-reference.rs +++ b/tests/ui/specialization/min_specialization/spec-reference.rs diff --git a/src/test/ui/specialization/min_specialization/specialization_marker.rs b/tests/ui/specialization/min_specialization/specialization_marker.rs index 93462d02e..93462d02e 100644 --- a/src/test/ui/specialization/min_specialization/specialization_marker.rs +++ b/tests/ui/specialization/min_specialization/specialization_marker.rs diff --git a/src/test/ui/specialization/min_specialization/specialization_marker.stderr b/tests/ui/specialization/min_specialization/specialization_marker.stderr index b47c14f3c..b47c14f3c 100644 --- a/src/test/ui/specialization/min_specialization/specialization_marker.stderr +++ b/tests/ui/specialization/min_specialization/specialization_marker.stderr diff --git a/src/test/ui/specialization/min_specialization/specialization_super_trait.rs b/tests/ui/specialization/min_specialization/specialization_super_trait.rs index 145f376ed..145f376ed 100644 --- a/src/test/ui/specialization/min_specialization/specialization_super_trait.rs +++ b/tests/ui/specialization/min_specialization/specialization_super_trait.rs diff --git a/src/test/ui/specialization/min_specialization/specialization_super_trait.stderr b/tests/ui/specialization/min_specialization/specialization_super_trait.stderr index e93578662..e93578662 100644 --- a/src/test/ui/specialization/min_specialization/specialization_super_trait.stderr +++ b/tests/ui/specialization/min_specialization/specialization_super_trait.stderr diff --git a/src/test/ui/specialization/min_specialization/specialization_trait.rs b/tests/ui/specialization/min_specialization/specialization_trait.rs index d597278d2..d597278d2 100644 --- a/src/test/ui/specialization/min_specialization/specialization_trait.rs +++ b/tests/ui/specialization/min_specialization/specialization_trait.rs diff --git a/src/test/ui/specialization/min_specialization/specialization_trait.stderr b/tests/ui/specialization/min_specialization/specialization_trait.stderr index bc87ae0f8..bc87ae0f8 100644 --- a/src/test/ui/specialization/min_specialization/specialization_trait.stderr +++ b/tests/ui/specialization/min_specialization/specialization_trait.stderr diff --git a/src/test/ui/specialization/min_specialization/specialize_on_marker.rs b/tests/ui/specialization/min_specialization/specialize_on_marker.rs index 4219bd13b..4219bd13b 100644 --- a/src/test/ui/specialization/min_specialization/specialize_on_marker.rs +++ b/tests/ui/specialization/min_specialization/specialize_on_marker.rs diff --git a/src/test/ui/specialization/min_specialization/specialize_on_spec_trait.rs b/tests/ui/specialization/min_specialization/specialize_on_spec_trait.rs index abbab5c23..abbab5c23 100644 --- a/src/test/ui/specialization/min_specialization/specialize_on_spec_trait.rs +++ b/tests/ui/specialization/min_specialization/specialize_on_spec_trait.rs diff --git a/src/test/ui/specialization/min_specialization/specialize_on_static.rs b/tests/ui/specialization/min_specialization/specialize_on_static.rs index dd1b05401..dd1b05401 100644 --- a/src/test/ui/specialization/min_specialization/specialize_on_static.rs +++ b/tests/ui/specialization/min_specialization/specialize_on_static.rs diff --git a/src/test/ui/specialization/min_specialization/specialize_on_static.stderr b/tests/ui/specialization/min_specialization/specialize_on_static.stderr index 9a16798f1..9a16798f1 100644 --- a/src/test/ui/specialization/min_specialization/specialize_on_static.stderr +++ b/tests/ui/specialization/min_specialization/specialize_on_static.stderr diff --git a/src/test/ui/specialization/min_specialization/specialize_on_trait.rs b/tests/ui/specialization/min_specialization/specialize_on_trait.rs index 0588442c3..0588442c3 100644 --- a/src/test/ui/specialization/min_specialization/specialize_on_trait.rs +++ b/tests/ui/specialization/min_specialization/specialize_on_trait.rs diff --git a/src/test/ui/specialization/min_specialization/specialize_on_trait.stderr b/tests/ui/specialization/min_specialization/specialize_on_trait.stderr index 7b79c7eb4..7b79c7eb4 100644 --- a/src/test/ui/specialization/min_specialization/specialize_on_trait.stderr +++ b/tests/ui/specialization/min_specialization/specialize_on_trait.stderr |