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 9 pull requests #122607

Merged
merged 18 commits into from Mar 17, 2024
Merged

Rollup of 9 pull requests #122607

merged 18 commits into from Mar 17, 2024

Commits on Feb 24, 2024

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

Commits on Mar 6, 2024

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

Commits on Mar 10, 2024

  1. fix long-linker-command-lines failure caused by rust.rpath=false

    Signed-off-by: onur-ozkan <work@onurozkan.dev>
    onur-ozkan committed Mar 10, 2024
    Configuration menu
    Copy the full SHA
    f25809d View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2024

  1. Configuration menu
    Copy the full SHA
    a37fe00 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    873a0f2 View commit details
    Browse the repository at this point in the history
  3. core: optimize ptr::replace

    joboet committed Mar 16, 2024
    Configuration menu
    Copy the full SHA
    f272133 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b2ed9d0 View commit details
    Browse the repository at this point in the history
  5. Mention @jieyouxu for changes to compiletest, run-make tests and the …

    …run-make-support library
    jieyouxu committed Mar 16, 2024
    Configuration menu
    Copy the full SHA
    fc42f3b View commit details
    Browse the repository at this point in the history
  6. rustc-metadata: Store crate name in self-profile of metadata_register…

    …_crate
    
    When profiling a build of Zed, I found myself in need of names of crates that take the longest to register in downstream crates.
    osiewicz committed Mar 16, 2024
    Configuration menu
    Copy the full SHA
    ad84934 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#117918 - daxpedda:wasm-c-abi-warning, r=wor…

    …kingjubilee
    
    Add `wasm_c_abi` `future-incompat` lint
    
    This is a warning that will tell users to update to `wasm-bindgen` v0.2.88, which supports spec-compliant C ABI.
    
    The idea is to prepare for a future where Rust will switch to the spec-compliant C ABI by default; so not to break everyone's world, this warning is introduced.
    
    Addresses rust-lang#71871.
    fmease committed Mar 16, 2024
    Configuration menu
    Copy the full SHA
    c00c5fe View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#121545 - gvozdvmozgu:fix-attribute-validati…

    …on-associated-items, r=fmease
    
    fix attribute validation on associated items in traits
    
    rust-lang#121537, fixed attribute validation on associated items in traits
    fmease committed Mar 16, 2024
    Configuration menu
    Copy the full SHA
    79c1e58 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#121720 - tmandry:split-refining, r=compiler…

    …-errors
    
    Split refining_impl_trait lint into _reachable, _internal variants
    
    As discussed in rust-lang#119535 (comment):
    
    > We discussed this today in triage and developed a consensus to:
    >
    > * Add a separate lint against impls that refine a return type defined with RPITIT even when the trait is not crate public.
    > * Place that in a lint group along with the analogous crate public lint.
    > * Create an issue to solicit feedback on these lints (or perhaps two separate ones).
    > * Have the warnings displayed with each lint reference this issue in a similar manner to how we do that today with the required `Self: '0'` bound on GATs.
    > * Make a note to review this feedback on 2-3 release cycles.
    
    This points users to rust-lang#121718 to leave feedback.
    fmease committed Mar 16, 2024
    Configuration menu
    Copy the full SHA
    0995508 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#122270 - onur-ozkan:fix-rmake-test-with-rpa…

    …th-false, r=Mark-Simulacrum
    
    fix `long-linker-command-lines` failure caused by `rust.rpath=false`
    
    Fixes `long-linker-command-lines` test failure (which happens when `rust.rpath` is set to `false`) by adjusting `LD_LIBRARY_PATH`.
    
    Fixes rust-lang#90921
    fmease committed Mar 16, 2024
    Configuration menu
    Copy the full SHA
    c2b7d77 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#122564 - Bryanskiy:delegation-fixes, r=comp…

    …iler-errors
    
    Delegation: fix ICE on duplicated associative items
    
    Currently, functions delegation is only supported for delegation items with early resolved paths e.g. free functions and trait methods. During name resolution, information about function signatures is collected, including the number of parameters and whether there are self arguments. This information is then used when lowering from a delegation item into a regular function(`rustc_ast_lowering/src/delegation.rs`). The signature is usually inherited from path resolution id(`path_id`). However, in the case of trait impls `path_id` and `item_id` may be different:
    
    ```rust
    trait Trait {
        fn foo(&self) -> u32 { 0 }
    }
    
    struct S;
    
    mod to_reuse {
        use crate::S;
    
        pub fn foo(_: &S) -> u32 { 0 }
    }
    
    impl Trait for S {
        reuse to_reuse::foo { self }
        //~^ The signature should be inherited from item id instead of resolution id
    }
    
    ```
    
    Let's now consider an example from [issue](rust-lang#119920). Due to duplicated associative elements partial resolution for one of them will not be recorded:
    
    https://github.com/rust-lang/rust/blob/9023f908cfbe7a475f369717a61cb8eb865cfd25/compiler/rustc_resolve/src/late.rs#L3153-L3162
    
    Which leads to an incorrect `is_in_trait_impl`
    
    https://github.com/rust-lang/rust/blob/9023f908cfbe7a475f369717a61cb8eb865cfd25/compiler/rustc_ast_lowering/src/item.rs#L981-L986
    
    Which leads to an incorrect id for signature inheritance
    
    https://github.com/rust-lang/rust/blob/9023f908cfbe7a475f369717a61cb8eb865cfd25/compiler/rustc_ast_lowering/src/delegation.rs#L99-L105
    
    Which lead to an ICE from original issue.
    
    This patch fixes wrong `is_in_trait_impl`  calculation.
    
    fixes rust-lang#119920
    fmease committed Mar 16, 2024
    Configuration menu
    Copy the full SHA
    7b7a7fc View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#122577 - fmease:speculative-say-what, r=com…

    …piler-errors
    
    Remove obsolete parameter `speculative` from `instantiate_poly_trait_ref`
    
    In rust-lang#122527 I totally missed that `speculative` has become obsolete with the removal of `hir_trait_to_predicates` / due to rust-lang#113671.
    
    Fixes rust-lang#114635.
    
    r? `@compiler-errors`
    fmease committed Mar 16, 2024
    Configuration menu
    Copy the full SHA
    4cbfa15 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#122601 - joboet:ptr_replace, r=workingjubilee

    Optimize `ptr::replace`
    
    rust-lang#83022 optimized `mem::replace` to reduce the number of `memcpy`s. `ptr::replace`, which is [documented to behave just like `mem::replace`](https://doc.rust-lang.org/nightly/std/ptr/fn.replace.html), was not optimized however, leading to [worse code](https://godbolt.org/z/T3hdEEdfe) and missed optimizations. This PR simply forwards `ptr::replace` to `mem::replace` to take advantage of the better implementation.
    fmease committed Mar 16, 2024
    Configuration menu
    Copy the full SHA
    de0c2a4 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#122604 - jieyouxu:triagebot-mention-compile…

    …test-run-make, r=Nilstrieb
    
    Mention jieyouxu for changes to compiletest, run-make tests and the run-make-support library
    fmease committed Mar 16, 2024
    Configuration menu
    Copy the full SHA
    53515f3 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#122605 - osiewicz:metadata-register-crate-s…

    …tore-crate-name-in-profile, r=Nadrieril
    
    rustc-metadata: Store crate name in self-profile of metadata_register_crate
    
    When profiling a build of Zed, I found myself in need of names of crates that take the longest to register in downstream crates.
    fmease committed Mar 16, 2024
    Configuration menu
    Copy the full SHA
    caa6131 View commit details
    Browse the repository at this point in the history