-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 #126815
Closed
Closed
Rollup of 6 pull requests #126815
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
…hecked_raw in allocation.rs; add pub fn get_alloc_bytes_unchecked_raw[_mut] in memory.rs
We are still at Python 3.8 in Fuchsia infra. This was introduced at Python 3.10.
This trait allows cloning DSTs, but is unsafe to implement and use because it writes to possibly-uninitialized memory which must be of the correct size, and must initialize that memory. It is only implemented for `T: Clone` and `[T] where T: Clone`, but additional implementations could be provided for specific `dyn Trait` or custom-DST types.
This requires introducing a new internal type `RcUninit` (and `ArcUninit`), which can own an `RcBox<T>` without requiring it to be initialized, sized, or a slice. This is similar to `UniqueRc`, but `UniqueRc` doesn't support the allocator parameter, and there is no `UniqueArc`.
Generalize `{Rc,Arc}::make_mut()` to unsized types. * `{Rc,Arc}::make_mut()` now accept any type implementing the new unstable trait `core::clone::CloneToUninit`. * `CloneToUninit` is implemented for `T: Clone` and for `[T] where T: Clone`. * `CloneToUninit` is a generalization of the existing internal trait `alloc::alloc::WriteCloneIntoRaw`. * New feature gate: `clone_to_uninit` This allows performing `make_mut()` on `Rc<[T]>` and `Arc<[T]>`, which was not previously possible. --- Previous PR description, now obsolete: > Add `{Rc, Arc}::make_mut_slice()` > > These functions behave identically to `make_mut()`, but operate on `Arc<[T]>` instead of `Arc<T>`. > > This allows performing the operation on slices, which was not previously possible because `make_mut()` requires `T: Clone` (and slices, being `!Sized`, do not and currently cannot implement `Clone`). > > Feature gate: `make_mut_slice`
Add method to get `FnAbi` of function pointer Provide a StableMIR API to query `FnAbi` of a function pointer. Fixes [rust-lang/project-stable-mir#63](rust-lang/project-stable-mir#63)
Add direct accessors for memory addresses in `Machine` (for Miri) The purpose of this PR is to enable direct (immutable) access to memory addresses in `Machine`, which will be needed for further extension of Miri. This is done by adding (/completing missings pairs of) accessor functions, with the relevant signatures as follows: ```rust /* rust/compiler/rustc_middle/src/mir/interpret/allocation.rs */ pub trait AllocBytes { // .. fn as_ptr(&self) -> *const u8; /*fn as_mut_ptr(&mut self) -> *mut u8; -- Already in the compiler*/ } impl<Prov: Provenance, Extra, Bytes: AllocBytes> Allocation<Prov, Extra, Bytes> { // .. pub fn get_bytes_unchecked_raw(&self) -> *const u8; /*pub fn get_bytes_unchecked_raw_mut(&mut self) -> *mut u8; -- Already in the compiler*/ } ``` ```rust /* rust/compiler/rustc_const_eval/src/interpret/memory.rs */ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { // .. pub fn get_alloc_bytes_unchecked_raw(&self, id: AllocId) -> InterpResult<'tcx, *const u8>; pub fn get_alloc_bytes_unchecked_raw_mut(&mut self, id: AllocId) -> InterpResult<'tcx, *mut u8>; } ``` r? `@RalfJung`
[fuchsia-test-runner] Remove usage of kw_only We are still at Python 3.8 in Fuchsia infra. This was introduced at Python 3.10. r? tmandry r? erickt
Remove stray `.` from error message
Add a tidy rule to check that fluent messages and attrs don't end in `.` This adds a new dependency on `fluent-parse` to `tidy` -- we already rely on it in rustc so I feel like it's not that big of a deal. This PR also adjusts many error messages that currently end in `.`; not all of them since I added an `ALLOWLIST`, excluded `rustc_codegen_*` ftl files, and `.teach_note` attributes. r? `@estebank` `@oli-obk`
rustbot
added
A-testsuite
Area: The testsuite used to check the correctness of rustc
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-infra
Relevant to the infrastructure 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.
rollup
A PR which is a rollup
labels
Jun 22, 2024
@bors r+ rollup=never p=6 |
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
Jun 22, 2024
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 22, 2024
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#116113 ( Generalize `{Rc,Arc}::make_mut()` to unsized types.) - rust-lang#126722 (Add method to get `FnAbi` of function pointer) - rust-lang#126787 (Add direct accessors for memory addresses in `Machine` (for Miri)) - rust-lang#126798 ([fuchsia-test-runner] Remove usage of kw_only) - rust-lang#126809 (Remove stray `.` from error message) - rust-lang#126811 (Add a tidy rule to check that fluent messages and attrs don't end in `.`) r? `@ghost` `@rustbot` modify labels: rollup
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
bors
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Jun 22, 2024
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-review
Status: Awaiting review from the assignee but also interested parties.
labels
Jun 22, 2024
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 22, 2024
Rollup of 6 pull requests Successful merges: - rust-lang#116113 ( Generalize `{Rc,Arc}::make_mut()` to unsized types.) - rust-lang#126722 (Add method to get `FnAbi` of function pointer) - rust-lang#126787 (Add direct accessors for memory addresses in `Machine` (for Miri)) - rust-lang#126798 ([fuchsia-test-runner] Remove usage of kw_only) - rust-lang#126809 (Remove stray `.` from error message) - rust-lang#126811 (Add a tidy rule to check that fluent messages and attrs don't end in `.`) r? `@ghost` `@rustbot` modify labels: rollup try-job: test-various
rerunning test-various to see if that failure repros. not sure why. there's nothing that screams "I'm going to fail on specifically wasm". |
wait, I think I know which... |
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
nice, does repro. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-testsuite
Area: The testsuite used to check the correctness of rustc
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-infra
Relevant to the infrastructure 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.
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:
{Rc,Arc}::make_mut()
to unsized types. #116113 ( Generalize{Rc,Arc}::make_mut()
to unsized types.)FnAbi
of function pointer #126722 (Add method to getFnAbi
of function pointer)Machine
(for Miri) #126787 (Add direct accessors for memory addresses inMachine
(for Miri)).
from error message #126809 (Remove stray.
from error message).
#126811 (Add a tidy rule to check that fluent messages and attrs don't end in.
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup
try-job: test-various