-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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 9 pull requests #120226
Rollup of 9 pull requests #120226
Commits on Dec 7, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 5ec0a21 - Browse repository at this point
Copy the full SHA 5ec0a21View commit details
Commits on Jan 8, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 8b52275 - Browse repository at this point
Copy the full SHA 8b52275View commit details
Commits on Jan 12, 2024
-
- lint if the lock was in a nested pattern - lint if the lock is inside a `Result<Lock, _>`
Configuration menu - View commit details
-
Copy full SHA for a04ac49 - Browse repository at this point
Copy the full SHA a04ac49View commit details
Commits on Jan 19, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 724fe8f - Browse repository at this point
Copy the full SHA 724fe8fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6b8eae0 - Browse repository at this point
Copy the full SHA 6b8eae0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 76659ae - Browse repository at this point
Copy the full SHA 76659aeView commit details
Commits on Jan 21, 2024
-
chore: suggest wrapping in an
assert!()
insteadThis shortens the `#[must_use]` diagnostics displayed, in light of the [review comment](https://github.com/rust-lang/rust/pull/62431/files#r300819839) on when this was originally added.
Configuration menu - View commit details
-
Copy full SHA for 1821bfa - Browse repository at this point
Copy the full SHA 1821bfaView commit details -
Configuration menu - View commit details
-
Copy full SHA for ff02662 - Browse repository at this point
Copy the full SHA ff02662View commit details -
Configuration menu - View commit details
-
Copy full SHA for 30b8b44 - Browse repository at this point
Copy the full SHA 30b8b44View commit details -
Configuration menu - View commit details
-
Copy full SHA for ab6216a - Browse repository at this point
Copy the full SHA ab6216aView commit details -
Configuration menu - View commit details
-
Copy full SHA for ae3c00c - Browse repository at this point
Copy the full SHA ae3c00cView commit details -
Configuration menu - View commit details
-
Copy full SHA for b95ce30 - Browse repository at this point
Copy the full SHA b95ce30View commit details -
Configuration menu - View commit details
-
Copy full SHA for f00c088 - Browse repository at this point
Copy the full SHA f00c088View commit details -
Configuration menu - View commit details
-
Copy full SHA for 807c868 - Browse repository at this point
Copy the full SHA 807c868View commit details -
We have several methods indicating the presence of errors, lint errors, and delayed bugs. I find it frustrating that it's very unclear which one you should use in any particular spot. This commit attempts to instill a basic principle of "use the least general one possible", because that reflects reality in practice -- `has_errors` is the least general one and has by far the most uses (esp. via `abort_if_errors`). Specifics: - Add some comments giving some usage guidelines. - Prefer `has_errors` to comparing `err_count` to zero. - Remove `has_errors_or_span_delayed_bugs` because it's a weird one: in the cases where we need to count delayed bugs, we should really be counting lint errors as well. - Rename `is_compilation_going_to_fail` as `has_errors_or_lint_errors_or_span_delayed_bugs`, for consistency with `has_errors` and `has_errors_or_lint_errors`. - Change a few other `has_errors_or_lint_errors` calls to `has_errors`, as per the "least general" principle. This didn't turn out to be as neat as I hoped when I started, but I think it's still an improvement.
Configuration menu - View commit details
-
Copy full SHA for 1f9fa23 - Browse repository at this point
Copy the full SHA 1f9fa23View commit details
Commits on Jan 22, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 774a47d - Browse repository at this point
Copy the full SHA 774a47dView commit details -
Rollup merge of rust-lang#118714 - The-Ludwig:explain_ord_derive_enum…
…_field, r=Nilstrieb Explanation that fields are being used when deriving `(Partial)Ord` on enums When deriving `std::cmp::Ord` or `std::cmp::PartialOrd` on enums, their fields are compared if the variants are equal. This means that the last assertion in the following snipped panics. ```rust use std::cmp::{PartialEq, Eq, PartialOrd, Ord}; #[derive(PartialEq, Eq, PartialOrd, Ord)] enum Sizes { Small(usize), Big(usize), } fn main() { let a = Sizes::Big(3); let b = Sizes::Big(5); let c = Sizes::Small(10); assert!( c < a); assert_eq!(a, c); } ``` This is more often expected behavior than not, and can be easily circumvented, as discussed in [this thread](https://users.rust-lang.org/t/how-to-sort-enum-variants/52291/4). But it is addressed nowhere in the documentation, yet. So I stumbled across this, as I personally did not expect fields being used in `PartialOrd`. I added the explanation to the documentation.
Configuration menu - View commit details
-
Copy full SHA for 6f7222c - Browse repository at this point
Copy the full SHA 6f7222cView commit details -
Rollup merge of rust-lang#119710 - Nilstrieb:let-_-=-oops, r=TaKO8Ki
Improve `let_underscore_lock` - lint if the lock was in a nested pattern - lint if the lock is inside a `Result<Lock, _>` addresses rust-lang#119704 (comment)
Configuration menu - View commit details
-
Copy full SHA for 72dddea - Browse repository at this point
Copy the full SHA 72dddeaView commit details -
Rollup merge of rust-lang#119726 - NCGThompson:div-overflow-doc, r=Ni…
…lstrieb Tweak Library Integer Division Docs Improved the documentation and diagnostics related to panicking in the division-like methods in std: * For signed methods that can overflow, clarified "results in overflow" to "self is -1 and rhs is Self::MIN." This is more concise than saying "results in overflow" and then explaining how it could overflow. * For floor/ceil_div, corrected the documentation and made it more like the documentation in other methods. * For signed methods that can overflow, explicitly mention that they are not affected by compiler flags. * Removed all unused rustc_inherit_overflow_checks attributes. The non-division-like operations will never overflow. * Added track_caller attributes to all methods that can panic. The panic messages will always be correct. For example, division methods all have / before %. * Edited the saturating_div documentation to be consistent with similar methods.
Configuration menu - View commit details
-
Copy full SHA for 7d7c225 - Browse repository at this point
Copy the full SHA 7d7c225View commit details -
Rollup merge of rust-lang#119746 - notriddle:notriddle/resize-close-m…
…odals, r=fmease rustdoc: hide modals when resizing the sidebar Follow-up for rust-lang#119477 (comment) CC `@lukas-code`
Configuration menu - View commit details
-
Copy full SHA for 6687e8e - Browse repository at this point
Copy the full SHA 6687e8eView commit details -
Rollup merge of rust-lang#119986 - nnethercote:fix-error-counting, r=…
…compiler-errors,oli-obk Fix error counting There is some messiness in how errors get counted. Here are some cleanups. r? `@compiler-errors`
Configuration menu - View commit details
-
Copy full SHA for bef2e85 - Browse repository at this point
Copy the full SHA bef2e85View commit details -
Rollup merge of rust-lang#120194 - HTGAzureX1212:HTGAzureX1212shorten…
…-option-must-use, r=Nilstrieb Shorten `#[must_use]` Diagnostic Message for `Option::is_none` This shortens the `#[must_use]` diagnostics displayed, in light of the [review comment](https://github.com/rust-lang/rust/pull/62431/files#r300819839) on when this was originally added.
Configuration menu - View commit details
-
Copy full SHA for 1df60b2 - Browse repository at this point
Copy the full SHA 1df60b2View commit details -
Rollup merge of rust-lang#120200 - noritada:fix/broken-error-message-…
…link, r=dtolnay Correct the anchor of an URL in an error message Following error message from rustc points to a URL, but its anchor does not exist. The destination seems to be https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-lib. This PR makes that correction. = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)
Configuration menu - View commit details
-
Copy full SHA for 50d0f24 - Browse repository at this point
Copy the full SHA 50d0f24View commit details -
Rollup merge of rust-lang#120203 - rowan-sl:usr-bin-env-bash, r=compi…
…ler-errors Replace `#!/bin/bash` with `#!/usr/bin/env bash` in rust-installer tests This allows the rust-installer tests to pass on NixOS This change has [already been made](rust-lang@302ad21) for the actual installer, it appears that the tests were just forgotten.
Configuration menu - View commit details
-
Copy full SHA for e39608d - Browse repository at this point
Copy the full SHA e39608dView commit details -
Rollup merge of rust-lang#120212 - nnethercote:nnethercote-reviewer, …
…r=compiler-errors Give nnethercote more reviews Gulp!
Configuration menu - View commit details
-
Copy full SHA for 610f13d - Browse repository at this point
Copy the full SHA 610f13dView commit details