Skip to content

Commit

Permalink
Merge pull request #1380 from dtolnay/innerattr
Browse files Browse the repository at this point in the history
Disregard module inner attrs during C++ codegen
  • Loading branch information
dtolnay authored Oct 14, 2024
2 parents 5908658 + a48dc1a commit 4c37775
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gen/src/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ pub(crate) struct File {
impl Parse for File {
fn parse(input: ParseStream) -> Result<Self> {
let mut modules = Vec::new();
input.call(Attribute::parse_inner)?;
parse(input, &mut modules)?;
Ok(File { modules })
}
}

fn parse(input: ParseStream, modules: &mut Vec<Module>) -> Result<()> {
input.call(Attribute::parse_inner)?;

while !input.is_empty() {
let mut cxx_bridge = false;
let mut namespace = Namespace::ROOT;
Expand Down Expand Up @@ -60,6 +61,7 @@ fn parse(input: ParseStream, modules: &mut Vec<Module>) -> Result<()> {
}
}
}

Ok(())
}

Expand Down

0 comments on commit 4c37775

Please sign in to comment.