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 #94520

Closed
wants to merge 28 commits into from
Closed

Commits on Feb 24, 2022

  1. ARM: Only allow using d16-d31 with asm! when supported by the target

    Support can be determined by checking for the "d32" LLVM feature.
    Amanieu committed Feb 24, 2022
    Configuration menu
    Copy the full SHA
    7cee1b4 View commit details
    Browse the repository at this point in the history

Commits on Feb 25, 2022

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

Commits on Feb 28, 2022

  1. Configuration menu
    Copy the full SHA
    00f165b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f9b3a0e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    12b80a4 View commit details
    Browse the repository at this point in the history
  4. Remove useless map.

    cjgillot committed Feb 28, 2022
    Configuration menu
    Copy the full SHA
    47f71b0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    cbc1202 View commit details
    Browse the repository at this point in the history
  6. Bless test.

    cjgillot committed Feb 28, 2022
    Configuration menu
    Copy the full SHA
    ac27ac0 View commit details
    Browse the repository at this point in the history
  7. Move query providers.

    cjgillot committed Feb 28, 2022
    Configuration menu
    Copy the full SHA
    7fcf0e2 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    56befcd View commit details
    Browse the repository at this point in the history
  9. Cleanup feature gates.

    cjgillot committed Feb 28, 2022
    Configuration menu
    Copy the full SHA
    65a1d3e View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    4f880ba View commit details
    Browse the repository at this point in the history
  11. Do not point at whole file missing fn main

    Only point at the end of the crate. We could try making it point at the
    beginning of the crate, but that is confused with `DUMMY_SP`, causing
    the output to be *worse*.
    
    This change will make it so that VSCode will *not* underline the whole
    file when `main` is missing, so other errors will be visible.
    estebank committed Feb 28, 2022
    Configuration menu
    Copy the full SHA
    c7ff23f View commit details
    Browse the repository at this point in the history

Commits on Mar 1, 2022

  1. Add helper function to suggest multiple constraints

    Add `rustc_middle::ty::suggest_constraining_type_params` that suggests
    adding multiple constraints.
    
    `suggest_constraining_type_param` now just forwards params to this new
    function.
    WaffleLapkin committed Mar 1, 2022
    Configuration menu
    Copy the full SHA
    4c7fb9e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    765205b View commit details
    Browse the repository at this point in the history
  3. Suggest adding Copy bound when Adt is moved out

    Previously we've only suggested adding `Copy` bounds when the type being
    moved/copied is a type parameter (generic). With this commit we also
    suggest adding bounds when a type
    - Can be copy
    - All predicates that need to be satisfied for that are based on type
      params
    
    i.e. we will suggest `T: Copy` for `Option<T>`, but won't suggest
    anything for `Option<String>`.
    
    Future work: it would be nice to also suggest adding `.clone()` calls
    WaffleLapkin committed Mar 1, 2022
    Configuration menu
    Copy the full SHA
    400d343 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    879efa8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f0a16b8 View commit details
    Browse the repository at this point in the history
  6. Demote Windows XP to no_std only

    Modify the tier 3 non-ARM targets to show the standard library will no longer build for these and there is no work being done to change that.
    RandomInsano authored Mar 1, 2022
    Configuration menu
    Copy the full SHA
    f287866 View commit details
    Browse the repository at this point in the history

Commits on Mar 2, 2022

  1. Configuration menu
    Copy the full SHA
    6739299 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#93142 - estebank:missing-main, r=wesleywiser

    Do not point at whole file missing `fn main`
    
    Only point at the end of the crate. We could try making it point at the
    beginning of the crate, but that is confused with `DUMMY_SP`, causing
    the output to be *worse*.
    
    This change will make it so that VSCode will *not* underline the whole
    file when `main` is missing, so other errors will be visible.
    Dylan-DPC authored Mar 2, 2022
    Configuration menu
    Copy the full SHA
    5e85837 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#94096 - cjgillot:ensure-stability, r=lcnr

    Ensure stability directives are checked in all cases
    
    Split off  rust-lang#93017
    
    Stability and deprecation were not checked in all cases, for instance if a type error happened.
    This PR moves the check earlier in the pipeline to ensure the errors are emitted in all cases.
    
    r? `@lcnr`
    Dylan-DPC authored Mar 2, 2022
    Configuration menu
    Copy the full SHA
    dc07b32 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#94298 - Urgau:rustbuild-check-cfg, r=Mark-S…

    …imulacrum
    
    Enable conditional compilation checking on the Rust codebase
    
    This pull-request enable conditional compilation checking on every rust project build by the `bootstrap` tool.
    
    To be more specific, this PR only enable well known names checking + extra names (bootstrap, parallel_compiler, ...).
    
    r? `@Mark-Simulacrum`
    Dylan-DPC authored Mar 2, 2022
    Configuration menu
    Copy the full SHA
    4b4ee53 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#94339 - Amanieu:arm-d32, r=nagisa

    ARM: Only allow using d16-d31 with asm! when supported by the target
    
    Support can be determined by checking for the "d32" LLVM feature.
    
    r? ``@nagisa``
    Dylan-DPC authored Mar 2, 2022
    Configuration menu
    Copy the full SHA
    bcf5165 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#94375 - WaffleLapkin:copy-suggestion, r=est…

    …ebank
    
    Adt copy suggestions
    
    Previously we've only suggested adding `Copy` bounds when the type being moved/copied is a type parameter (generic). With this PR we also suggest adding bounds when a type
    - Can be copy
    - All predicates that need to be satisfied for that are based on type params
    
    i.e. we will suggest `T: Copy` for `Option<T>`, but won't suggest anything for `Option<String>`.
    
    An example:
    ```rust
    fn duplicate<T>(t: Option<T>) -> (Option<T>, Option<T>) {
        (t, t)
    }
    ```
    New error (current compiler doesn't provide `help`:):
    ```text
    error[E0382]: use of moved value: `t`
     --> t.rs:2:9
      |
    1 | fn duplicate<T>(t: Option<T>) -> (Option<T>, Option<T>) {
      |                 - move occurs because `t` has type `Option<T>`, which does not implement the `Copy` trait
    2 |     (t, t)
      |      -  ^ value used here after move
      |      |
      |      value moved here
      |
    help: consider restricting type parameter `T`
      |
    1 | fn duplicate<T: Copy>(t: Option<T>) -> (Option<T>, Option<T>) {
      |               ++++++
    ```
    
    Fixes rust-lang#93623
    r? ``@estebank``
    ``@rustbot`` label +A-diagnostics +A-suggestion-diagnostics +C-enhancement
    
    ----
    
    I'm not at all sure if this is the right implementation for this kind of suggestion, but it seems to work :')
    Dylan-DPC authored Mar 2, 2022
    Configuration menu
    Copy the full SHA
    dcadcef View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#94433 - Urgau:check-cfg-allowness, r=petroc…

    …henkov
    
    Improve allowness of the unexpected_cfgs lint
    
    This pull-request improve the allowness (`#[allow(...)]`) of the `unexpected_cfgs` lint.
    
    Before this PR only crate level `#![allow(unexpected_cfgs)]` worked, now with this PR it also work when put around `cfg!` or if it is in a upper level. Making it work ~for the attributes `cfg`, `cfg_attr`, ...~ for the same level is awkward as the current code is design to give "Some parent node that is close to this macro call" (cf. https://doc.rust-lang.org/nightly/nightly-rustc/rustc_expand/base/struct.ExpansionData.html) meaning that allow on the same line as an attribute won't work. I'm note even sure if this would be possible.
    
    Found while working on rust-lang#94298.
    r? ```@petrochenkov```
    Dylan-DPC authored Mar 2, 2022
    Configuration menu
    Copy the full SHA
    ae6076b View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#94499 - RandomInsano:patch-1, r=Dylan-DPC

    Documentation was missed when demoting Windows XP to no_std only
    
    After a quick discussion on rust-lang#81250 which removed special casing for mutexes added [here](rust-lang@10b103a) to support Windows XP, we can't say that the standard library can build for it.
    
    This change modifies the tier 3 non-ARM targets to show the standard library will no longer build for these and there is no work being done to change that.
    Dylan-DPC authored Mar 2, 2022
    Configuration menu
    Copy the full SHA
    a9687eb View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#94512 - RalfJung:sdiv-ub, r=oli-obk

    Miri/CTFE: properly treat overflow in (signed) division/rem as UB
    
    To my surprise, it looks like LLVM treats overflow of signed div/rem as UB. From what I can tell, MIR `Div`/`Rem` directly lowers to the corresponding LLVM operation, so to make that correct we also have to consider these overflows UB in the CTFE/Miri interpreter engine.
    
    r? `@oli-obk`
    Dylan-DPC authored Mar 2, 2022
    Configuration menu
    Copy the full SHA
    74c5efb View commit details
    Browse the repository at this point in the history