diff options
| author | bors <bors@rust-lang.org> | 2023-07-28 22:04:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-07-28 22:04:26 +0000 |
| commit | 04abc370b9f3855b28172b65a7f7d5a433f41412 (patch) | |
| tree | 97b99183c3b23bc4b43096c77b50afae26a3ce4c /compiler/rustc_codegen_gcc | |
| parent | b6dd153fbcc06b3bc936aca800af4b8376c229e4 (diff) | |
| parent | 203d4006688521b0e4e193a18b37d8fae7758d46 (diff) | |
| download | rust-04abc370b9f3855b28172b65a7f7d5a433f41412.tar.gz rust-04abc370b9f3855b28172b65a7f7d5a433f41412.zip | |
Auto merge of #113522 - fmease:generic-consts, r=cjgillot
Implement generic const items This implements generic parameters and where-clauses on free and associated const items under the experimental feature gate `generic_const_items`. See rust-lang/lang-team#214. Tracking issue: #113521. Fixes #104400. This PR doesn't include rustfmt support as per [nightly style procedure](https://github.com/rust-lang/style-team/blob/master/nightly-style-procedure.md) and it doesn't add rustdoc JSON support (see [related Zulip topic](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Rustdoc.20JSON.3A.20Experimental.20rustc.20features)). CC `@scottmcm` `@compiler-errors` `@WalterSmuts` r? `@oli-obk` <details><summary>Resolved Questions</summary> * Q: Should `const ADD<const N: usize, const M: usize>: usize = N + M; ADD::<0, 1>` trigger the error *generic parameters may not be used in const operations* (which can be unlocked with `#![feature(generic_const_exprs)]`). Currently it doesn't. Or does this fall under [this paragraph](https://github.com/rust-lang/rust/blob/71f71a5397c42fec01f5c1045c638d961fa9f7ca/compiler/rustc_resolve/src/late.rs#L191)? * A: No, https://github.com/rust-lang/rust/pull/113522#issuecomment-1628634092 * Q: Should `const UNUSED: () = () where String: Copy;` (with `#![feature(trivial_bounds)]` and with `UNUSED` unused) succeed compilation? Currently it doesn't: *evaluation of constant value failed // entering unreachable code* * A: Yes, but postponed until stabilization (latest), https://github.com/rust-lang/rust/pull/113522#issuecomment-1628634092 </details>
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions
