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

Merged
merged 17 commits into from
Dec 20, 2023
Merged

Rollup of 7 pull requests #119156

merged 17 commits into from
Dec 20, 2023

Commits on Dec 18, 2023

  1. track the source of nested goals

    lcnr committed Dec 18, 2023
    Configuration menu
    Copy the full SHA
    ca718ff View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4a38442 View commit details
    Browse the repository at this point in the history
  3. Add function ABI and type layout to StableMIR

    This change introduces a new module to StableMIR named `abi` with
    information from `rustc_target::abi` and `rustc_abi`, that allow users
    to retrieve more low level information required to perform
    bit-precise analysis.
    
    The layout of a type can be retrieved via `Ty::layout`, and the instance
    ABI can be retrieved via `Instance::fn_abi()`.
    
    To properly handle errors while retrieve layout information, we had
    to implement a few layout related traits.
    celinval committed Dec 18, 2023
    Configuration menu
    Copy the full SHA
    1a83c5b View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2023

  1. Configuration menu
    Copy the full SHA
    df5b604 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    90893e4 View commit details
    Browse the repository at this point in the history
  3. effects: fix comment

    fmease committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    ffdc6c7 View commit details
    Browse the repository at this point in the history
  4. add comment

    lcnr committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    17705ea View commit details
    Browse the repository at this point in the history
  5. Fix c_variadic flag and add opaque info to PassMode

    We should expand the information in PassMode later.
    celinval committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    76b3e6d View commit details
    Browse the repository at this point in the history
  6. rustc_codegen_ssa: Don't let IncorrectCguReuseType errors get lost

    In [100753], `IncorrectCguReuseType` accidentally stopped being emitted.
    Begin emitting it again rather than just blindly dropping it, and adjust
    tests accordingly.
    
    [100753]: rust-lang@706452e#diff-048389738ddcbe0f9765291a29db1fed9a5f03693d4781cfb5aaa97ffb3c7f84
    Enselic committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    d46df80 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    2c96025 View commit details
    Browse the repository at this point in the history

Commits on Dec 20, 2023

  1. Rollup merge of rust-lang#118691 - chfogelman:improve-cstr-error, r=f…

    …mease
    
    Add check for possible CStr literals in pre-2021
    
    Fixes [rust-lang#118654](rust-lang#118654)
    
    Adds information to errors caused by possible CStr literals in pre-2021.
    
    The lexer separates `c"str"` into two tokens if the edition is less than 2021, which later causes an error when parsing. This error now has a more helpful message that directs them to information about editions. However, the user might also have written `c "str"` in a later edition, so to not confuse people who _are_ using a recent edition, I also added a note about whitespace.
    
    We could probably figure out exactly which scenario has been encountered by examining spans and editions, but I figured it would be better not to overcomplicate the creation of the error too much.
    
    This is my first code PR and I tried to follow existing conventions as much as possible, but I probably missed something, so let me know!
    matthiaskrgr committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    f3f9b30 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#118973 - Enselic:fix-IncorrectCguReuseType,…

    … r=michaelwoerister
    
    rustc_codegen_ssa: Don't drop `IncorrectCguReuseType` , make `rustc_expected_cgu_reuse` attr work
    
    In [100753], `IncorrectCguReuseType` accidentally stopped being emitted by removing `diag.span_err(...)`. Begin emitting it again rather than just blindly dropping it, and adjust tests accordingly.
    
    We assume that there are no bugs and that the currently actual CGU reuse is correct. If there are bugs, they will be discovered and fixed eventually, and the tests will then be updated.
    
    [100753]: rust-lang@706452e#diff-048389738ddcbe0f9765291a29db1fed9a5f03693d4781cfb5aaa97ffb3c7f84
    
    Closes rust-lang#118972
    matthiaskrgr committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    df4d563 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#119071 - lcnr:overflowo, r=compiler-errors

    -Znext-solver: adapt overflow rules to avoid breakage
    
    Do not erase overflow constraints if they are from equating the impl header when normalizing[^1].
    
    This should be the minimal change to not break crates depending on the old project behavior of "apply impl constraints while only lazily evaluating any nested goals".
    
    Fixes rust-lang/trait-system-refactor-initiative#70, see https://hackmd.io/ATf4hN0NRY-w2LIVgeFsVg for the reasoning behind this.
    
    Only keeping constraints on overflow for `normalize-to` goals as that's the only thing needed for backcompat. It also allows us to not track the origin of root obligations. The issue with root goals would be something like the following:
    
    ```rust
    trait Foo {}
    trait Bar {}
    
    trait FooBar {}
    impl<T: Foo + Bar> FooBar for T {}
    
    // These two should behave the same, rn we can drop constraints for both,
    // but if we don't drop `Misc` goals we would only drop the constraints for
    // `FooBar` unless we track origins of root obligations.
    fn func1<T: Foo + Bar>() {}
    fn func2<T: FooBaz>() {}
    ```
    
    [^1]: mostly, the actual rules are slightly different
    
    r? ``@compiler-errors``
    matthiaskrgr committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    16a231d View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#119089 - fmease:dont-ice-on-tilde-const-non…

    …-const-trait, r=fee1-dead
    
    effects: fix a comment
    
    r? fee1-dead or compiler
    matthiaskrgr committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    f9c752d View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#119094 - celinval:smir-layout, r=compiler-e…

    …rrors
    
    Add function ABI and type layout to StableMIR
    
    This change introduces a new module to StableMIR named `abi` with information from `rustc_target::abi` and `rustc_abi`, that allow users to retrieve more low level information required to perform bit-precise analysis.
    
    The layout of a type can be retrieved via `Ty::layout`, and the instance ABI can be retrieved via `Instance::fn_abi()`.
    
    To properly handle errors while retrieve layout information, we had to implement a few layout related traits.
    
    r? ```@compiler-errors```
    matthiaskrgr committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    8b3914c View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#119102 - chrisnc:arm-none-eabi-docs, r=wesl…

    …eywiser
    
    Add arm-none-eabi and armv7r-none-eabi platform-support documentation.
    
    Mostly collecting existing information that's common to all arm-none-eabi targets and putting it in one file and adding a new file with specific details about armv7r.
    matthiaskrgr committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    9058791 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#119107 - lcnr:uwuwu, r=compiler-errors

    subtype_predicate: remove unnecessary probe
    
    There is no reason to probe here. The failure either results in an actual type error, in which cases the probe is useless, or it is used inside of evaluate, in which case we're already inside of the `fn evaluation_probe`, so it is also not necessary.
    matthiaskrgr committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    d6656af View commit details
    Browse the repository at this point in the history