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 10 pull requests #133340

Closed
wants to merge 24 commits into from
Closed

Commits on Nov 18, 2024

  1. Rename parse_no_flag to parse_no_value

    The old name and comment suggest that this parser is only used for options
    beginning with `no-`, which is mostly true but not entirely true.
    Zalathar committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    0a619dd View commit details
    Browse the repository at this point in the history
  2. Don't allow -Zunstable-options to take a value

    Passing an explicit boolean value (`on`, `off` etc.) appears to work, but
    actually puts the compiler into an unintended state where unstable _options_
    are still forbidden, but unstable values of _some_ stable options are allowed.
    Zalathar committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    660246b View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2024

  1. Fix missing submodule in ./x vendor

    The `src/tools/rustc-perf` submodule is needed for vendoring because
    it is included in the vendor set.
    ehuss committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    16550d9 View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2024

  1. Configuration menu
    Copy the full SHA
    030ddee View commit details
    Browse the repository at this point in the history
  2. Detect const in pattern with typo

    When writing a constant name incorrectly in a pattern, the pattern will be identified as a new binding. We look for consts in the current crate, consts that where imported in the current crate and for local `let` bindings in case someone got them confused with `const`s.
    
    ```
    error: unreachable pattern
      --> $DIR/const-with-typo-in-pattern-binding.rs:30:9
       |
    LL |         GOOOD => {}
       |         ----- matches any value
    LL |
    LL |         _ => {}
       |         ^ no value can reach this
       |
    help: you might have meant to pattern match against the value of similarly named constant `GOOD` instead of introducing a new catch-all binding
       |
    LL |         GOOD => {}
       |         ~~~~
    ```
    
    Fix rust-lang#132582.
    estebank committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    2487765 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    666bcbd View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2024

  1. Configuration menu
    Copy the full SHA
    0465f71 View commit details
    Browse the repository at this point in the history
  2. generate-copyright: Now generates a library file too.

    We only run reuse once, so the output has to be filtered to find only the files that are relevant to the library tree.
    
    Outputs build/COPYRIGHT.html and build/COPYRIGHT-library.html.
    jonathanpallant committed Nov 21, 2024
    Configuration menu
    Copy the full SHA
    9dfc682 View commit details
    Browse the repository at this point in the history
  3. Re-delay a resolve bug

    For the code pattern reported in
    <rust-lang#133272>,
    
    ```rs
    impl Foo {
       fn fun() {
            let S { ref Self } = todo!();
       }
    }
    ```
    
    <rust-lang#121208> converted this to a
    `span_bug` from a `span_delayed_bug` because this specific self-ctor
    code pattern lacked test coverage. It turns out this can be hit but we
    just lacked test coverage, so change it back to a `span_delayed_bug` and
    add a target tested case.
    jieyouxu committed Nov 21, 2024
    Configuration menu
    Copy the full SHA
    5d30436 View commit details
    Browse the repository at this point in the history
  4. constify Add

    fee1-dead committed Nov 21, 2024
    Configuration menu
    Copy the full SHA
    514ef18 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f74fdd2 View commit details
    Browse the repository at this point in the history
  6. Change to pass "strip" options in an array of string slices and add o…

    …ption "-X32_64" for AIX.
    xingxue-ibm committed Nov 21, 2024
    Configuration menu
    Copy the full SHA
    02f51ec View commit details
    Browse the repository at this point in the history
  7. Keep list of submodules close to list of vendored workspaces

    This moves the list of submodules needed to vendor close to the list of
    cargo workspaces with the intent to help ensure they keep up-to-date and
    in sync.
    ehuss committed Nov 21, 2024
    Configuration menu
    Copy the full SHA
    d8e8fc5 View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2024

  1. Configuration menu
    Copy the full SHA
    2932833 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#132090 - compiler-errors:baily, r=lcnr

    Stop being so bail-y in candidate assembly
    
    A conceptual follow-up to rust-lang#132084. We gotta stop bailing so much when there are errors; it's both unnecessary, leads to weird knock-on errors, and it's messing up the vibes lol
    jieyouxu authored Nov 22, 2024
    Configuration menu
    Copy the full SHA
    89aa101 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#132658 - estebank:const-in-pattern-typo, r=…

    …Nadrieril
    
    Detect const in pattern with typo
    
    When writing a constant name incorrectly in a pattern, the pattern will be identified as a new binding. We look for consts in the current crate, consts that where imported in the current crate and for local `let` bindings in case someone got them confused with `const`s.
    
    ```
    error: unreachable pattern
      --> $DIR/const-with-typo-in-pattern-binding.rs:30:9
       |
    LL |         GOOOD => {}
       |         ----- matches any value
    LL |
    LL |         _ => {}
       |         ^ no value can reach this
       |
    help: you might have meant to pattern match against the value of similarly named constant `GOOD` instead of introducing a new catch-all binding
       |
    LL |         GOOD => {}
       |         ~~~~
    ```
    
    Fix rust-lang#132582.
    jieyouxu authored Nov 22, 2024
    Configuration menu
    Copy the full SHA
    db521ab View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#133102 - RalfJung:aarch64-softfloat, r=davi…

    …dtwco,wesleywiser
    
    aarch64 softfloat target: always pass floats in int registers
    
    This is a part of rust-lang#131058: on softfloat aarch64 targets, the float registers may be unavailable. And yet, LLVM will happily use them to pass float types if the corresponding target features are enabled. That's a problem as it means enabling/disabling `neon` instructions can change the ABI.
    
    Other targets have a `soft-float` target feature that forces the use of the soft-float ABI no matter whether float registers are enabled or not; aarch64 has nothing like that.
    
    So we follow the aarch64 [softfloat ABI](rust-lang#131058 (comment)) and treat floats like integers for `extern "C"` functions. For the "Rust" ABI, we do the same for scalars, and then just do something reasonable for ScalarPair that avoids the pointer indirection.
    
    Cc ``@workingjubilee``
    jieyouxu authored Nov 22, 2024
    Configuration menu
    Copy the full SHA
    9975b65 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#133159 - Zalathar:unstable-options-no-value…

    …, r=jieyouxu
    
    Don't allow `-Zunstable-options` to take a value
    
    Passing an explicit boolean value (`-Zunstable-options=on`, `off` etc.) sometimes appears to work, but actually puts the compiler into an unintended state where unstable _options_ are still forbidden, but unstable values of _some_ stable options are allowed.
    
    This is a result of `-Zunstable-options` being checked in multiple different places, in slightly different ways. Fixing the checks in `config::nightly_options` to understand boolean values would be non-trivial, so for now it's easier to make things consistent by forbidding values in the `-Z` parser.
    
    ---
    
    There were a few uses of this in tests, which happened to work because they were tests of unstable values.
    jieyouxu authored Nov 22, 2024
    Configuration menu
    Copy the full SHA
    6acd34d View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#133208 - ferrocene:split-copyright-html, r=…

    …Kobzol
    
    generate-copyright: Now generates a library file too.
    
    We only run reuse once, so the output has to be filtered to find only the files that are relevant to the library tree.
    
    Outputs COPYRIGHT.html and COPYRIGHT-library.html.
    
    The license-metadata.json file is also now in the tree. We need a CI tool to check that it's correct.
    
    r? kobzol
    
    Remaining steps:
    
    * [ ] Teach CI to double-check the license-metadata.json file is correct
    * [ ] Add the COPYRIGHT.html and COPYRIGHT-license.html to the releases
    jieyouxu authored Nov 22, 2024
    Configuration menu
    Copy the full SHA
    53559c2 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#133215 - ehuss:fix-vendor-rustc-perf, r=kobzol

    Fix missing submodule in `./x vendor`
    
    The `src/tools/rustc-perf` submodule is needed for vendoring because it is included in the vendor set.
    
    To test this:
    
    1. Get a fresh clone of `rust-lang/rust`
    2. `./x vendor`
    jieyouxu authored Nov 22, 2024
    Configuration menu
    Copy the full SHA
    ff307b9 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#133217 - xingxue-ibm:fix-strip, r=compiler-…

    …errors
    
    [AIX] Add option -X32_64 to the "strip" command
    
    The AIX `strip` utility requires option `-X` to specify the object mode. This patch adds the `-X32_64` option to the `strip` command so that it can handle both 32-bit and 64-bit objects. The parameter `option` of function `strip_symbols_with_external_utility`, previously a single string, has been changed to `options`, an array of string slices, to accommodate multiple `strip` options.
    jieyouxu authored Nov 22, 2024
    Configuration menu
    Copy the full SHA
    1a06e44 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#133237 - fee1-dead-contrib:constadd, r=comp…

    …iler-errors
    
    Minimally constify `Add`
    
    * This PR removes the requirement for `impl const` to have a const stability attribute. cc ```@RalfJung``` I believe you mentioned that it would make much more sense to require `const_trait`s to have const stability instead. I agree with that sentiment but I don't think that is _required_ for a small scale experimentation like this PR. rust-lang/project-const-traits#16 should definitely be prioritized in the future, but removing the impl check should be good for now as all callers need `const_trait_impl` enabled for any const impl to work.
    * This PR is intentionally minimal as constifying other traits can become more complicated (`PartialEq`, for example, would run into requiring implementing it for `str` as that is used in matches, which runs into the implementation for slice equality which uses specialization)
    
    Per the reasons above, anyone who is interested in making traits `const` in the standard library are **strongly encouraged** to reach out to us on the [Zulip channel](https://rust-lang.zulipchat.com/#narrow/channel/419616-t-compiler.2Fproject-const-traits) before proceeding with the work.
    
    cc ```@rust-lang/project-const-traits```
    
    I believe there is prior approval from libs that we can experiment, so
    
    r? project-const-traits
    jieyouxu authored Nov 22, 2024
    Configuration menu
    Copy the full SHA
    15d66c3 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#133286 - jieyouxu:bug-ourselves, r=compiler…

    …-errors
    
    Re-delay a resolve `bug` related to `Self`-ctor in patterns
    
    For the code pattern reported in <rust-lang#133272>,
    
    ```rs
    impl Foo {
       fn fun() {
            let S { ref Self } = todo!();
       }
    }
    ```
    
    <rust-lang#121208> converted this to a `span_bug` from a `span_delayed_bug` because this specific self-ctor code pattern lacked test coverage. It turns out this can be hit but we just lacked test coverage, so change it back to a `span_delayed_bug` and add a targeted test case.
    
    Follow-up to rust-lang#121208, cc ```@nnethercote``` (very good exercise to expose our test coverage gaps).
    Fixes rust-lang#133272.
    jieyouxu authored Nov 22, 2024
    Configuration menu
    Copy the full SHA
    2228a9c View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#133301 - GuillaumeGomez:add-example-wrappin…

    …g-neg, r=workingjubilee
    
    Add code example for `wrapping_neg` method for signed integers
    
    With this example, we make it obvious that `wrapping_neg` works both ways (neg to pos and pos to neg).
    
    r? `@workingjubilee`
    jieyouxu authored Nov 22, 2024
    Configuration menu
    Copy the full SHA
    3248214 View commit details
    Browse the repository at this point in the history