-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Rollup of 5 pull requests #69325
Rollup of 5 pull requests #69325
Conversation
…erflow on BinOps and not on Assert
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
We already have a structured suggestion, but the wording made it seem like that wasn't the case. Fix rust-lang#65286. r? @varkor
…enkov On mismatched argument count point at arguments
Unify and improve const-prop lints Add a single helper method for all lints emitted by const-prop, and make that lint different from the CTFE `const_err` lint. Also consistently check overflow on *arithmetic*, not on the assertion, to make behavior the same for debug and release builds. See [this summary comment](rust-lang#69185 (comment)) for details and the latest status. In terms of lint formatting, I went for what seems to be the better style: have a general message above the code, and then a specific message at the span: ``` error: this arithmetic operation will overflow --> $DIR/const-err2.rs:21:18 | LL | let a_i128 = -std::i128::MIN; | ^^^^^^^^^^^^^^^ attempt to negate with overflow ``` We could also just have the specific message above and no text at the span if that is preferred. I also converted some of the existing tests to use compiletest revisions, so that the same test can check a bunch of different compile flags. Fixes rust-lang#69020. Helps with rust-lang#69021: debug/release are now consistent, but the assoc-const test in that issue still fails (there is a FIXME in the PR for this). The reason seems to be that const-prop notices the assoc const in `T::N << 42` and does not even bother calling `const_prop` on that operation. Has no effect on rust-lang#61821; the duplication there has entirely different reasons.
Tweak binding lifetime suggestion text We already have a structured suggestion, but the wording made it seem like that wasn't the case. Fix rust-lang#65286. r? @varkor
…, r=Dylan-DPC Clean up E0321 and E0322 r? @Dylan-DPC
Fix broken link to the rustc guide
@bors r+ p=5 rollup=never |
📌 Commit c1165ce has been approved by |
☀️ Test successful - checks-azure |
📣 Toolstate changed by #69325! Tested on commit 2c462a2. 💔 clippy-driver on windows: test-pass → test-fail (cc @mcarton @oli-obk @Manishearth @flip1995 @yaahc @phansch @llogiq, @rust-lang/infra). |
Tested on commit rust-lang/rust@2c462a2. Direct link to PR: <rust-lang/rust#69325> 💔 clippy-driver on windows: test-pass → test-fail (cc @mcarton @oli-obk @Manishearth @flip1995 @yaahc @phansch @llogiq, @rust-lang/infra). 💔 clippy-driver on linux: test-pass → test-fail (cc @mcarton @oli-obk @Manishearth @flip1995 @yaahc @phansch @llogiq, @rust-lang/infra). 💔 miri on linux: test-pass → test-fail (cc @oli-obk @eddyb @RalfJung, @rust-lang/infra). 💔 reference on windows: test-pass → test-fail (cc @matthewjasper @Havvy @steveklabnik @ehuss, @rust-lang/infra). 💔 reference on linux: test-pass → test-fail (cc @matthewjasper @Havvy @steveklabnik @ehuss, @rust-lang/infra).
rustup rust-lang/rust#69325, update test stderr changelog: none
Successful merges:
Failed merges:
r? @ghost