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 4 pull requests #132586

Merged
merged 9 commits into from
Nov 4, 2024
Merged

Commits on Oct 3, 2024

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

Commits on Nov 3, 2024

  1. remove const-support for align_offset

    Operations like is_aligned would return actively wrong results at compile-time,
    i.e. calling it on the same pointer at compiletime and runtime could yield
    different results. That's no good.
    
    Instead of having hacks to make align_offset kind-of work in const-eval, just
    use const_eval_select in the few places where it makes sense, which also ensures
    those places are all aware they need to make sure the fallback behavior is
    consistent.
    RalfJung committed Nov 3, 2024
    Configuration menu
    Copy the full SHA
    19e2870 View commit details
    Browse the repository at this point in the history
  2. Reduce dependence on the target name

    The target name can be anything with custom target specs. Matching on
    fields inside the target spec is much more robust than matching on the
    target name.
    bjorn3 committed Nov 3, 2024
    Configuration menu
    Copy the full SHA
    9e6d2da View commit details
    Browse the repository at this point in the history
  3. Remove is_builtin target spec field

    It is unused.
    bjorn3 committed Nov 3, 2024
    Configuration menu
    Copy the full SHA
    775aad8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    efaf9ab View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2024

  1. Rollup merge of rust-lang#131222 - thejpster:fix-sparc-v7-symbol-o, r…

    …=workingjubilee
    
    Generate correct symbols.o for sparc-unknown-none-elf
    
    This fixes rust-lang#130172 by selecting the correct ELF Machine type for sparc-unknown-none-elf (which has a baseline of SPARC V7).
    workingjubilee authored Nov 4, 2024
    Configuration menu
    Copy the full SHA
    f35433e View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#132423 - RalfJung:const-eval-align-offset, …

    …r=dtolnay
    
    remove const-support for align_offset and is_aligned
    
    As part of the recent discussion to stabilize `ptr.is_null()` in const context, the general vibe was that it's okay for a const function to panic when the same operation would work at runtime (that's just a case of "dynamically detecting that something is not supported as a const operation"), but it is *not* okay for a const function to just return a different result.
    
    Following that, `is_aligned` and `is_aligned_to` have their const status revoked in this PR, since they do return actively wrong results at const time. In the future we can consider having a new intrinsic or so that can check whether a pointer is "guaranteed to be aligned", but the current implementation based on `align_offset` does not have the behavior we want.
    
    In fact `align_offset` itself behaves quite strangely in const, and that support needs a bunch of special hacks. That doesn't seem worth it. Instead, the users that can fall back to a different implementation should just use const_eval_select directly, and everything else should not be made const-callable. So this PR does exactly that, and entirely removes const support for align_offset.
    
    Closes some tracking issues by removing the associated features:
    Closes rust-lang#90962
    Closes rust-lang#104203
    
    Cc `@rust-lang/wg-const-eval` `@rust-lang/libs-api`
    workingjubilee authored Nov 4, 2024
    Configuration menu
    Copy the full SHA
    3313e76 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#132565 - bjorn3:less_target_name_dependence…

    …, r=workingjubilee
    
    Reduce dependence on the target name
    
    The target name can be anything with custom target specs. Matching on fields inside the target spec is much more robust than matching on the target name.
    
    Also remove the unused is_builtin target spec field.
    workingjubilee authored Nov 4, 2024
    Configuration menu
    Copy the full SHA
    7155c65 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#132576 - jdonszelmann:no-attrid-in-stats, r…

    …=nnethercote
    
    remove attribute ids from hir stats (they're simply not needed)
    
    Turns out these are simply not needed. Yay!
    
    r? `@nnethercote`
    workingjubilee authored Nov 4, 2024
    Configuration menu
    Copy the full SHA
    759e80d View commit details
    Browse the repository at this point in the history