Skip to content

Commit f7b1403

Browse files
committed
Update test
1 parent b805f30 commit f7b1403

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

tests/ui/specialization/min_specialization/issue-79224.rs

+10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
#![feature(min_specialization)]
22
use std::fmt::{self, Display};
33

4+
pub trait ToString {
5+
fn to_string(&self) -> String;
6+
}
7+
8+
impl<T: Display + ?Sized> ToString for T {
9+
default fn to_string(&self) -> String {
10+
todo!()
11+
}
12+
}
13+
414
pub enum Cow<'a, B: ?Sized + 'a, O = <B as ToOwned>::Owned>
515
where
616
B: ToOwned,

tests/ui/specialization/min_specialization/issue-79224.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: the trait bound `B: Clone` is not satisfied
2-
--> $DIR/issue-79224.rs:18:29
2+
--> $DIR/issue-79224.rs:28:29
33
|
44
LL | impl<B: ?Sized> Display for Cow<'_, B> {
55
| ^^^^^^^^^^ the trait `Clone` is not implemented for `B`
@@ -11,7 +11,7 @@ LL | impl<B: ?Sized + std::clone::Clone> Display for Cow<'_, B> {
1111
| +++++++++++++++++++
1212

1313
error[E0277]: the trait bound `B: Clone` is not satisfied
14-
--> $DIR/issue-79224.rs:20:5
14+
--> $DIR/issue-79224.rs:30:5
1515
|
1616
LL | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1717
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `B`
@@ -23,7 +23,7 @@ LL | impl<B: ?Sized + std::clone::Clone> Display for Cow<'_, B> {
2323
| +++++++++++++++++++
2424

2525
error[E0277]: the trait bound `B: Clone` is not satisfied
26-
--> $DIR/issue-79224.rs:20:13
26+
--> $DIR/issue-79224.rs:30:13
2727
|
2828
LL | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2929
| ^^^^ the trait `Clone` is not implemented for `B`
@@ -35,7 +35,7 @@ LL | impl<B: ?Sized + std::clone::Clone> Display for Cow<'_, B> {
3535
| +++++++++++++++++++
3636

3737
error[E0277]: the trait bound `B: Clone` is not satisfied
38-
--> $DIR/issue-79224.rs:20:62
38+
--> $DIR/issue-79224.rs:30:62
3939
|
4040
LL | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
4141
| ______________________________________________________________^

0 commit comments

Comments
 (0)