diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-25700-1.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-25700-1.rs b/src/test/ui/issues/issue-25700-1.rs new file mode 100644 index 000000000..5e71a52ba --- /dev/null +++ b/src/test/ui/issues/issue-25700-1.rs @@ -0,0 +1,13 @@ +// run-pass +struct S<T: 'static>(#[allow(unused_tuple_struct_fields)] Option<&'static T>); + +trait Tr { type Out; } +impl<T> Tr for T { type Out = T; } + +impl<T: 'static> Copy for S<T> where S<T>: Tr<Out=T> {} +impl<T: 'static> Clone for S<T> where S<T>: Tr<Out=T> { + fn clone(&self) -> Self { *self } +} +fn main() { + S::<()>(None); +} |