diff options
Diffstat (limited to 'tests/ui/error-codes/E0308-2.rs')
-rw-r--r-- | tests/ui/error-codes/E0308-2.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/error-codes/E0308-2.rs b/tests/ui/error-codes/E0308-2.rs new file mode 100644 index 000000000..157f992da --- /dev/null +++ b/tests/ui/error-codes/E0308-2.rs @@ -0,0 +1,12 @@ +trait DynEq {} + +impl<'a> PartialEq for &'a (dyn DynEq + 'static) { + fn eq(&self, _other: &Self) -> bool { + true + } +} + +impl Eq for &dyn DynEq {} //~ ERROR E0308 + +fn main() { +} |