about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/parser-reference.js
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2024-03-11 03:47:19 -0400
committerGitHub <noreply@github.com>2024-03-11 03:47:19 -0400
commit221402e86301a9680f6c0dbee197ce83b0ff99e3 (patch)
tree22c08a1526d62408785186959051e70408c930b3 /tests/rustdoc-js-std/parser-reference.js
parent01affeb53a32f2e29bb90ebd3eff4c4c687e6746 (diff)
parenta11756ca757e37aa19fb5101aa44f8c82cd17d81 (diff)
downloadrust-221402e86301a9680f6c0dbee197ce83b0ff99e3.tar.gz
rust-221402e86301a9680f6c0dbee197ce83b0ff99e3.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/rustdoc-js-std/parser-reference.js')
0 files changed, 0 insertions, 0 deletions