fix: Include frontmatter in -Zunpretty output #143708
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.
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.
alternatively, tokenize could just take FrontmatterAllowed as an argument
There was a problem hiding this comment.
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.
Yeah, anything that you need to do to unbreak subrepos can be done in-tree.
|
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 (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.
|
@bors r=compiler-errors |
fix: Include frontmatter in -Zunpretty output 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. The test was carried over from rust-lang#137193 which was superseded by rust-lang#140035. Thankfully, either way, `-Zunpretty` is unstable and we can always change it even if we stabilize frontmatter.
Rollup of 7 pull requests Successful merges: - #142391 (rust: library: Add `setsid` method to `CommandExt` trait) - #143301 (`tests/ui`: A New Order [26/N]) - #143302 (`tests/ui`: A New Order [27/N]) - #143303 (`tests/ui`: A New Order [28/28] FINAL PART) - #143568 (std: sys: net: uefi: tcp4: Add timeout support) - #143708 (fix: Include frontmatter in -Zunpretty output ) - #143718 (Make UB transmutes really UB in LLVM) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 7 pull requests Successful merges: - #142391 (rust: library: Add `setsid` method to `CommandExt` trait) - #143301 (`tests/ui`: A New Order [26/N]) - #143302 (`tests/ui`: A New Order [27/N]) - #143303 (`tests/ui`: A New Order [28/28] FINAL PART) - #143568 (std: sys: net: uefi: tcp4: Add timeout support) - #143708 (fix: Include frontmatter in -Zunpretty output ) - #143718 (Make UB transmutes really UB in LLVM) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 8 pull requests Successful merges: - #142391 (rust: library: Add `setsid` method to `CommandExt` trait) - #143302 (`tests/ui`: A New Order [27/N]) - #143303 (`tests/ui`: A New Order [28/28] FINAL PART) - #143568 (std: sys: net: uefi: tcp4: Add timeout support) - #143611 (Mention more APIs in `ParseIntError` docs) - #143661 (chore: Improve how the other suggestions message gets rendered) - #143708 (fix: Include frontmatter in -Zunpretty output ) - #143718 (Make UB transmutes really UB in LLVM) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 8 pull requests Successful merges: - #142391 (rust: library: Add `setsid` method to `CommandExt` trait) - #143302 (`tests/ui`: A New Order [27/N]) - #143303 (`tests/ui`: A New Order [28/28] FINAL PART) - #143568 (std: sys: net: uefi: tcp4: Add timeout support) - #143611 (Mention more APIs in `ParseIntError` docs) - #143661 (chore: Improve how the other suggestions message gets rendered) - #143708 (fix: Include frontmatter in -Zunpretty output ) - #143718 (Make UB transmutes really UB in LLVM) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 8 pull requests Successful merges: - #142391 (rust: library: Add `setsid` method to `CommandExt` trait) - #143302 (`tests/ui`: A New Order [27/N]) - #143303 (`tests/ui`: A New Order [28/28] FINAL PART) - #143568 (std: sys: net: uefi: tcp4: Add timeout support) - #143611 (Mention more APIs in `ParseIntError` docs) - #143661 (chore: Improve how the other suggestions message gets rendered) - #143708 (fix: Include frontmatter in -Zunpretty output ) - #143718 (Make UB transmutes really UB in LLVM) r? `@ghost` `@rustbot` modify labels: rollup try-job: i686-gnu-nopt-1 try-job: test-various
Rollup of 8 pull requests Successful merges: - #142391 (rust: library: Add `setsid` method to `CommandExt` trait) - #143302 (`tests/ui`: A New Order [27/N]) - #143303 (`tests/ui`: A New Order [28/28] FINAL PART) - #143568 (std: sys: net: uefi: tcp4: Add timeout support) - #143611 (Mention more APIs in `ParseIntError` docs) - #143661 (chore: Improve how the other suggestions message gets rendered) - #143708 (fix: Include frontmatter in -Zunpretty output ) - #143718 (Make UB transmutes really UB in LLVM) r? `@ghost` `@rustbot` modify labels: rollup try-job: i686-gnu-nopt-1 try-job: test-various
Rollup of 8 pull requests Successful merges: - #142391 (rust: library: Add `setsid` method to `CommandExt` trait) - #143302 (`tests/ui`: A New Order [27/N]) - #143303 (`tests/ui`: A New Order [28/28] FINAL PART) - #143568 (std: sys: net: uefi: tcp4: Add timeout support) - #143611 (Mention more APIs in `ParseIntError` docs) - #143661 (chore: Improve how the other suggestions message gets rendered) - #143708 (fix: Include frontmatter in -Zunpretty output ) - #143718 (Make UB transmutes really UB in LLVM) r? `@ghost` `@rustbot` modify labels: rollup try-job: i686-gnu-nopt-1 try-job: test-various
Rollup merge of #143708 - epage:pretty, r=compiler-errors fix: Include frontmatter in -Zunpretty output 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 always change it even if we stabilize frontmatter.
Rollup of 8 pull requests Successful merges: - rust-lang/rust#142391 (rust: library: Add `setsid` method to `CommandExt` trait) - rust-lang/rust#143302 (`tests/ui`: A New Order [27/N]) - rust-lang/rust#143303 (`tests/ui`: A New Order [28/28] FINAL PART) - rust-lang/rust#143568 (std: sys: net: uefi: tcp4: Add timeout support) - rust-lang/rust#143611 (Mention more APIs in `ParseIntError` docs) - rust-lang/rust#143661 (chore: Improve how the other suggestions message gets rendered) - rust-lang/rust#143708 (fix: Include frontmatter in -Zunpretty output ) - rust-lang/rust#143718 (Make UB transmutes really UB in LLVM) r? `@ghost` `@rustbot` modify labels: rollup try-job: i686-gnu-nopt-1 try-job: test-various
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#142391 (rust: library: Add `setsid` method to `CommandExt` trait) - rust-lang#143302 (`tests/ui`: A New Order [27/N]) - rust-lang#143303 (`tests/ui`: A New Order [28/28] FINAL PART) - rust-lang#143568 (std: sys: net: uefi: tcp4: Add timeout support) - rust-lang#143611 (Mention more APIs in `ParseIntError` docs) - rust-lang#143661 (chore: Improve how the other suggestions message gets rendered) - rust-lang#143708 (fix: Include frontmatter in -Zunpretty output ) - rust-lang#143718 (Make UB transmutes really UB in LLVM) r? `@ghost` `@rustbot` modify labels: rollup try-job: i686-gnu-nopt-1 try-job: test-various
fix: Include frontmatter in -Zunpretty output 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. The test was carried over from rust-lang#137193 which was superseded by rust-lang#140035. Thankfully, either way, `-Zunpretty` is unstable and we can always change it even if we stabilize frontmatter.
Rollup of 8 pull requests Successful merges: - rust-lang/rust#142391 (rust: library: Add `setsid` method to `CommandExt` trait) - rust-lang/rust#143302 (`tests/ui`: A New Order [27/N]) - rust-lang/rust#143303 (`tests/ui`: A New Order [28/28] FINAL PART) - rust-lang/rust#143568 (std: sys: net: uefi: tcp4: Add timeout support) - rust-lang/rust#143611 (Mention more APIs in `ParseIntError` docs) - rust-lang/rust#143661 (chore: Improve how the other suggestions message gets rendered) - rust-lang/rust#143708 (fix: Include frontmatter in -Zunpretty output ) - rust-lang/rust#143718 (Make UB transmutes really UB in LLVM) r? `@ghost` `@rustbot` modify labels: rollup try-job: i686-gnu-nopt-1 try-job: test-various
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,
-Zunprettyis unstable and we can alwayschange it even if we stabilize frontmatter.