permit negative impls for non-auto traits

This commit is contained in:
Niko Matsakis 2020-01-08 06:39:38 -05:00
parent a17dd36084
commit e8a05e201e
35 changed files with 328 additions and 101 deletions

View file

@ -81,6 +81,10 @@ impl<T: ?Sized> Deref for &T {
}
}
#[cfg(not(bootstrap))]
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: ?Sized> !DerefMut for &T {}
#[stable(feature = "rust1", since = "1.0.0")]
impl<T: ?Sized> Deref for &mut T {
type Target = T;