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 7 pull requests #108888

Closed
wants to merge 19 commits into from

Commits on Mar 4, 2023

  1. Delete old re-exports from rustc_smir

    This approach didn't seem to work well.
    celinval committed Mar 4, 2023
    Configuration menu
    Copy the full SHA
    40185db View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    118afdf View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2023

  1. Configuration menu
    Copy the full SHA
    ef807cb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a2040de View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2c9b8c5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c6065eb View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    33e8820 View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2023

  1. Create new rustc_smir struct to map future crates

    + Add some information to the README.md
    celinval committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    b66db7e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5eaeb71 View commit details
    Browse the repository at this point in the history

Commits on Mar 8, 2023

  1. Configuration menu
    Copy the full SHA
    8a99ffc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    08e5a77 View commit details
    Browse the repository at this point in the history
  3. Tweak E0740

    compiler-errors committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    64eea3c View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#106085 - fee1-dead-contrib:tidy-ci-matchers…

    …, r=pietroalbini
    
    use problem matchers for tidy CI
    matthiaskrgr authored Mar 8, 2023
    Configuration menu
    Copy the full SHA
    62c95fd View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#108017 - chbaker0:fix-105967, r=chbaker0

    Add `--no-undefined-version` link flag and fix associated breakage
    
    LLVM upstream sets `--no-undefined-version` by default in lld: https://reviews.llvm.org/D135402.
    
    Due to a bug in how version scripts are generated, this breaks the `dylib` output type for most crates. See rust-lang#105967 (comment) for details.
    
    This PR adds the flag to gcc flavor linkers in anticipation of this LLVM change rolling in, and patches `rustc` to not attempt to export `__rust_*` allocator symbols when they weren't generated.
    
    Fixes rust-lang#105967
    matthiaskrgr authored Mar 8, 2023
    Configuration menu
    Copy the full SHA
    754f44d View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#108148 - parthopdas:master, r=oli-obk

    rust-lang#107307 Implementing "<test_binary> --list --format json" for use by IDE test explorers / runners
    
    PR 1 of 2 - wiring up just the new information + implement the command line changes i.e. --format json + tests
    
    upcoming:
    PR 2 of 2 - clean up "#[cfg(not(bootstrap))]" from PR 1
    
    As per the discussions on
    - MCP: https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Implementing.20.22.3Ctest_binary.3E.20--list.20--form.E2.80.A6.20compiler-team.23592/near/328747548
    - preRFC: https://internals.rust-lang.org/t/pre-rfc-implementing-test-binary-list-format-json-for-use-by-ide-test-explorers-runners/18308
    - FYI on Discord: https://discord.com/channels/442252698964721669/459149169546887178/1075581549409484820
    matthiaskrgr authored Mar 8, 2023
    Configuration menu
    Copy the full SHA
    7bf7ee8 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#108754 - compiler-errors:retry, r=oli-obk

    Retry `pred_known_to_hold_modulo_regions` with fulfillment if ambiguous
    
    Fixes rust-lang#108721
    
    The problem here is that when we're checking `is_sized_raw` during codegen on some type that has a lot of opaques in it, something emits several nested obligations that are individually ambiguous, but when processed together in a loop then apply modulo regions. Since the `evaluate_predicates_recursively` inner loop doesn't process predicates until they stop changing, we return `EvaluatedToAmbig`, which makes the sized check return false incorrectly. See:
    
    https://github.com/rust-lang/rust/blob/f15f0ea73972786e426732c5b92ba9a904b866c4/compiler/rustc_trait_selection/src/traits/select/mod.rs#L596-L606
    
    ... Compared to the analogous loop in the new solver:
    
    https://github.com/rust-lang/rust/blob/f15f0ea73972786e426732c5b92ba9a904b866c4/compiler/rustc_trait_selection/src/solve/mod.rs#L481-L512
    
    To fix this, if we get ambiguous during `pred_known_to_hold_modulo_regions`, just retry the obligation in a fulfillment context.
    
    --
    
    Unfortunately... I don't have a test for this. I've only tested this locally. Pending minimization :/
    
    r? types
    matthiaskrgr authored Mar 8, 2023
    Configuration menu
    Copy the full SHA
    a38589f View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#108846 - celinval:smir-poc, r=oli-obk

    StableMIR: Proof-of-concept implementation + test
    
    This PR is part of the [project Stable MIR](https://github.com/rust-lang/project-stable-mir). The PR deletes old re-exports from rustc_smir and introduces a proof-of-concept implementation for APIs to retrieve crate information.
    
    The implementation follows the [design described here](https://hackmd.io/XhnYHKKuR6-LChhobvlT-g?view), but instead of using separate crates for the implementation, it uses separate modules inside `rustc_smir`.
    
    The API introduced at this point should be seen just as an example on how we are planning to structure the communication between tools and the compiler.
    
    I have not explored yet what should be the right granularity, the best starting point for users, neither the best way to implement it.
    
    r? ``@oli-obk``
    matthiaskrgr authored Mar 8, 2023
    Configuration menu
    Copy the full SHA
    693d05b View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#108882 - compiler-errors:E0740, r=eholk

    Tweak E0740
    
    Also drive-by suppress E0740 if it's an unresolved type.
    matthiaskrgr authored Mar 8, 2023
    Configuration menu
    Copy the full SHA
    45affd5 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#108883 - compiler-errors:post-norm-copy-err…

    …, r=BoxyUwU
    
    Suppress copy impl error when post-normalized type references errors
    
    Suppress spurious errors from the `Copy` impl validity check when fields have bad types *post*-normalization, instead of just pre-normalization.
    
    ----
    
    The const-generics test regressed recently due to rust-lang#107965, cc `@BoxyUwU.`
     * I think it's because `[_; 0u32]: Copy` now fails to hold because a nested obligation `ConstArgHasType(0u32, usize)` fails.
     * It's interesting that `[const_error]` shows up in the type only after normalization, though, but I'm pretty sure that it's due to the evaluate call that happens when normalizing unevaluated consts.
    matthiaskrgr authored Mar 8, 2023
    Configuration menu
    Copy the full SHA
    f102978 View commit details
    Browse the repository at this point in the history