Rollup merge of #132388 - frank-king:feature/where-cfg, r=petrochenkov
Implement `#[cfg]` in `where` clauses This PR implements #115590, which supports `#[cfg]` attributes in `where` clauses. The biggest change is, that it adds `AttrsVec` and `NodeId` to the `ast::WherePredicate` and `HirId` to the `hir::WherePredicate`.
This commit is contained in:
commit
2344a34241
38 changed files with 3296 additions and 88 deletions
|
@ -56,6 +56,7 @@ pub enum Target {
|
|||
Param,
|
||||
PatField,
|
||||
ExprField,
|
||||
WherePredicate,
|
||||
}
|
||||
|
||||
impl Display for Target {
|
||||
|
@ -96,7 +97,8 @@ impl Target {
|
|||
| Target::MacroDef
|
||||
| Target::Param
|
||||
| Target::PatField
|
||||
| Target::ExprField => false,
|
||||
| Target::ExprField
|
||||
| Target::WherePredicate => false,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -217,6 +219,7 @@ impl Target {
|
|||
Target::Param => "function param",
|
||||
Target::PatField => "pattern field",
|
||||
Target::ExprField => "struct field",
|
||||
Target::WherePredicate => "where predicate",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue