diff --git a/gcc/testsuite/rust/compile/issue-2951.rs b/gcc/testsuite/rust/compile/issue-2951.rs new file mode 100644 index 00000000000..d30a3bf2adf --- /dev/null +++ b/gcc/testsuite/rust/compile/issue-2951.rs @@ -0,0 +1,13 @@ +#[lang = "sized"] +pub trait Sized {} + +#[lang = "clone"] +pub trait Clone: Sized { + fn clone(&self) -> Self; +} + +impl Clone for ! { + fn clone(&self) -> Self { + *self + } +} diff --git a/gcc/testsuite/rust/compile/nr2/exclude b/gcc/testsuite/rust/compile/nr2/exclude index 50781e56b85..c30af607edb 100644 --- a/gcc/testsuite/rust/compile/nr2/exclude +++ b/gcc/testsuite/rust/compile/nr2/exclude @@ -253,3 +253,4 @@ issue-3139-1.rs issue-3139-2.rs issue-3139-3.rs issue-3036.rs +issue-2951.rs