forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
[pull] master from rust-lang:master #99
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This allows every check to be a single hashtable lookup instead of a linear scan.
This also incorporates some requested improvements to the error message for unknown directives.
Constify `ControlFlow` methods without unstable bounds Feature: `min_const_control_flow` Tracking issue: #148738 This PR constifies some of the methods on `ControlFlow`.
compiletest: Do the known-directives check only once, and improve its error message This PR is a combination of three changes: - Store the list of known directives in a set, so that checking a directive name doesn't require a linear scan - Extract the known-directives check out of `iter_directives` and do it only once, instead of multiple times per file - Improve the error message for unknown directives, [as requested on Zulip](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Compiletest.20directive.20parsing.20error/with/553598083) The change to error messages is fused with the extraction, since doing it independently would have been more awkward. --- ## Before ```text Testing stage1 with compiletest suite=coverage mode=coverage-map (aarch64-apple-darwin) errors encountered during EarlyProps parsing: /Users/stuart/Dev/rust/rust/tests/coverage/trivial.rs 2025-11-05T01:55:46.440012Z ERROR compiletest::directives: /Users/stuart/Dev/rust/rust/tests/coverage/trivial.rs:2: detected unknown compiletest test directive `add-core-stubs` thread '<unnamed>' (36268582) panicked at src/tools/compiletest/src/directives.rs:72:13: errors encountered during EarlyProps parsing note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` ## After ```text Testing stage1 with compiletest suite=coverage mode=coverage-map (aarch64-apple-darwin) thread '<unnamed>' (36270772) panicked at src/tools/compiletest/src/lib.rs:876:9: directives check failed: ERROR: unknown compiletest directive `add-core-stubs` at /Users/stuart/Dev/rust/rust/tests/coverage/trivial.rs:2 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ```
…ek,fmease Fix invalid macro tag generation for keywords which can be followed by values Fixes #148617. The problem didn't come from the `generate-macro-expansion` feature but was actually uncovered thanks to it. Keywords like `if` or `return`, when followed by a `!` were considered as macros, which was wrong and let to invalid class stack and to the panic. ~~While working on it, I realized that `_` was considered as a keyword, so I fixed that as well in the second commit.~~ (reverted, see #148655 (comment), #148655 (comment)) r? `@yotamofek`
Rollup of 4 pull requests Successful merges: - #148248 (Constify `ControlFlow` methods without unstable bounds) - #148285 (Constify `ControlFlow` methods with unstable bounds) - #148510 (compiletest: Do the known-directives check only once, and improve its error message) - #148655 (Fix invalid macro tag generation for keywords which can be followed by values) r? `@ghost` `@rustbot` modify labels: rollup
Update LLVM to 21.1.5 Includes some fixes for BPF.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )