diff options
Diffstat (limited to 'src/test/ui/rfcs/rfc-2528-type-changing-struct-update/issue-92010-trait-bound-not-satisfied.rs')
-rw-r--r-- | src/test/ui/rfcs/rfc-2528-type-changing-struct-update/issue-92010-trait-bound-not-satisfied.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/rfcs/rfc-2528-type-changing-struct-update/issue-92010-trait-bound-not-satisfied.rs b/src/test/ui/rfcs/rfc-2528-type-changing-struct-update/issue-92010-trait-bound-not-satisfied.rs new file mode 100644 index 000000000..f1a54ee58 --- /dev/null +++ b/src/test/ui/rfcs/rfc-2528-type-changing-struct-update/issue-92010-trait-bound-not-satisfied.rs @@ -0,0 +1,12 @@ +#[derive(Clone)] +struct P<T> { + x: T, + y: f64, +} + +impl<T> P<T> { + fn y(&self, y: f64) -> Self { P{y, .. self.clone() } } + //~^ mismatched types [E0308] +} + +fn main() {} |