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 4 pull requests #90325

Closed
wants to merge 15 commits into from

Commits on Oct 22, 2021

  1. Add beginner friendly lifetime elision hint to E0623

    Suggest adding a new lifetime parameter when two elided lifetimes should match up but don't
    
    Issue rust-lang#90170
    Noratrieb committed Oct 22, 2021
    Configuration menu
    Copy the full SHA
    e792ee0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a8ebdbe View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2021

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

Commits on Oct 25, 2021

  1. Improve lifetime elision hint error

    This also changes the tests introduced by the previous commits because of another rustc issue (rust-lang#90258)
    Noratrieb committed Oct 25, 2021
    Configuration menu
    Copy the full SHA
    2f4d780 View commit details
    Browse the repository at this point in the history
  2. Fix documentation header sizes

    And add a rustdoc-gui test confirming various header sizes.
    jsha committed Oct 25, 2021
    Configuration menu
    Copy the full SHA
    89276ff View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2021

  1. rustdoc: use ttf based font for cjk glyphs

    Shinwoo Park committed Oct 26, 2021
    Configuration menu
    Copy the full SHA
    9e00501 View commit details
    Browse the repository at this point in the history
  2. Fix some typos

    JohnTitor committed Oct 26, 2021
    Configuration menu
    Copy the full SHA
    f5cbb9b View commit details
    Browse the repository at this point in the history
  3. Remove unnecessary check for registers

    `is_clobber()` already checks if `reg` is a register and the both
    values should be the same.
    JohnTitor committed Oct 26, 2021
    Configuration menu
    Copy the full SHA
    630df7c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bd309e4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    12647ea View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    76ec1aa View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#89937 - JohnTitor:fix-89875, r=Amanieu

    Properly check `target_features` not to trigger an assertion
    
    Fixes rust-lang#89875
    I think it should be a condition instead of an assertion to check if it's a register as it's possible that `reg` is a register class.
    Also, this isn't related to the issue directly, but `is_target_supported` doesn't check `target_features` attributes. Is there any way to check it on rustc_codegen_llvm?
    
    r? `@Amanieu`
    matthiaskrgr committed Oct 26, 2021
    Configuration menu
    Copy the full SHA
    6db3e8e View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#90179 - Nilstrieb:lifetime-elision-mismatch…

    …-hint, r=estebank
    
    Add beginner friendly lifetime elision hint to E0623
    
    Address rust-lang#90170
    
    Suggest adding a new lifetime parameter when two elided lifetimes should match up but don't.
    
    Example:
    
    ```
    error[E0623]: lifetime mismatch
      --> $DIR/issue-90170-elision-mismatch.rs:2:35
       |
    LL | fn foo(slice_a: &mut [u8], slice_b: &mut [u8]) {
       |                 ---------           --------- these two types are declared with different lifetimes...
    LL |     core::mem::swap(&mut slice_a, &mut slice_b);
       |                                   ^^^^^^^^^^^^ ...but data from `slice_b` flows into `slice_a` here
       |
       = note: Each elided lifetime in input position becomes a distinct lifetime.
    help: Explicitly declare a lifetime and assign it to both
       |
    LL | fn foo<'a>(slice_a: &'a mut [u8], slice_b: &'a mut [u8]) {
       |       ++++           ++                     ++
    
    ```
    
    for
    
    ```rust
    fn foo(slice_a: &mut [u8], slice_b: &mut [u8]) {
        core::mem::swap(&mut slice_a, &mut slice_b);
    }
    ```
    matthiaskrgr committed Oct 26, 2021
    Configuration menu
    Copy the full SHA
    8f599ab View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#90186 - jsha:fix-header-sizes, r=GuillaumeG…

    …omez
    
    Fix documentation header sizes
    
    And add a rustdoc-gui test confirming various header sizes.
    
    Split off from rust-lang#90156. This fixes a regression in rust-lang#89506 where the heading level of titles within Markdown was too high (h2) for docblocks under structs, unions, and enum impls.
    
    r? `@camelid`
    
    Demo: https://jacob.hoffman-andrews.com/rust/fix-header-sizes/std/string/struct.String.html#impl-Add%3C%26%27_%20str%3E
    Stable: https://doc.rust-lang.org/stable/std/string/struct.String.html#impl-Add%3C%26%27_%20str%3E
    Beta: https://doc.rust-lang.org/beta/std/string/struct.String.html#impl-Add%3C%26%27_%20str%3E
    matthiaskrgr committed Oct 26, 2021
    Configuration menu
    Copy the full SHA
    90b3a84 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#90232 - konan8205:master, r=GuillaumeGomez

    rustdoc: Use TTF based font instead of OTF for CJK glyphs to improve readability
    
    Due to Windows' implementation of font rendering, OpenType fonts can be distorted. So the existing font, Noto Sans KR, is not very readable on Windows. This PR improves readability of Korean glyphs on Windows.
    
    ## Before
    ![원1](https://user-images.githubusercontent.com/11029378/138592394-16b15787-532d-4421-a5eb-ed85675290fa.png)
    
    ## After
    ![원2](https://user-images.githubusercontent.com/11029378/138592409-f3a440ee-f0fc-40e4-9561-42c479439c9f.png)
    
    The fonts included in this PR are licensed under the SIL Open Font License and generated with these commands:
    
    ```sh
    pyftsubset NanumBarunGothic.ttf \
    --unicodes=U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF \
    --output-file=NanumBarunGothic.ttf.woff --flavor=woff
    ```
    ```sh
    pyftsubset NanumBarunGothic.ttf \
    --unicodes=U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF \
    --output-file=NanumBarunGothic.ttf.woff2 --flavor=woff2
    ```
    
    r? `@GuillaumeGomez`
    matthiaskrgr committed Oct 26, 2021
    Configuration menu
    Copy the full SHA
    5367f0b View commit details
    Browse the repository at this point in the history