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 #126815

Closed
wants to merge 15 commits into from

Conversation

matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Jun 22, 2024

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

try-job: test-various

adwinwhite and others added 15 commits June 21, 2024 14:50
…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
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 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
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=6

@bors
Copy link
Contributor

bors commented Jun 22, 2024

📌 Commit 05be7e0 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors 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
@bors
Copy link
Contributor

bors commented Jun 22, 2024

⌛ Testing commit 05be7e0 with merge a9adb67...

@rust-log-analyzer
Copy link
Collaborator

The job test-various failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test asserting::capture_with_copyable_and_debuggable_elem_has_correct_params ... ok
Error: failed to run main module `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/wasm32-wasip1/release/deps/coretests-4ea5d5bdf34bb3c8.wasm`

Caused by:
    0: failed to invoke command default
    1: error while executing at wasm backtrace:
           0: 0x18dc1f - coretests-4ea5d5bdf34bb3c8.wasm!__rust_start_panic
           1: 0x18d74d - coretests-4ea5d5bdf34bb3c8.wasm!rust_panic
           2: 0x18d5b3 - coretests-4ea5d5bdf34bb3c8.wasm!std::panicking::rust_panic_with_hook::he61309187c5cab33
           3: 0x18c403 - coretests-4ea5d5bdf34bb3c8.wasm!std::panicking::begin_panic_handler::{{closure}test asserting::capture_with_non_copyable_and_non_debuggable_elem_has_correct_params ... ok
}::h9e52ce455a935947
           4: 0x18c342 - coretests-4ea5d5bdf34bb3c8.wasm!std::sys::backtrace::__rust_end_short_backtrace::h3e06d34102481aa8
           5: 0x18cf1b - coretests-4ea5d5bdf34bb3c8.wasm!rust_begin_unwind
           6: 0x194816 - coretests-4ea5d5bdf34bb3c8.wasm!core::panicking::panic_fmt::hb496ca6e15155407
           7: 0x236e - coretests-4ea5d5bdf34bb3c8.wasm!std::panicking::try::hb2756d3a443d9708
           8: 0xf91b - coretests-4ea5d5bdf34bb3c8.wasm!core::ops::function::FnOnce::call_once::h069822d3e9756be0
           9: 0x17e3f2 - coretests-4ea5d5bdf34bb3c8.wasm!test::__rust_begin_short_backtrace::h5c5fabeebcd2c285
          10: 0x17e21f - coretests-4ea5d5bdf34bb3c8.wasm!test::types::RunnableTest::run::h9a6a45f00e40af69
          11: 0x169826 - coretests-4ea5d5bdf34bb3c8.wasm!test::run_test::hd0394ddda9c2aac5
          12: 0x16205f - coretests-4ea5d5bdf34bb3c8.wasm!test::console::run_tests_console::h8b8dc9ad77d0f8d3
          13: 0x17e613 - coretests-4ea5d5bdf34bb3c8.wasm!test::test_main::h32495f02c4dea365
          14: 0x17f292 - coretests-4ea5d5bdf34bb3c8.wasm!test::test_main_static::hd746cab0c05b61e1
          15: 0x14a9a9 - coretests-4ea5d5bdf34bb3c8.wasm!coretests::main::h969085ba43c930dd
          16: 0x21b7 - coretests-4ea5d5bdf34bb3c8.wasm!std::sys::backtrace::__rust_begin_short_backtrace::h086363b189af0abb
          17: 0x21aa - coretests-4ea5d5bdf34bb3c8.wasm!std::rt::lang_start::{{closure}}::h8301d416546df1fa
          18: 0x186b77 - coretests-4ea5d5bdf34bb3c8.wasm!std::rt::lang_start_internal::h016b9f9dbe0824b8
          19: 0x14a9e1 - coretests-4ea5d5bdf34bb3c8.wasm!__main_void
          20: 0x1731 - coretests-4ea5d5bdf34bb3c8.wasm!_start
    2: wasm trap: wasm `unreachable` instruction executed
test asserting::capture_with_non_debuggable_elem_has_correct_params ... ok
test async_iter::into_async_iter ... ok
test atomic::atomic_access_bool ... ok
test atomic::atomic_alignment ... ok
---
test clone::test_clone_from ... ok
error: test failed, to rerun pass `-p core --test coretests`

Caused by:
  process didn't exit successfully: `/wasmtime-v19.0.0-x86_64-linux/wasmtime run -C cache=n --dir . --env RUSTC_BOOTSTRAP /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/wasm32-wasip1/release/deps/coretests-4ea5d5bdf34bb3c8.wasm -Z unstable-options --format json` (exit status: 134)
note: test exited abnormally; to see the full output pass --nocapture to the harness.
  local time: Sat Jun 22 03:34:00 UTC 2024
  network time: Sat, 22 Jun 2024 03:34:00 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

@bors
Copy link
Contributor

bors commented Jun 22, 2024

💔 Test failed - checks-actions

@bors 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
@workingjubilee
Copy link
Member

@bors r-
@bors try

@bors 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
Copy link
Contributor

bors commented Jun 22, 2024

⌛ Trying commit 05be7e0 with merge d8ec120...

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
@workingjubilee
Copy link
Member

workingjubilee commented Jun 22, 2024

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".

@workingjubilee
Copy link
Member

wait, I think I know which...

@rust-log-analyzer
Copy link
Collaborator

The job test-various failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
file:.git/config remote.origin.url=https://github.com/rust-lang-ci/rust
file:.git/config remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
file:.git/config gc.auto=0
file:.git/config http.https://github.com/.extraheader=AUTHORIZATION: basic ***
file:.git/config branch.try.remote=origin
file:.git/config branch.try.merge=refs/heads/try
file:.git/config submodule.library/backtrace.url=https://github.com/rust-lang/backtrace-rs.git
file:.git/config submodule.library/stdarch.active=true
file:.git/config submodule.library/stdarch.url=https://github.com/rust-lang/stdarch.git
file:.git/config submodule.src/doc/book.active=true
---
test clone::test_clone_from ... ok
Error: failed to run main module `/checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/wasm32-wasip1/release/deps/coretests-4ea5d5bdf34bb3c8.wasm`

Caused by:
    0: failed to invoke command default
    1: error while executing at wasm backtrace:
           0: 0x18dc2a - coretests-4ea5d5bdf34bb3c8.wasm!__rust_start_panic
           1: 0x18d758 - coretests-4ea5d5bdf34bb3c8.wasm!rust_panic
           2: 0x18d5be - coretests-4ea5d5bdf34bb3c8.wasm!std::panicking::rust_panic_with_hook::h1c7c458faceb34a4
           3: 0x18c40e - coretests-4ea5d5bdf34bb3c8.wasm!std::panicking::begin_panic_handler::{{closure}}::h4a8adbf203df712d
           4: 0x18c34d - coretests-4ea5d5bdf34bb3c8.wasm!std::sys::backtrace::__rust_end_short_backtrace::hae1674bc91becd95
           5: 0x18cf26 - coretests-4ea5d5bdf34bb3c8.wasm!rust_begin_unwind
           6: 0x194821 - coretests-4ea5d5bdf34bb3c8.wasm!core::panicking::panic_fmt::h2636f347668fe306
           7: 0x233a - coretests-4ea5d5bdf34bb3c8.wasm!std::panicking::try::h11b9fa0f318998fe
           8: 0xe16c9 - coretests-4ea5d5bdf34bb3c8.wasm!core::ops::function::FnOnce::call_once::hb216c2b28c38cf67
           9: 0x17e3fb - coretests-4ea5d5bdf34bb3c8.wasm!test::__rust_begin_short_backtrace::hec5cfe4fa8b84a4b
          10: 0x17e228 - coretests-4ea5d5bdf34bb3c8.wasm!test::types::RunnableTest::run::h7874272a23aa93da
          11: 0x16982f - coretests-4ea5d5bdf34bb3c8.wasm!test::run_test::h703489418a548402
          12: 0x162068 - coretests-4ea5d5bdf34bb3c8.wasm!test::console::run_tests_console::hd77fe73c4a06a075
          13: 0x17e61c - coretests-4ea5d5bdf34bb3c8.wasm!test::test_main::h8074214ea9eea9cb
          14: 0x17f29b - coretests-4ea5d5bdf34bb3c8.wasm!test::test_main_static::h76aac2b6b8e02b22
          15: 0x14a9b0 - coretests-4ea5d5bdf34bb3c8.wasm!coretests::main::hb937b539eceb57b3
          16: 0x21bd - coretests-4ea5d5bdf34bb3c8.wasm!std::sys::backtrace::__rust_begin_short_backtrace::h005becba1b701638
          17: 0x21b0 - coretests-4ea5d5bdf34bb3c8.wasm!std::rt::lang_start::{{closure}}::h6eb71bb69dd58715
          18: 0x186b82 - coretests-4ea5d5bdf34bb3c8.wasm!std::rt::lang_start_internal::hb7610428d697dd76
          19: 0x14a9e8 - coretests-4ea5d5bdf34bb3c8.wasm!__main_void
          20: 0x1737 - coretests-4ea5d5bdf34bb3c8.wasm!_start
    2: wasm trap: wasm `unreachable` instruction executed
error: test failed, to rerun pass `-p core --test coretests`
Caused by:
Caused by:
  process didn't exit successfully: `/wasmtime-v19.0.0-x86_64-linux/wasmtime run -C cache=n --dir . --env RUSTC_BOOTSTRAP /checkout/obj/build/x86_64-unknown-linux-gnu/stage1-std/wasm32-wasip1/release/deps/coretests-4ea5d5bdf34bb3c8.wasm -Z unstable-options --format json` (exit status: 134)
note: test exited abnormally; to see the full output pass --nocapture to the harness.
  local time: Sat Jun 22 04:29:20 UTC 2024
  network time: Sat, 22 Jun 2024 04:29:20 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

@bors
Copy link
Contributor

bors commented Jun 22, 2024

💔 Test failed - checks-actions

@workingjubilee
Copy link
Member

nice, does repro.

@matthiaskrgr matthiaskrgr deleted the rollup-yulic2r branch September 1, 2024 17:36
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.