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

Merged
merged 20 commits into from
Jul 19, 2023
Merged

Rollup of 7 pull requests #113865

merged 20 commits into from
Jul 19, 2023

Commits on Jul 13, 2023

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

Commits on Jul 17, 2023

  1. Simplify foreign_modules.

    cjgillot committed Jul 17, 2023
    Configuration menu
    Copy the full SHA
    51e1f7a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fdc93f3 View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2023

  1. Configuration menu
    Copy the full SHA
    6fb4ce9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c845a53 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    afec6d2 View commit details
    Browse the repository at this point in the history
  4. Add the no-builtins attribute to functions when no_builtins is ap…

    …plied at the crate level.
    
    When `no_builtins` is applied at the crate level, we should add the
    `no-builtins` attribute to each function to ensure it takes effect in LTO.
    DianQK committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    cc08749 View commit details
    Browse the repository at this point in the history
  5. Bless ui tests.

    cjgillot committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    09743b9 View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2023

  1. Configuration menu
    Copy the full SHA
    7197979 View commit details
    Browse the repository at this point in the history
  2. Fix quotes in output

    compiler-errors committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    fe4d1f9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a872762 View commit details
    Browse the repository at this point in the history
  4. Fix unit tests

    compiler-errors committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    e021191 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    846cc63 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#113444 - lcnr:alias-bound-test, r=compiler-…

    …errors
    
    add tests for alias bound preference
    
    cc rust-lang/trait-system-refactor-initiative#45
    
    r? ``@compiler-errors``
    Dylan-DPC authored Jul 19, 2023
    Configuration menu
    Copy the full SHA
    c2257b9 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#113716 - DianQK:add-no_builtins-to-function…

    …, r=pnkfelix
    
    Add the `no-builtins` attribute to functions when `no_builtins` is applied at the crate level.
    
    **When `no_builtins` is applied at the crate level, we should add the `no-builtins` attribute to each function to ensure it takes effect in LTO.**
    
    This is also the reason why no_builtins does not take effect in LTO as mentioned in rust-lang#35540.
    
    Now, `#![no_builtins]` should be similar to `-fno-builtin` in clang/gcc, see https://clang.godbolt.org/z/z4j6Wsod5.
    
    Next, we should make `#![no_builtins]` participate in LTO again. That makes sense, as LTO also takes into consideration function-level instruction optimizations, such as the MachineOutliner. More importantly, when a user writes a large `#![no_builtins]` crate, they would like this crate to participate in LTO as well.
    
    We should also add a function-level no_builtins attribute to allow users to have more control over it. This is similar to Clang's `__attribute__((no_builtin))` feature, see https://clang.godbolt.org/z/Wod6KK6eq. Before implementing this feature, maybe we should discuss whether to support more fine-grained control, such as `__attribute__((no_builtin("memcpy")))`.
    
    Related discussions:
    - rust-lang#109821
    - rust-lang#35540
    
    Next (a separate pull request?):
    - [ ] Revert rust-lang#35637
    - [ ] Add a function-level `no_builtin` attribute?
    Dylan-DPC authored Jul 19, 2023
    Configuration menu
    Copy the full SHA
    c1d6d32 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#113754 - cjgillot:simplify-foreign, r=petro…

    …chenkov
    
    Simplify native_libs query
    
    Drive-by cleanup I saw while implementing rust-lang#113734
    Dylan-DPC authored Jul 19, 2023
    Configuration menu
    Copy the full SHA
    dbb6b1a View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#113765 - compiler-errors:at-least, r=oli-obk

    Make it clearer that edition functions are `>=`, not `==`
    
    r? `@Nilstrieb`
    
    We could also perhaps derive `Ord` on `Edition` and use comparison operators.
    Dylan-DPC authored Jul 19, 2023
    Configuration menu
    Copy the full SHA
    a47b7b0 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#113774 - compiler-errors:fill-expr-bracket,…

    … r=eholk
    
    Improve error message when closing bracket interpreted as formatting fill character
    
    Fixes rust-lang#112732 by explaining why it's erroring in the way it is.
    Dylan-DPC authored Jul 19, 2023
    Configuration menu
    Copy the full SHA
    444ac1a View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#113785 - GuillaumeGomez:tests/rustdoc/issue…

    …-105735-fix, r=notriddle,aDotInTheVoid
    
    Fix invalid display of inlined re-export when both local and foreign items are inlined
    
    Fixes rust-lang#105735.
    
    The bug is actually quite interesting: at the `clean` pass, local inlined items have their `use` item removed, however foreign items don't have their `use` item removed because it's in the `clean` pass that we handle them. So when a `use` inlines both a local and a foreign item, it will work as expected for the foreign one, but not for the local as its `use` should not be around anymore.
    
    To prevent this, I created a new `inlined_foreigns` field into the `Module` struct to allow to remove the `use` item early on for foreign items as well. Then we iterate it in the `clean` pass directly.
    
    r? ``@notriddle``
    Dylan-DPC authored Jul 19, 2023
    Configuration menu
    Copy the full SHA
    c7c8914 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#113803 - compiler-errors:const-interp-block…

    …, r=fee1-dead
    
    Fix inline_const with interpolated block
    
    Interpolation already worked when we had a `const $block` that wasn't a statement expr:
    
    ```
    fn foo() {
      let _ = const $block;
    }
    ```
    
    But it was failing when the const block was in statement expr position:
    
    ```
    fn foo() {
      const $block;
    }
    ```
    
    ... because of a bug in a check for const items. This fixes that.
    
    ---
    
    cc rust-lang#112953 (comment), though I don't think this requires an FCP since it's already supported in exprs and seems to me to be fully a parser bug.
    Dylan-DPC authored Jul 19, 2023
    Configuration menu
    Copy the full SHA
    6c3cbcd View commit details
    Browse the repository at this point in the history