-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 12 pull requests #132308
Closed
Closed
Rollup of 12 pull requests #132308
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
Depend on rustc_abi in compiler crates that use it indirectly but have not yet taken on that dependency, and are not entangled in my other PRs. This leaves an "excise rustc_target" step after the dust settles.
Updated for changes in the package server workflow.
This reduces the need of the compiler to peek on the fields of LayoutS.
…jgillot Lower AST node id only once Fixes rust-lang#96346. I basically followed the given instructions except the inline part. `lower_jump_destination` can't reuse local existing `HirId` due to unknown name resolution result so I created an additional mapping for labels. r? `````@cjgillot`````
…it, r=dtolnay Add a new trait `proc_macro::ToTokens` Tracking issue rust-lang#130977 This PR adds a new trait `ToTokens`, implemented for types that can be interpolated inside a `quote!` invocation. ```rust impl ToTokens for TokenTree impl ToTokens for TokenStream impl ToTokens for Literal impl ToTokens for Ident impl ToTokens for Punct impl ToTokens for Group impl<T: ToTokens + ?Sized> ToTokens for &T impl<T: ToTokens + ?Sized> ToTokens for &mut T impl<T: ToTokens + ?Sized> ToTokens for Box<T> impl<T: ToTokens + ?Sized> ToTokens for Rc<T> impl<T: ToTokens + ToOwned + ?Sized> ToTokens for Cow<'_, T> impl<T: ToTokens> ToTokens for Option<T> impl ToTokens for u{8,16,32,64,128} impl ToTokens for i{8,16,32,64,128} impl ToTokens for f{32,64} impl ToTokens for {u,i}size impl ToTokens for bool impl ToTokens for char impl ToTokens for str impl ToTokens for String impl ToTokens for CStr impl ToTokens for CString ``` ~This PR also implements the migration mentioned in the tracking issue, replacing `Extend<Token{Tree,Stream}>` with `Extend<T: ToTokens>`, and replacing `FromIterator<Token{Tree,Stream}>` with `FromIterator<T: ToTokens>`.~ **UPDATE**: Reverted. ```diff -impl FromIterator<TokenTree> for TokenStream -impl FromIterator<TokenStream> for TokenStream +impl<T: ToTokens> FromIterator<T> for TokenStream -impl Extend<TokenTree> for TokenStream -impl Extend<TokenStream> for TokenStream +impl<T: ToTokens> Extend<T> for TokenStream ``` I'm going to leave some comments in the review where I'm unsure and concerned. r? ````@dtolnay```` CC ````@tgross35````
…rescope, r=traviscross,lcnr Stabilize if_let_rescope Close rust-lang#131154 Tracked by rust-lang#124085
…=spastorino Collect item bounds for RPITITs from trait where clauses just like associated types We collect item bounds from trait where clauses for *associated types*, i.e. this: ```rust trait Foo where Self::Assoc: Send { type Assoc; } ``` Becomes this: ```rust trait Foo { type Assoc: Send; } ``` Today, with RPITITs/AFIT and return-type notation, we don't do that, i.e.: ```rust trait Foo where Self::method(..): Send { fn method() -> impl Sized; } fn is_send(_: impl Send) {} fn test<T: Foo>() { is_send(T::method()); } ``` ...which fails on nightly today. Turns out it's super easy to fix this, and we just need to use the `associated_type_bounds` lowering function in `explicit_item_bounds_with_filter`, which has that logic baked in.
…ir, r=celinval stable_mir: Directly use types from rustc_abi In most cases, rustc_target is not necessary, so use rustc_abi instead of its reexports.
…mpiler-errors compiler: Add rustc_abi dependence to the compiler Depend on rustc_abi in compiler crates that use it indirectly but have not yet taken on that dependency, and are not *significantly* entangled in my other PRs. This leaves an "excise rustc_target" step after the dust settles.
…piler-errors Add `LayoutData::is_uninhabited` and use it Use accessors for the things that accessors are good at: reducing everyone's need to be nosy and peek at the internals of every data structure.
…s-margins, r=notriddle [rustdoc] Unify variant struct fields margins with struct fields As discussed in rust-lang#132220. | before | after | |-|-| | ![image](https://github.com/user-attachments/assets/d8d8336d-7fe4-45fb-a5a5-36a4023223f5) | ![Screenshot from 2024-10-28 11-17-24](https://github.com/user-attachments/assets/9d0d9633-b857-45b4-9217-7d0d1aa8f770) | r? `````@notriddle`````
…r-errors cg_llvm: Use a type-safe helper to cast `&str` and `&[u8]` to `*const c_char` In `rustc_codegen_llvm` there are many uses of `.as_ptr().cast()` to convert a string or byte-slice to `*const c_char`, which then gets passed through FFI. This works, but is fragile, because there's nothing constraining the pointer cast to actually be from `u8` to `c_char`. If the original value changes to something else that has an `as_ptr` method, or the context changes to expect something other than `c_char`, the cast will silently do the wrong thing. By making the cast more explicit via a helper method, we can be sure that it will either perform the intended cast, or fail at compile time.
…none, r=compiler-errors refactor: cleaner check to return None It's very nit change. Refactor to shorten verbose check when returning None for `backend_feature_name`.
Updating Fuchsia platform-support documentation Updated for changes in the package server workflow. r? `````@tmandry````` `````@erickt`````
…1, r=onur-ozkan fixed wast version was released, remove randomization exemption
rustbot
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Oct 29, 2024
rustbot
added
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-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
rollup
A PR which is a rollup
labels
Oct 29, 2024
@bors r+ p=12 |
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
Oct 29, 2024
@bors rollup=never |
@bors r- |
bors
added
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Oct 29, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
rollup
A PR which is a rollup
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
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-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
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:
proc_macro::ToTokens
#131441 (Add a new traitproc_macro::ToTokens
)LayoutData::is_uninhabited
and use it #132255 (AddLayoutData::is_uninhabited
and use it)&str
and&[u8]
to*const c_char
#132260 (cg_llvm: Use a type-safe helper to cast&str
and&[u8]
to*const c_char
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup