-
Notifications
You must be signed in to change notification settings - Fork 13k
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 #135533
Closed
Closed
Rollup of 6 pull requests #135533
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It's never overridden, so it shouldn't be on the trait.
The two implementations were identical, so there's no need to use a trait method.
The new code is more explicit and avoids trait magic that added needless complexity to this part of rustdoc.
This reverts commit 0747f28.
Thereby, we also allow accessing thread::current before main: as the runtime no longer tries to install its own handle, this will no longer trigger an abort. Rather, the name returned from name will only be "main" after the runtime initialization code has run, but I think that is acceptable. This new approach also requires some changes to the signal handling code, as calling `thread::current` would now allocate when called on the main thread, which is not acceptable. I fixed this by adding a new function (`with_current_name`) that performs all the naming logic without allocation or without initializing the thread ID (which could allocate on some platforms).
Originally authored by GnomedDev
constants and statics are nullary functions, and struct fields are unary functions.
…ge when the unstable module name is used
Signed-off-by: onur-ozkan <[email protected]>
…-func, r=notriddle Treat other items as functions for the purpose of type-based search specifically, constants and statics are nullary functions, and struct fields are unary functions. fixes rust-lang#130204 r? `@notriddle`
std: lazily allocate the main thread handle rust-lang#123550 eliminated the allocation of the main thread handle, but at the cost of greatly increased complexity. This PR proposes another approach: Instead of creating the main thread handle itself, the runtime simply remembers the thread ID of the main thread. The main thread handle is then only allocated when it is used, using the same lazy-initialization mechanism as for non-runtime use of `thread::current`, and the `name` method uses the thread ID to identify the main thread handle and return the correct name ("main") for it. Thereby, we also allow accessing `thread::current` before main: as the runtime no longer tries to install its own handle, this will no longer trigger an abort. Rather, the name returned from `name` will only be "main" after the runtime initialization code has run, but I think that is acceptable. This new approach also requires some changes to the signal handling code, as calling `thread::current` would now allocate when called on the main thread, which is not acceptable. I fixed this by adding a new function (`with_current_name`) that performs all the naming logic without allocation or without initializing the thread ID (which could allocate on some platforms). Reverts rust-lang#123550, CC `@GnomedDev`
…-unstable, r=davidtwco deprecate `std::intrinsics::transmute` etc, use `std::mem::*` instead The `rustc_allowed_through_unstable_modules` attribute lets users call `std::mem::transmute` as `std::intrinsics::transmute`. The former is a reexport of the latter, and for a long time we didn't properly check stability for reexports, so making this a hard error now would be a breaking change for little gain. But at the same time, `std::intrinsics::transmute` is not the intended path for this function, so I think it is a good idea to show a deprecation warning when that path is used. This PR implements that, for all the functions in `std::intrinsics` that carry the attribute. I assume this will need `@rust-lang/libs-api` FCP.
…omez rustdoc: Remove `AttributesExt` trait magic that added needless complexity The new code is more explicit and avoids trait magic that added needless complexity to this part of rustdoc.
…leteness, r=lcnr Prefer lower `TraitUpcasting` candidates in selection Fixes rust-lang#135463. The underlying cause is this ambiguity, but it's more clear (and manifests as a coercion error, rather than a MIR validation error) when it's written the way I did in the UI test. Sorry this is cursed r? lcnr
remove outdated FIXME rust-lang#134967 already fixed this.
rustbot
added
O-unix
Operating system: Unix-like
O-windows
Operating system: Windows
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
WG-trait-system-refactor
The Rustc Trait System Refactor Initiative (-Znext-solver)
rollup
A PR which is a rollup
labels
Jan 15, 2025
@bors r+ p=6 rollup=never |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Jan 15, 2025
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 15, 2025
…llaumeGomez Rollup of 6 pull requests Successful merges: - rust-lang#131806 (Treat other items as functions for the purpose of type-based search) - rust-lang#132654 (std: lazily allocate the main thread handle) - rust-lang#135003 (deprecate `std::intrinsics::transmute` etc, use `std::mem::*` instead) - rust-lang#135428 (rustdoc: Remove `AttributesExt` trait magic that added needless complexity) - rust-lang#135498 (Prefer lower `TraitUpcasting` candidates in selection) - rust-lang#135529 (remove outdated FIXME) r? `@ghost` `@rustbot` modify labels: rollup
The job Click to see the possible cause of the failure (guessed by this bot)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
O-unix
Operating system: Unix-like
O-windows
Operating system: Windows
rollup
A PR which is a rollup
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
WG-trait-system-refactor
The Rustc Trait System Refactor Initiative (-Znext-solver)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
std::intrinsics::transmute
etc, usestd::mem::*
instead #135003 (deprecatestd::intrinsics::transmute
etc, usestd::mem::*
instead)AttributesExt
trait magic that added needless complexity #135428 (rustdoc: RemoveAttributesExt
trait magic that added needless complexity)TraitUpcasting
candidates in selection #135498 (Prefer lowerTraitUpcasting
candidates in selection)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup