1
Fork 0

Remove unnecessary Deref impl for Attribute.

This kind of thing just makes the code harder to read.
This commit is contained in:
Nicholas Nethercote 2019-10-24 06:40:35 +11:00
parent e8b190ac4a
commit 69bc4aba78
17 changed files with 41 additions and 44 deletions

View file

@ -2202,12 +2202,6 @@ pub struct Attribute {
pub span: Span,
}
// Compatibility impl to avoid churn, consider removing.
impl std::ops::Deref for Attribute {
type Target = AttrItem;
fn deref(&self) -> &Self::Target { &self.item }
}
/// `TraitRef`s appear in impls.
///
/// Resolution maps each `TraitRef`'s `ref_id` to its defining trait; that's all