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

Merged
merged 10 commits into from
Jul 11, 2023
Merged

Rollup of 4 pull requests #113577

merged 10 commits into from
Jul 11, 2023

Commits on Jul 7, 2023

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

Commits on Jul 9, 2023

  1. Support explicit 32-bit MIPS ABI for the synthetic object

    PR rust-lang#95604 introduced a "synthetic object file to ensure all exported and
    used symbols participate in the linking". One constraint on this file is
    that for MIPS-based targets, its architecture-specific ELF flags must be
    the same as all other object files passed to the linker. That's enforced
    by LLD, here:
    https://github.com/llvm/llvm-project/blob/llvmorg-16.0.6/lld/ELF/Arch/MipsArchTree.cpp#L77
    
    The current approach to determining e_flags for 32-bit was implemented
    in PR rust-lang#96930, which links to this issue that summarizes the problem well:
    ayrtonm/psx-sdk-rs#9
    
    > ... the temporary object file is created with an e_flags which is
    > invalid for 32-bit MIPS targets. The main issue is that it omits the ABI
    > bits (EF_MIPS_ABI_O32) which implies it uses the N64 ABI.
    
    To enable the N32 MIPS ABI (which succeeded O32), this patch enables
    setting the synthetic object's ABI based on the target "llvm-abiname"
    field, if it's given; otherwise, the O32 ABI is assumed for 32-bit MIPS
    targets.
    
    More information about the N32 ABI can be found here:
    https://web.archive.org/web/20160121005457/http://techpubs.sgi.com/library/manuals/2000/007-2816-005/pdf/007-2816-005.pdf
    xSetech committed Jul 9, 2023
    Configuration menu
    Copy the full SHA
    329e099 View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2023

  1. Fix standalone build

    Add extern declarations and optional dependencies to fix build done
    directly via `cargo build`.
    celinval committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    44d0fce View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6975632 View commit details
    Browse the repository at this point in the history
  3. Implement a few more rvalue translation to smir

     - Introduce an Opaque type for adding information that is still
       internal to the compiler.
    celinval committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    b9f378b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b809207 View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2023

  1. Rollup merge of rust-lang#112717 - celinval:stable-mir-rvalue-1, r=ol…

    …i-obk
    
    Implement a few more rvalue translation to smir
    
    Add the implementation for a few more RValue variants. For now, I simplified the stable version of `RValue::Ref` by removing the notion of Region.
    
    r? `@oli-obk`
    matthiaskrgr committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    3f73a7d View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#113310 - jieyouxu:dont-suggest-impl-trait-i…

    …n-paths, r=lcnr
    
    Don't suggest `impl Trait` in path position
    
    Fixes rust-lang#113264.
    matthiaskrgr committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    c6df564 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#113497 - xSetech:mips_32_abi, r=davidtwco

    Support explicit 32-bit MIPS ABI for the synthetic object
    
    PR rust-lang#95604 introduced a "synthetic object file to ensure all exported and used symbols participate in the linking". One constraint on this file is that for MIPS-based targets, its architecture-specific ELF flags must be the same as all other object files passed to the linker. That's enforced by LLD, here:
    https://github.com/llvm/llvm-project/blob/llvmorg-16.0.6/lld/ELF/Arch/MipsArchTree.cpp#L77
    
    The current approach to determining e_flags for 32-bit was implemented in PR rust-lang#96930, which links to this issue that summarizes the problem well: ayrtonm/psx-sdk-rs#9
    
    > ... the temporary object file is created with an e_flags which is
    > invalid for 32-bit MIPS targets. The main issue is that it omits the ABI
    > bits (EF_MIPS_ABI_O32) which implies it uses the N64 ABI.
    
    To enable the N32 MIPS ABI (which succeeded O32), this patch enables setting the synthetic object's ABI based on the target "llvm-abiname" field, if it's given; otherwise, the O32 ABI is assumed for 32-bit MIPS targets.
    
    More information about the N32 ABI can be found here: https://web.archive.org/web/20160121005457/http://techpubs.sgi.com/library/manuals/2000/007-2816-005/pdf/007-2816-005.pdf
    matthiaskrgr committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    685ba08 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#113560 - fmease:assoc-tys-in-traits-depr-wc…

    …-loc, r=compiler-errors
    
    Lint against misplaced where-clauses on associated types in traits
    
    Extends the scope of the lint `deprecated_where_clause_location` (rust-lang#89122) from associated types in impls to associated types in any location (impl or trait). This is only relevant for `#![feature(associated_type_defaults)]`. Previously we didn't warn on the following code for example:
    
    ```rs
    #![feature(associated_type_defaults)]
    trait Trait { type Assoc where u32: Copy = (); }
    ```
    
    Personally I would've preferred to emit a *hard* error here instead of a lint warning since the feature is unstable but unfortunately we are constrained by back compat as associated type defaults won't necessarily trigger the feature-gate error if they are inside of a macro call (since they use a post-expansion feature-gate due to historical reasons, see also rust-lang#66004).
    
    I've renamed and moved related preexisting tests: 1. They test AST validation passes not the parser & thus shouldn't live in `parser/` (historical reasons?). 2. One test file was named after type aliases even though it tests assoc tys.
    
    `@rustbot` label A-lint
    matthiaskrgr committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    4f5ef52 View commit details
    Browse the repository at this point in the history