Skip to content

Commit

Permalink
Fill in missing doc cfg on Expr and Pat nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jan 1, 2024
1 parent 1cea0be commit 6c4627f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ ast_struct! {

ast_struct! {
/// A const block: `const { ... }`.
#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))]
pub struct ExprConst #full {
pub attrs: Vec<Attribute>,
pub const_token: Token![const],
Expand Down Expand Up @@ -443,6 +444,7 @@ ast_struct! {

ast_struct! {
/// The inferred value of a const generic argument, denoted `_`.
#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))]
pub struct ExprInfer #full {
pub attrs: Vec<Attribute>,
pub underscore_token: Token![_],
Expand Down Expand Up @@ -483,6 +485,7 @@ ast_struct! {

ast_struct! {
/// A macro invocation expression: `format!("{}", q)`.
#[cfg_attr(doc_cfg, doc(cfg(any(feature = "full", feature = "derive"))))]
pub struct ExprMacro {
pub attrs: Vec<Attribute>,
pub mac: Macro,
Expand Down
1 change: 1 addition & 0 deletions src/pat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ ast_struct! {

ast_struct! {
/// A parenthesized pattern: `(A | B)`.
#[cfg_attr(doc_cfg, doc(cfg(feature = "full")))]
pub struct PatParen {
pub attrs: Vec<Attribute>,
pub paren_token: token::Paren,
Expand Down

0 comments on commit 6c4627f

Please sign in to comment.