From 229df02c0b85c33465d7191a6e085e964e56c1c9 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Sun, 16 Sep 2018 17:15:07 +0300 Subject: Temporarily prohibit proc macro attributes placed after derives ... and also proc macro attributes used together with test/bench. --- src/libsyntax/ptr.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/libsyntax/ptr.rs') diff --git a/src/libsyntax/ptr.rs b/src/libsyntax/ptr.rs index b86d19ba3ce..bb47d9b535b 100644 --- a/src/libsyntax/ptr.rs +++ b/src/libsyntax/ptr.rs @@ -38,7 +38,7 @@ use std::fmt::{self, Display, Debug}; use std::iter::FromIterator; -use std::ops::Deref; +use std::ops::{Deref, DerefMut}; use std::{mem, ptr, slice, vec}; use serialize::{Encodable, Decodable, Encoder, Decoder}; @@ -103,6 +103,12 @@ impl Deref for P { } } +impl DerefMut for P { + fn deref_mut(&mut self) -> &mut T { + &mut self.ptr + } +} + impl Clone for P { fn clone(&self) -> P { P((**self).clone()) -- cgit 1.4.1-3-g733a5