Skip to content

Commit

Permalink
Auto merge of #12258 - epage:syn, r=weihanglo
Browse files Browse the repository at this point in the history
refactor(embedded): Switch to `syn` for parsing doc comments

This is a follow up to #12245 which is working to resolve #12207

The hope is this will result in more resilient comment handling, being more consistent with rustdoc.

I also hoped for less code but `syn` is doing less than I had expected, requiring us to copy code over from other parts of rust.  It seems every proc macro has to do this but there is no guide to it, so they all do it differently, only covering the cases they thought to test for.

Note that this still won't support `include_str!()`.
  • Loading branch information
bors committed Jun 17, 2023
2 parents 3b5fac5 + 4e0ac38 commit a581ca2
Show file tree
Hide file tree
Showing 3 changed files with 302 additions and 146 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Cargo.toml
Expand Up @@ -67,7 +67,6 @@ pretty_env_logger = "0.4"
proptest = "1.1.0"
pulldown-cmark = { version = "0.9.2", default-features = false }
rand = "0.8.5"
regex = "1.8.3"
rustfix = "0.6.0"
same-file = "1.0.6"
security-framework = "2.0.0"
Expand Down Expand Up @@ -153,7 +152,6 @@ pathdiff.workspace = true
pretty_env_logger = { workspace = true, optional = true }
pulldown-cmark.workspace = true
rand.workspace = true
regex.workspace = true
rustfix.workspace = true
semver.workspace = true
serde = { workspace = true, features = ["derive"] }
Expand Down

0 comments on commit a581ca2

Please sign in to comment.