diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2024-03-11 03:47:19 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-11 03:47:19 -0400 |
| commit | a6202e2a77ddd89879c8783cc14670e251580f0e (patch) | |
| tree | e824d8659835e406204eae46ec3ab3044e080d0f /tests/codegen/patchable-function-entry | |
| parent | 0031b219b6d5205d1f884dbd4b21ed48fa70a63d (diff) | |
| parent | 3ca0c5913e6f956014c4f2281b7d67f775ef4b3c (diff) | |
| download | rust-a6202e2a77ddd89879c8783cc14670e251580f0e.tar.gz rust-a6202e2a77ddd89879c8783cc14670e251580f0e.zip | |
Rollup merge of #121840 - oli-obk:freeze, r=dtolnay
Expose the Freeze trait again (unstably) and forbid implementing it manually non-emoji version of https://github.com/rust-lang/rust/pull/121501 cc #60715 This trait is useful for generic constants (associated consts of generic traits). See the test (`tests/ui/associated-consts/freeze.rs`) added in this PR for a usage example. The builtin `Freeze` trait is the only way to do it, users cannot work around this issue. It's also a useful trait for building some very specific abstrations, as shown by the usage by the `zerocopy` crate: https://github.com/google/zerocopy/issues/941 cc ```@RalfJung``` T-lang signed off on reexposing this unstably: https://github.com/rust-lang/rust/pull/121501#issuecomment-1969827742
Diffstat (limited to 'tests/codegen/patchable-function-entry')
0 files changed, 0 insertions, 0 deletions
