Pass attributes to hir::TyParam
This commit is contained in:
parent
75af15ee6c
commit
25abe48307
3 changed files with 3 additions and 0 deletions
|
|
@ -1585,6 +1585,7 @@ impl<'a> LoweringContext<'a> {
|
|||
.filter(|attr| attr.check_name("rustc_synthetic"))
|
||||
.map(|_| hir::SyntheticTyParamKind::ImplTrait)
|
||||
.nth(0),
|
||||
attrs: self.lower_attrs(&tp.attrs),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -962,6 +962,7 @@ impl<'hir> Map<'hir> {
|
|||
Some(NodeField(ref f)) => Some(&f.attrs[..]),
|
||||
Some(NodeExpr(ref e)) => Some(&*e.attrs),
|
||||
Some(NodeStmt(ref s)) => Some(s.node.attrs()),
|
||||
Some(NodeTyParam(tp)) => Some(&tp.attrs[..]),
|
||||
// unit/tuple structs take the attributes straight from
|
||||
// the struct definition.
|
||||
Some(NodeStructCtor(_)) => {
|
||||
|
|
|
|||
|
|
@ -414,6 +414,7 @@ pub struct TyParam {
|
|||
pub span: Span,
|
||||
pub pure_wrt_drop: bool,
|
||||
pub synthetic: Option<SyntheticTyParamKind>,
|
||||
pub attrs: HirVec<Attribute>,
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue