rust/compiler/rustc_codegen_gcc/example
Jacob Pratt 05f22c3614
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
2024-03-11 03:47:19 -04:00
..
alloc_example.rs Fix compilation errors in rustc_codegen_gcc examples 2023-11-02 21:03:27 +01:00
alloc_system.rs Remove libc dependency in cg_gcc alloc_system example 2023-11-02 21:03:27 +01:00
arbitrary_self_types_pointers_and_wrappers.rs Merge commit '11a0cceab966e5ff1058ddbcab5977e8a1d6d290' into subtree-update_cg_gcc_2023-10-09 2023-10-09 15:53:34 -04:00
dst-field-align.rs Add 'compiler/rustc_codegen_gcc/' from commit 'afae271d5d3719eeb92c18bc004bb6d1965a5f3f' 2021-08-12 21:53:49 -04:00
example.rs Add 'compiler/rustc_codegen_gcc/' from commit 'afae271d5d3719eeb92c18bc004bb6d1965a5f3f' 2021-08-12 21:53:49 -04:00
mini_core_hello_world.rs Improve wording of static_mut_ref 2024-02-18 06:01:40 +03:00
mini_core.rs Rollup merge of #121840 - oli-obk:freeze, r=dtolnay 2024-03-11 03:47:19 -04:00
mod_bench.rs Fix compilation errors in rustc_codegen_gcc examples 2023-11-02 21:03:27 +01:00
std_example.rs Allow internal_features in rustc_codegen_gcc examples 2023-12-07 15:26:18 +01:00
subslice-patterns-const-eval.rs Add 'compiler/rustc_codegen_gcc/' from commit 'afae271d5d3719eeb92c18bc004bb6d1965a5f3f' 2021-08-12 21:53:49 -04:00
track-caller-attribute.rs Add 'compiler/rustc_codegen_gcc/' from commit 'afae271d5d3719eeb92c18bc004bb6d1965a5f3f' 2021-08-12 21:53:49 -04:00