Skip to content

Commit 6434844

Browse files
committed
add test files
1 parent 5b2a760 commit 6434844

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#[derive(Clone)]
2+
struct P<T> {
3+
x: T,
4+
y: f64,
5+
}
6+
7+
impl<T> P<T> {
8+
fn y(&self, y: f64) -> Self { P{y, .. self.clone() } }
9+
//~^ mismatched types [E0308]
10+
}
11+
12+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
error[E0308]: mismatched types
2+
--> $DIR/issue-92010-trait-bound-not-satisfied.rs:8:43
3+
|
4+
LL | fn y(&self, y: f64) -> Self { P{y, .. self.clone() } }
5+
| ^^^^^^^^^^^^ expected struct `P`, found `&P<T>`
6+
|
7+
= note: expected struct `P<T>`
8+
found reference `&P<T>`
9+
10+
error: aborting due to previous error
11+
12+
For more information about this error, try `rustc --explain E0308`.

0 commit comments

Comments
 (0)