-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Mark Parser::eat
/check
methods as #[must_use]
#128376
Conversation
8bce014
to
e4076e3
Compare
This comment has been minimized.
This comment has been minimized.
lol rustfmt 🤦 |
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.
The compiler changes look reasonable to me, not sure what the rustfmt change procedure is.
I'll push a commit on top for rustfmt. I will just suppress the warnings rather than affect any logic. |
Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt |
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.
Thanks, r=me once PR CI is green
@bors r=jieyouxu |
…es, r=jieyouxu Mark `Parser::eat`/`check` methods as `#[must_use]` These methods return a `bool`, but we probably should either use these values or explicitly throw them away (e.g. when we just want to unconditionally eat a token if it exists). I changed a few places from `eat` to `expect`, but otherwise I tried to leave a comment explaining why the `eat` was okay. This also adds a test for the `pattern_type!` macro, which used to silently accept a missing `is` token.
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#127543 (More unsafe attr verification) - rust-lang#128357 (Detect non-lifetime binder params shadowing item params) - rust-lang#128367 (CI: rfl: build the generated doctests and documentation) - rust-lang#128376 (Mark `Parser::eat`/`check` methods as `#[must_use]`) - rust-lang#128379 (the output in stderr expects panic-unwind) - rust-lang#128380 (make `///` doc comments compatible with naked functions) - rust-lang#128382 (cargo-miri: better error when we seem to run inside bootstrap but something is wrong) - rust-lang#128398 (tidy: Fix quote in error message) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#128357 (Detect non-lifetime binder params shadowing item params) - rust-lang#128367 (CI: rfl: build the generated doctests and documentation) - rust-lang#128376 (Mark `Parser::eat`/`check` methods as `#[must_use]`) - rust-lang#128379 (the output in stderr expects panic-unwind) - rust-lang#128380 (make `///` doc comments compatible with naked functions) - rust-lang#128382 (cargo-miri: better error when we seem to run inside bootstrap but something is wrong) - rust-lang#128398 (tidy: Fix quote in error message) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#128376 - compiler-errors:finish-ur-vegetables, r=jieyouxu Mark `Parser::eat`/`check` methods as `#[must_use]` These methods return a `bool`, but we probably should either use these values or explicitly throw them away (e.g. when we just want to unconditionally eat a token if it exists). I changed a few places from `eat` to `expect`, but otherwise I tried to leave a comment explaining why the `eat` was okay. This also adds a test for the `pattern_type!` macro, which used to silently accept a missing `is` token.
@rust-timer build 61c9d37 (just testing the collector) |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (61c9d37): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 769.587s -> 770.252s (0.09%) |
These methods return a
bool
, but we probably should either use these values or explicitly throw them away (e.g. when we just want to unconditionally eat a token if it exists).I changed a few places from
eat
toexpect
, but otherwise I tried to leave a comment explaining why theeat
was okay.This also adds a test for the
pattern_type!
macro, which used to silently accept a missingis
token.