gcc/testsuite/rust/compile/issue-3030.rs
raw| 1 | #![feature(negative_impls)] |
| 2 | |
| 3 | #[lang = "sized"] |
| 4 | pub trait Sized {} |
| 5 | |
| 6 | pub trait Deref {} |
| 7 | |
| 8 | pub trait DerefMut: Deref { |
| 9 | type Target; |
| 10 | |
| 11 | /// Mutably dereferences the value. |
| 12 | #[stable(feature = "rust1", since = "1.0.0")] |
| 13 | fn deref_mut(&mut self) -> &mut Self::Target; |
| 14 | } |
| 15 | |
| 16 | impl<T: ?Sized> !DerefMut for &T {} |