Skip to content

Commit

Permalink
Rollup merge of #135489 - RalfJung:TryFromSliceError, r=tgross35
Browse files Browse the repository at this point in the history
remove pointless allowed_through_unstable_modules on TryFromSliceError

This got added in rust-lang/rust#132482 but the PR does not explain why. `@lukas-code` do you still remember? Also Cc `@Noratrieb` as reviewer of that PR.

If I understand the issue description correctly, all paths under which this type is exported are stable now: `core::array::TryFromSliceError` and `std::array::TryFromSliceError`. If that is the case, we shouldn't have the attribute; it's a terrible hack that should only be used when needed to maintain backward compatibility. Getting some historic information right is IMO *not* sufficient justification to risk accidentally exposing this type via more unstable paths today or in the future.
  • Loading branch information
matthiaskrgr authored Jan 24, 2025
2 parents ee3e688 + 1cd70aa commit 7496260
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/stability.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ Previously, due to a [rustc bug], stable items inside unstable modules were
available to stable code in that location.
As of <!-- date-check --> September 2024, items with [accidentally stabilized
paths] are marked with the `#[rustc_allowed_through_unstable_modules]` attribute
to prevent code dependent on those paths from breaking.
to prevent code dependent on those paths from breaking. Do *not* add this attribute
to any more items unless that is needed to avoid breaking changes.

The `unstable` attribute may also have the `soft` value, which makes it a
future-incompatible deny-by-default lint instead of a hard error. This is used
Expand Down

0 comments on commit 7496260

Please sign in to comment.