mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
![]() 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 |
||
---|---|---|
.. | ||
analyze_source_file | ||
edit_distance | ||
source_map | ||
symbol | ||
analyze_source_file.rs | ||
caching_source_map_view.rs | ||
def_id.rs | ||
edit_distance.rs | ||
edition.rs | ||
fatal_error.rs | ||
hygiene.rs | ||
lib.rs | ||
profiling.rs | ||
source_map.rs | ||
span_encoding.rs | ||
symbol.rs | ||
tests.rs |