Skip to content
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 8 pull requests #121345

Merged
merged 16 commits into from
Feb 20, 2024
Merged

Rollup of 8 pull requests #121345

merged 16 commits into from
Feb 20, 2024

Commits on Feb 17, 2024

  1. Configuration menu
    Copy the full SHA
    f12d248 View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2024

  1. Configuration menu
    Copy the full SHA
    24cffbf View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2024

  1. Configuration menu
    Copy the full SHA
    9c32a7d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5be3d4b View commit details
    Browse the repository at this point in the history
  3. Remove the "codegen" profile from bootstrap

    This profile originally made sense when download-ci-llvm = if-unchanged
    didn't exist and we had the bad tradeoff of "never modify or always
    compile".
    
    Thankfully, these grim times are over and we have discovered clean
    water, so the only differentiator between the two profiles is the
    codegen profile having LLVM assertions. Adding them doesn't cause that
    much of a slowdown, <10% on UI tests from an unscientific benchmark.
    
    It also had LLVM warnings when compiling, which makes sense for every
    compiler contributor brave enough to compile LLVM.
    
    The way I removed is by just issueing a nice error message. Given that
    everyone with this profile should be a contributor and not someone like
    a distro who is more upset when things break, this should be fine.
    If it isn't, we can always fall back to just letting codegen mean
    compiler.
    Noratrieb committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    9e68d89 View commit details
    Browse the repository at this point in the history
  4. Always inline check in assert_unsafe_precondition with cfg(debug_as…

    …sertions)
    
    The current complexities in `assert_unsafe_precondition` are delicately
    balancing several concerns, among them compile times for the cases where
    there are no debug assertions. This comes at a large runtime cost when
    the assertions are enabled, making the debug assertion compiler a lot
    slower, which is very annoying.
    
    To avoid this, we always inline the check when building with debug
    assertions.
    
    Numbers (compiling stage1 library after touching core):
    - master: 80s
    - just adding `#[inline(always)]` to the `cfg(bootstrap)`
      `debug_assertions`: 67s
    - this: 54s
    
    So this seems like a good solution. I think we can still get
    the same run-time perf improvements for other users too by
    massaging this code further (see my other PR about adding
    `#[rustc_no_mir_inline]`) but this is a simpler step that
    solves the imminent problem of "holy shit my rustc is sooo slow".
    
    Funny consequence: This now means compiling the standard library with
    dbeug assertions makes it faster (than without, when using debug
    assertions downstream)!
    Noratrieb committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    03d03c6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    dc7a016 View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2024

  1. Rename ConstPropLint to KnownPanicsLint

    It is a clearer name because it communicates what the lint does
    instead of the underlying mechanism it uses (const propagation).
    gurry committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    42c4df0 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#121167 - petrochenkov:unload2, r=wesleywiser

    resolve: Scale back unloading of speculatively loaded crates
    
    Fixes rust-lang#120830 and fixes rust-lang#120909 while still unblocking rust-lang#117772.
    
    I cannot reproduce https://github.com/parasyte/crash-rustc as an UI test for some reason, but I tested all the cases linked above manually.
    Noratrieb authored Feb 20, 2024
    Configuration menu
    Copy the full SHA
    073d298 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#121196 - Nilstrieb:the-clever-solution, r=s…

    …aethlin
    
    Always inline check in `assert_unsafe_precondition` with cfg(debug_assertions)
    
    The current complexities in `assert_unsafe_precondition` are delicately balancing several concerns, among them compile times for the cases where there are no debug assertions. This comes at a large runtime cost when the assertions are enabled, making the debug assertion compiler a lot slower, which is very annoying.
    
    To avoid this, we always inline the check when building with debug assertions.
    
    Numbers (compiling stage1 library after touching core):
    - master: 80s
    - just adding `#[inline(always)]` to the `cfg(bootstrap)` `debug_assertions` (equivalent to a bootstrap bump (uhh, i just realized that i was on a slightly outdated master so this bump might have happened already), (rust-lang#121112)): 67s
    - this: 54s
    
    So this seems like a good solution. I think we can still get the same run-time perf improvements for other users too by massaging this code further (see my other PR about adding `#[rustc_no_mir_inline]` rust-lang#121114) but this is a simpler step that solves the imminent problem of "holy shit my rustc is sooo slow".
    
    Funny consequence: This now means compiling the standard library with dbeug assertions makes it faster (than without, when using debug assertions downstream)!
    
    r? ```@saethlin``` (or anyone else if someone wants to review this)
    
    fixes rust-lang#121110, supposedly
    Noratrieb authored Feb 20, 2024
    Configuration menu
    Copy the full SHA
    4ff6bb5 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#121241 - reitermarkus:generic-nonzero-trait…

    …s, r=dtolnay
    
    Implement `NonZero` traits generically.
    
    Tracking issue: rust-lang#120257
    
    r? ````@dtolnay````
    Noratrieb authored Feb 20, 2024
    Configuration menu
    Copy the full SHA
    f6b4080 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#121278 - Nilstrieb:no-more-codegen, r=clubb…

    …y789
    
    Remove the "codegen" profile from bootstrap
    
    This profile originally made sense when download-ci-llvm = if-unchanged didn't exist and we had the bad tradeoff of "never modify or always compile".
    
    Thankfully, these grim times are over and we have discovered clean water, so the only differentiator between the two profiles is the codegen profile having LLVM assertions. Adding them doesn't cause that much of a slowdown, <10% on UI tests from an unscientific benchmark.
    
    It also had LLVM warnings when compiling, which makes sense for every compiler contributor brave enough to compile LLVM.
    
    The way I removed is by just issueing a nice error message. Given that everyone with this profile should be a contributor and not someone like a distro who is more upset when things break, this should be fine. If it isn't, we can always fall back to just letting codegen mean compiler.
    Noratrieb authored Feb 20, 2024
    Configuration menu
    Copy the full SHA
    c5d2159 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#121286 - gurry:constprop-lint-rename, r=oli…

    …-obk
    
    Rename `ConstPropLint` to `KnownPanicsLint`
    
    `OverflowLint` is a clearer name because it communicates what the lint does instead of the underlying mechanism it uses (const propagation) which should be of secondary concern.
    
    `OverflowLint` isn't the most accurate name because the lint looks for other errors as well such as division by zero not just overflows, but I couldn't think of another equally succinct name.
    
    As a part of this change. I've also added/updated some of the comments.
    
    cc ```@RalfJung``` ```@oli-obk``` for visibility in case you go looking for the lint using the old name.
    
    Edit:
    
    Changed the name from `OverflowLint` to `KnownPanicsLint`
    Noratrieb authored Feb 20, 2024
    Configuration menu
    Copy the full SHA
    bc7489c View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#121291 - heiher:revert-medium-cmodel, r=Nil…

    …strieb
    
    target: Revert default to the medium code model on LoongArch targets
    
    This reverts commit 35dad14.
    
    Fixes rust-lang#121289
    Noratrieb authored Feb 20, 2024
    Configuration menu
    Copy the full SHA
    5540d81 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#121302 - GrigorenkoPV:refmutl, r=bjorn3

    Remove `RefMutL` hack in `proc_macro::bridge`
    
    From what I can tell, rust-lang#52812 is now fixed, so there is no longer any need to keep this hack around.
    Noratrieb authored Feb 20, 2024
    Configuration menu
    Copy the full SHA
    739f83d View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#121318 - kadiwa4:no_assembly_in_supposedly_…

    …safe_code, r=Nilstrieb
    
    Trigger `unsafe_code` lint on invocations of `global_asm`
    
    `unsafe_code` already warns about things that don't involve the `unsafe` keyword, e.g. `#[no_mangle]`. This makes it warn on `core::arch::global_asm` too.
    
    Fixes rust-lang#103078
    Noratrieb authored Feb 20, 2024
    Configuration menu
    Copy the full SHA
    d61adbf View commit details
    Browse the repository at this point in the history