Skip to content

Conversation

@wr7
Copy link
Contributor

@wr7 wr7 commented Jan 7, 2026

slice::element_offset

Partially stabilizes #126769 (substr_range).

FCP completed

The other methods are stalled because of the new range types, but this method doesn't use ranges.

@rustbot label +relnotes

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 7, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 7, 2026

r? @jhpratt

rustbot has assigned @jhpratt.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@jhpratt
Copy link
Member

jhpratt commented Jan 8, 2026

Seems reasonable to split this out given the concern.

@bors r+ rollup

@rust-bors rust-bors bot 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 8, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 8, 2026

📌 Commit 5548a84 has been approved by jhpratt

It is now in the queue for this repository.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 8, 2026
Stabilize `slice::element_offset`

related: rust-lang#145899 (comment)

print error from EnzymeWrapper::get_or_init(sysroot) as a note

r? @ZuseZ4

e.g.

1. when libEnzyme not found

```shell
$ rustc +stage1 -Z autodiff=Enable -C lto=fat src/main.rs
error: autodiff backend not found in the sysroot: failed to find a `libEnzyme-21` folder in the sysroot candidates:
       * /Volumes/WD_BLACK_SN850X_HS_1TB/rust-lang/rust/build/aarch64-apple-darwin/stage1/lib
  |
  = note: it will be distributed via rustup in the future
```

2. when could not load libEnzyme successfully

```shell
rustc +stage1 -Z autodiff=Enable -C lto=fat src/main.rs
error: failed to load our autodiff backend: DlOpen { source: "dlopen(/Volumes/WD_BLACK_SN850X_HS_1TB/rust-lang/rust/build/aarch64-apple-darwin/stage1/lib/rustlib/aarch64-apple-darwin/lib/libEnzyme-21.dylib, 0x0005): tried: \'/Volumes/WD_BLACK_SN850X_HS_1TB/rust-lang/rust/build/aarch64-apple-darwin/stage1/lib/rustlib/aarch64-apple-darwin/lib/libEnzyme-21.dylib\' (slice is not valid mach-o file), \'/System/Volumes/Preboot/Cryptexes/OS/Volumes/WD_BLACK_SN850X_HS_1TB/rust-lang/rust/build/aarch64-apple-darwin/stage1/lib/rustlib/aarch64-apple-darwin/lib/libEnzyme-21.dylib\' (no such file), \'/Volumes/WD_BLACK_SN850X_HS_1TB/rust-lang/rust/build/aarch64-apple-darwin/stage1/lib/rustlib/aarch64-apple-darwin/lib/libEnzyme-21.dylib\' (slice is not valid mach-o file)" }
```
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 8, 2026
Stabilize `slice::element_offset`

In rust-lang#127273 I added a test and a FIXME comment pointing out how it does the wrong thing. In the next commit I fixed the problem but forgot to remove the FIXME comment, whoops.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 8, 2026
Stabilize `slice::element_offset`

[slice::element_offset](https://doc.rust-lang.org/std/primitive.slice.html#method.element_offset)

Partially stabilizes rust-lang#126769 (substr_range).

[FCP completed](rust-lang#126769 (comment))

The other methods are [stalled because of the new range types](rust-lang#126769 (comment)), but this method doesn't use ranges.
rust-bors bot added a commit that referenced this pull request Jan 8, 2026
Rollup of 6 pull requests

Successful merges:

 - #150675 (MGCA: Support tuple expressions as direct const arguments)
 - #150696 (enrich error info when tries to dlopen Enzyme)
 - #150747 (tests/ui/runtime/on-broken-pipe/with-rustc_main.rs: Not needed so remove)
 - #150757 (Fix `alloc_error_handler` signature mismatch)
 - #150777 (Stabilize `slice::element_offset`)
 - #150791 (Remove out of date FIXME comment.)

r? @ghost
@rust-bors rust-bors bot merged commit e821731 into rust-lang:main Jan 8, 2026
11 checks passed
@rustbot rustbot added this to the 1.94.0 milestone Jan 8, 2026
rust-timer added a commit that referenced this pull request Jan 8, 2026
Rollup merge of #150777 - stabilize_elem_offset, r=jhpratt

Stabilize `slice::element_offset`

[slice::element_offset](https://doc.rust-lang.org/std/primitive.slice.html#method.element_offset)

Partially stabilizes #126769 (substr_range).

[FCP completed](#126769 (comment))

The other methods are [stalled because of the new range types](#126769 (comment)), but this method doesn't use ranges.
@wr7 wr7 deleted the stabilize_elem_offset branch January 8, 2026 16:23
@rustbot rustbot added the relnotes Marks issues that should be documented in the release notes of the next release. label Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

3 participants