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 10 pull requests #108904

Closed
wants to merge 25 commits into from

Commits on Jan 27, 2023

  1. Relax ordering rules for asm! operands

    The `asm!` and `global_asm!` macros require their operands to appear
    strictly in the following order:
    - Template strings
    - Positional operands
    - Named operands
    - Explicit register operands
    - `clobber_abi`
    - `options`
    
    This is overly strict and can be inconvienent when building complex
    `asm!` statements with macros. This PR relaxes the ordering requirements
    as follows:
    - Template strings must still come before all other operands.
    - Positional operands must still come before named and explicit register
    operands.
    - Named and explicit register operands can be freely mixed.
    - `options` and `clobber_abi` can appear in any position.
    Amanieu committed Jan 27, 2023
    Configuration menu
    Copy the full SHA
    52f7a21 View commit details
    Browse the repository at this point in the history

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

Commits on Mar 6, 2023

  1. Configuration menu
    Copy the full SHA
    2c9b8c5 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
    8d13454 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3bfcfd0 View commit details
    Browse the repository at this point in the history
  4. Simplify sort_by calls

    WaffleLapkin committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    775bacd View commit details
    Browse the repository at this point in the history
  5. 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. may not => cannot

    compiler-errors committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    a439c02 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0f4255e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8a99ffc View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    08e5a77 View commit details
    Browse the repository at this point in the history
  5. 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
  6. Rename MapInPlace as FlatMapInPlace.

    After removing the `map_in_place` method, which isn't much use because
    modifying every element in a collection such as a `Vec` can be done
    trivially with iteration.
    nnethercote committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    be60bcb View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    204ba32 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#105798 - Amanieu:relax-asm, r=joshtriplett

    Relax ordering rules for `asm!` operands
    
    The `asm!` and `global_asm!` macros require their operands to appear strictly in the following order:
    - Template strings
    - Positional operands
    - Named operands
    - Explicit register operands
    - `clobber_abi`
    - `options`
    
    This is overly strict and can be inconvienent when building complex `asm!` statements with macros. This PR relaxes the ordering requirements as follows:
    - Template strings must still come before all other operands.
    - Positional operands must still come before named and explicit register operands.
    - Named and explicit register operands can be freely mixed.
    - `options` and `clobber_abi` can appear in any position after the template strings.
    
    r? `@joshtriplett`
    GuillaumeGomez authored Mar 8, 2023
    Configuration menu
    Copy the full SHA
    20a8119 View commit details
    Browse the repository at this point in the history
  9. 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
    GuillaumeGomez authored Mar 8, 2023
    Configuration menu
    Copy the full SHA
    d810534 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#108839 - compiler-errors:canonicalize-the-r…

    …oot-var, r=lcnr
    
    Canonicalize root var when making response from new solver
    
    During trait solving, if we equate two inference variables `?0` and `?1` but don't equate them with any rigid types, then `InferCtxt::probe_ty_var` will return `Err` for both of these. The canonicalizer code will then canonicalize the variables independently(!), and the response will not reflect the fact that these two variables have been made equal.
    
    This hinders inference and I also don't think it's sound? I haven't thought too much about it past that, so let's talk about it.
    
    r? `@lcnr`
    GuillaumeGomez authored Mar 8, 2023
    Configuration menu
    Copy the full SHA
    ae46eba View commit details
    Browse the repository at this point in the history
  11. 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`````
    GuillaumeGomez authored Mar 8, 2023
    Configuration menu
    Copy the full SHA
    e4844a5 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#108873 - WaffleLapkin:cmp, r=cjgillot

    Simplify `sort_by` calls
    
    small cleanup
    GuillaumeGomez authored Mar 8, 2023
    Configuration menu
    Copy the full SHA
    292f553 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#108882 - compiler-errors:E0740, r=eholk

    Tweak E0740
    
    Also drive-by suppress E0740 if it's an unresolved type.
    GuillaumeGomez authored Mar 8, 2023
    Configuration menu
    Copy the full SHA
    780c2c1 View commit details
    Browse the repository at this point in the history
  14. 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.
    GuillaumeGomez authored Mar 8, 2023
    Configuration menu
    Copy the full SHA
    5b7b922 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#108884 - compiler-errors:tweak-illegal-copy…

    …-impl-message, r=WaffleLapkin
    
    Tweak illegal `Copy` impl message
    
    The phrase "may not" can both mean "is not able to" and "possibly does not". Disambiguate this by just using "cannot".
    `@Lokathor` expressed being annoyed by this [here](https://twitter.com/Lokathor/status/1633200313544089602?s=20).
    
    Also drive-by fix for this extremely noisy message: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=6a37275bc810f7846bfe191845b7d11d.
    
    r? diagnostics
    GuillaumeGomez authored Mar 8, 2023
    Configuration menu
    Copy the full SHA
    62d18cb View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#108887 - nnethercote:rename-MapInPlace, r=lqd

    Rename `MapInPlace` as `FlatMapInPlace`.
    
    After removing the `map_in_place` method, which isn't much use because modifying every element in a collection such as a `Vec` can be done trivially with iteration.
    
    r? `@lqd`
    GuillaumeGomez authored Mar 8, 2023
    Configuration menu
    Copy the full SHA
    ec7485c View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#108901 - LYF1999:yf/108897, r=lcnr

    fix: evaluate with wrong obligation stack
    
    fix rust-lang#108897
    r? `@lcnr`
    GuillaumeGomez authored Mar 8, 2023
    Configuration menu
    Copy the full SHA
    4b60218 View commit details
    Browse the repository at this point in the history