-
Notifications
You must be signed in to change notification settings - Fork 13.5k
fix: Include frontmatter in -Zunpretty output #143708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
r? @SparrowLii rustbot has assigned @SparrowLii. Use |
compiler/rustc_lexer/src/lib.rs
Outdated
/// Creates an iterator that produces tokens from the input string. | ||
/// | ||
/// Be sure to call [`strip_shebang`] first | ||
pub fn tokenize_document(input: &str) -> impl Iterator<Item = Token> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could this name + doc comment be more descriptive? i don't think it's obvious from the name or the doc comment that this one allows front-matter and the one above does not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alternatively, tokenize
could just take FrontmatterAllowed
as an argument
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating tokenize
looks to be a cross-repo change, also affecting clippy.
Looking over the external repos docs, it sounds like I'm free to make those updates in this PR and the maintainers of those subtrees will sync those back to the external repos?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, anything that you need to do to unbreak subrepos can be done in-tree.
In the implementation (rust-lang#140035), this was left as an open question for the tracking issue (rust-lang#136889). My assumption is that this should be carried over. Thankfully, either way, `-Zunpretty` is unstable and we can always change it even if we stabilize frontmatter.
Some changes occurred in src/tools/clippy cc @rust-lang/clippy rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead. cc @rust-lang/rust-analyzer |
r=me when CI is green |
This comment has been minimized.
This comment has been minimized.
Pls fix |
In the implementation (#140035), this was left as an open question for
the tracking issue (#136889). My assumption is that this should be
carried over.
The test was carried over from #137193 which was superseded by #140035.
Thankfully, either way,
-Zunpretty
is unstable and we can alwayschange it even if we stabilize frontmatter.