1
Fork 0

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:
Matthias Krüger 2025-03-03 10:40:56 +01:00 committed by GitHub
commit 2344a34241
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 3296 additions and 88 deletions

View file

@ -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",
}
}
}