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 6 pull requests #120170

Merged
merged 16 commits into from
Jan 20, 2024
Merged

Rollup of 6 pull requests #120170

merged 16 commits into from
Jan 20, 2024

Commits on Jan 15, 2024

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

Commits on Jan 17, 2024

  1. Remove box <expr> recovery

    clubby789 committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    b9ebeee View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3f7c784 View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2024

  1. Apply suggestions from code review

    Co-authored-by: fee1-dead <ent3rm4n@gmail.com>
    smoelius and fee1-dead committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    96b8eb7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b28a953 View commit details
    Browse the repository at this point in the history
  3. remove alignment-changing in-place collect

    Currently stable users can't benefit from this because GlobaAlloc doesn't support
    alignment-changing realloc and neither do most posix allocators.
    So in practice it always results in an extra memcpy.
    the8472 committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    85d1787 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2024

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

Commits on Jan 20, 2024

  1. Fix impl stripped in rustdoc HTML whereas it should not be in case th…

    …e impl is implemented on a type alias
    GuillaumeGomez committed Jan 20, 2024
    Configuration menu
    Copy the full SHA
    6237beb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0933f48 View commit details
    Browse the repository at this point in the history
  3. Spelling fix

    "It's" expands to "it is". "Its" is the possessive form.
    sunrosa committed Jan 20, 2024
    Configuration menu
    Copy the full SHA
    0e96840 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#119997 - GuillaumeGomez:fix-stripped-impl-o…

    …n-ty-alias, r=notriddle
    
    Fix impl stripped in rustdoc HTML whereas it should not be in case the impl is implemented on a type alias
    
    Fixes rust-lang#119015.
    
    I talked about it a bit with ```@petrochenkov.``` They might change what `EffectiveVisibilities` return for impl items like this one and make them not only reachable but also re-exported, which would fix this case. It could also potentially break other things, so it'll be done whenever they can and then we can check together.
    
    Surprisingly, this fix is making rustdoc even closer to rustc in term of errors (the CI currently fails because currently accepted broken codes aren't working anymore with this change). Not sure exactly why though. This is linked to rust-lang#110631 from what I could find.
    
    So either I'm missing something here, or we consider it's ok and we consider the failing tests as "should fail" and I'll update `rustdoc-ui` ones.
    
    r? ```@notriddle```
    GuillaumeGomez committed Jan 20, 2024
    Configuration menu
    Copy the full SHA
    1236fa2 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#120000 - smoelius:fix-clippy, r=fee1-dead

    Ensure `callee_id`s are body owners
    
    This PR makes the `callee_id` argument of Clippy's `implements_trait_with_env` optional, and when it is passed, ensures it is a body owner.
    
    rust-lang#118661 added the `callee_id` parameter to alleviate an ICE. Specifically, the `callee_id` is used to determine an "effect arg" in certain situations.
    
    Frankly, I [do not completely understand](rust-lang#118661 (comment)) what an "effect arg" is. But the code that determines it seems to require that `callee_id` is a body owner:
    - https://github.com/rust-lang/rust/blob/1ead4761e9e2f056385768614c23ffa7acb6a19e/src/tools/clippy/clippy_utils/src/ty.rs#L286-L288
    - https://github.com/rust-lang/rust/blob/1ead4761e9e2f056385768614c23ffa7acb6a19e/compiler/rustc_middle/src/ty/util.rs#L834
    - https://github.com/rust-lang/rust/blob/1ead4761e9e2f056385768614c23ffa7acb6a19e/compiler/rustc_middle/src/hir/map/mod.rs#L372
    
    In the current head, some def ids passed as `callee_id`s are not body owners. This PR fixes that.
    
    cc ``@rust-lang/clippy``
    
    r? ``@fee1-dead``
    GuillaumeGomez committed Jan 20, 2024
    Configuration menu
    Copy the full SHA
    71cef76 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#120063 - clubby789:remove-box-handling, r=N…

    …ilstrieb
    
    Remove special handling of `box` expressions from parser
    
    rust-lang#108471 added a temporary hack to parse `box expr`. It's been almost a year since then, so I think it's safe to remove the special handling.
    
    As a drive-by cleanup, move `parser/removed-syntax*` tests to their own directory.
    GuillaumeGomez committed Jan 20, 2024
    Configuration menu
    Copy the full SHA
    8f5f967 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#120116 - the8472:only-same-alignments, r=cu…

    …viper
    
    Remove alignment-changing in-place collect
    
    This removes the alignment-changing in-place collect optimization introduced in rust-lang#110353
    Currently stable users can't benefit from the optimization because GlobaAlloc doesn't support alignment-changing realloc and neither do most posix allocators. So in practice it has a negative impact on performance.
    
    Explanation from rust-lang#120091 (comment):
    
    > > You mention that in case of alignment mismatch -- when the new alignment is less than the old -- the implementation calls `mremap`.
    >
    > I was trying to note that this isn't really the case in practice, due to the semantics of Rust's allocator APIs. The only use of the allocator within the `in_place_collect` implementation itself is [a call to `Allocator::shrink()`](https://github.com/rust-lang/rust/blob/db7125f008cfd72e8951c9a863178956e2cbacc3/library/alloc/src/vec/in_place_collect.rs#L299-L303), which per its documentation [allows decreasing the required alignment](https://doc.rust-lang.org/1.75.0/core/alloc/trait.Allocator.html). However, in stable Rust, the only available `Allocator` is [`Global`](https://doc.rust-lang.org/1.75.0/alloc/alloc/struct.Global.html), which delegates to the registered `GlobalAlloc`. Since `GlobalAlloc::realloc()` [cannot change the required alignment](https://doc.rust-lang.org/1.75.0/core/alloc/trait.GlobalAlloc.html#method.realloc), the implementation of [`<Global as Allocator>::shrink()`](https://github.com/rust-lang/rust/blob/db7125f008cfd72e8951c9a863178956e2cbacc3/library/alloc/src/alloc.rs#L280-L321) must fall back to creating a brand-new allocation, `memcpy`ing the data into it, and freeing the old allocation, whenever the alignment doesn't remain exactly the same.
    >
    > Therefore, the underlying allocator, provided by libc or some other source, has no opportunity to internally `mremap()` the data when the alignment is changed, since it has no way of knowing that the allocation is the same.
    GuillaumeGomez committed Jan 20, 2024
    Configuration menu
    Copy the full SHA
    b917753 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#120138 - trevyn:detect-submodules-limit, r=…

    …albertlarsan68
    
    Increase vscode settings.json `git.detectSubmodulesLimit`
    
    The default vscode git integration throws a warning on the rust repository because it has more than the default limit of 10 submodules. This adds an increase to 20 to the settings.json that x.py offers to install on setup.
    
    <img width="461" alt="Screen Shot 2024-01-19 at 11 47 47 PM" src="https://github.com/rust-lang/rust/assets/230691/440dfa4e-32e3-41f7-b8c6-5a07ade7aa14">
    
    Also reported at https://stackoverflow.com/questions/60917209/disable-vs-code-warning-submodules-which-wont-be-opened-automatically
    GuillaumeGomez committed Jan 20, 2024
    Configuration menu
    Copy the full SHA
    dfd62cc View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#120169 - sunrosa:patch-1, r=ChrisDenton

    Spelling fix
    
    "It's" expands to "it is". "It is use..." doesn't make sense.
    
    "Its" is the possessive form, and the intended form here.
    GuillaumeGomez committed Jan 20, 2024
    Configuration menu
    Copy the full SHA
    774cd3a View commit details
    Browse the repository at this point in the history