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 6 pull requests #115672

Merged
merged 15 commits into from
Sep 8, 2023
Merged

Rollup of 6 pull requests #115672

merged 15 commits into from
Sep 8, 2023

Commits on Mar 13, 2023

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

Commits on Aug 25, 2023

  1. rustdoc: list matching impls on type aliases

    Remake of "List matching impls on type aliases"
    * 4b1d13d
    * 6f552c8
    * 2ce7cd9
    
    Partially reverts "Fix infinite loop when retrieving impls for
    type alias", but keeps the test case.
    
    This version of the PR avoids the infinite loop by structurally
    matching types instead of using full unification. This version
    does not support type alias trait bounds, but the compiler does
    not enforce those anyway
    (rust-lang#21903).
    notriddle committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    19edb3c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    20768b2 View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2023

  1. Add note about lazy_type_alias

    Co-authored-by: León Orell Valerian Liehr <me@fmease.dev>
    notriddle and fmease committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    b3686c2 View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2023

  1. Configuration menu
    Copy the full SHA
    14e59bb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bb6dcf5 View commit details
    Browse the repository at this point in the history
  3. Using parsed codegen flags

    ldm0 committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    487766c View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2023

  1. Configuration menu
    Copy the full SHA
    967410c View commit details
    Browse the repository at this point in the history
  2. Fix Issue 112009

    modify fuction clond() -> cloned()
    
    optimize the code
    
    Handle the problem that the pathset is empty and modify the judgment of the builder::tests::test_exclude_kind
    
    Delete unnecessary judegment conditions
    
    skip test for library/std duo to OOM in benches as library/alloc
    
    Add FIXME for WASM32
    LuuuXXX committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    45abd8c View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#104299 - mkrasnitski:discriminant-transmute…

    …-docs, r=oli-obk
    
    Clarify stability guarantee for lifetimes in enum discriminants
    
    Since `std::mem::Discriminant` erases lifetimes, it should be clarified that changing the concrete value of a lifetime parameter does not change the value of an enum discriminant for a given variant. This is useful as it guarantees that it is safe to transmute `Discriminant<Foo<'a>>` to `Discriminant<Foo<'b>>` for any combination of `'a` and `'b`. This also holds for type-generics as long as the type parameters do not change, e.g. `Discriminant<Foo<T, 'a>>` can be transmuted to `Discriminant<Foo<T, 'b>>`.
    
    Side note: Is what I've written actually enough to imply soundness (or rather codify it), or should it specifically be spelled out that it's OK to transmute in the above way?
    GuillaumeGomez authored Sep 8, 2023
    Configuration menu
    Copy the full SHA
    2cceedd View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#115088 - LuuuXXX:issue-112009, r=albertlars…

    …an68
    
    Fix Step Skipping Caused by Using the `--exclude` Option
    
    The original code was overreacting to the `--exclude` option,
    https://github.com/rust-lang/rust/blob/eadf69a6c6edfe220fc5b1b659e46e271d75a3a1/src/bootstrap/builder.rs#L257-L260
    For example:
    When `x test --exclude alloc` or `x test --exclude library/alloc` is passed, the entire libraray test is skipped.
    
    Related issues:
    rust-lang#112009
    GuillaumeGomez authored Sep 8, 2023
    Configuration menu
    Copy the full SHA
    dcb4659 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#115201 - notriddle:notriddle/type-alias-imp…

    …l-list, r=GuillaumeGomez
    
    rustdoc: list matching impls on type aliases
    
    Fixes rust-lang#32077
    
    Fixes rust-lang#99952
    
    Remake of rust-lang#112429
    
    Partially reverts rust-lang#112543, but keeps the test case.
    
    This version of the PR avoids the infinite loop by structurally matching types instead of using full unification. This version does not support type alias trait bounds, but the compiler does not enforce those anyway (rust-lang#21903).
    
    r? `@GuillaumeGomez`
    
    CC `@lcnr`
    GuillaumeGomez authored Sep 8, 2023
    Configuration menu
    Copy the full SHA
    1fb672c View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#115633 - compiler-errors:PRIVATE_BOUNDS-lin…

    …t-node, r=petrochenkov
    
    Lint node for `PRIVATE_BOUNDS`/`PRIVATE_INTERFACES` is the item which names the private type
    
    The HIR that the `PRIVATE_BOUNDS` lint should be attached to is the item that has the *bounds*, not the private type. This PR also aligns this behavior with the `EXPORTED_PRIVATE_DEPENDENCIES` lint, which also requires putting the `allow` on the item that names the private type.
    
    Fixes rust-lang#115475
    
    r? petrochenkov
    GuillaumeGomez authored Sep 8, 2023
    Configuration menu
    Copy the full SHA
    e3b6122 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#115638 - ldm0:ldm/llvm-args-fix, r=nikic

    `-Cllvm-args` usability improvement
    
    fixes: rust-lang#26338
    fixes: rust-lang#115564
    
    Two problems were found during playing with `-Cllvm-args`
    
    1. When `llvm.link-shared` is set to `false` in `config.toml`, output of `rustc -C llvm-args='--help-list-hidden'` doesn't contain `--emit-dwarf-unwind` and `--emulated-tls`. When it is set to `true`, `rustc -C llvm-args='--help-list-hidden'` emits `--emit-dwarf-unwind`, but `--emulated-tls` is still missing.
    2. Setting `-Cllvm-args=--emit-dwarf-unwind=always` doesn't take any effect, but `-Cllvm-args=-machine-outliner-reruns=3` does work.
    
    ### 1
    
    Adding `RegisterCodeGenFlags` to register codegen flags fixed the first problem. `rustc -C llvm-args='--help-list-hidden'` emits full codegen flags including `--emit-dwarf-unwind` and `--emulated-tls`.
    
    ### 2
    
    Constructing `TargetOptions` from `InitTargetOptionsFromCodeGenFlags` in `LLVMRustCreateTargetMachine` fixed the second problem. The `LLVMRustSetLLVMOptions` calls `ParseCommandLineOptions` which parses given `llvm-args`. For options like `machine-outliner-reruns`, it just works, since the codegen logic directly consumes the parsing result:
    
    [machine-outliner-reruns register](https://github.com/rust-lang/llvm-project/blob/0537f6354cffe546cbf47f6dc9c7f82e49e86cfb/llvm/lib/CodeGen/MachineOutliner.cpp#L114)
    [machine-outliner-reruns consumption](https://github.com/rust-lang/llvm-project/blob/0537f6354cffe546cbf47f6dc9c7f82e49e86cfb/llvm/lib/CodeGen/MachineOutliner.cpp#L1138)
    
    But for flags defined in `TargetOptions` and `MCTargetOptions` to take effect, constructing them with `InitTargetOptionsFromCodeGenFlags` is essential, or the parsing result is just not consumed. Similar patterns can be observed in [lli](https://github.com/rust-lang/llvm-project/blob/0537f6354cffe546cbf47f6dc9c7f82e49e86cfb/llvm/tools/llc/llc.cpp#L494), [llc](https://github.com/rust-lang/llvm-project/blob/0537f6354cffe546cbf47f6dc9c7f82e49e86cfb/llvm/tools/lli/lli.cpp#L517), etc.
    GuillaumeGomez authored Sep 8, 2023
    Configuration menu
    Copy the full SHA
    575c363 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#115643 - bvanjoi:fix-115203, r=RalfJung,oli…

    …-obk
    
    fix: return early when has tainted in mir-lint
    
    Fixes rust-lang#115203
    
    `a[..]` is of indeterminate size, it had been reported error during borrow check, therefore we skip the mir lint process.
    GuillaumeGomez authored Sep 8, 2023
    Configuration menu
    Copy the full SHA
    60327bb View commit details
    Browse the repository at this point in the history