about summary refs log tree commit diff
path: root/compiler/rustc_span/src
diff options
context:
space:
mode:
authorNoah Lev <camelidcamel@gmail.com>2025-01-06 21:15:56 -0800
committerNoah Lev <camelidcamel@gmail.com>2025-03-04 10:11:13 -0500
commit177e7ff5484cb712c176604eb49fce1d2f56b474 (patch)
treee2fa43f97305e2b163ef54703a2a4c32033b8298 /compiler/rustc_span/src
parent2010bba8868fa714bb4b07be463a8923b26d44db (diff)
downloadrust-177e7ff5484cb712c176604eb49fce1d2f56b474.tar.gz
rust-177e7ff5484cb712c176604eb49fce1d2f56b474.zip
mgca: Lower all const paths as `ConstArgKind::Path`
When `#![feature(min_generic_const_args)]` is enabled, we now lower all
const paths in generic arg position to `hir::ConstArgKind::Path`. We
then lower assoc const paths to `ty::ConstKind::Unevaluated` since we
can no longer use the anon const expression lowering machinery. In the
process of implementing this, I factored out `hir_ty_lowering` code that
is now shared between lowering assoc types and assoc consts.

This PR also introduces a `#[type_const]` attribute for trait assoc
consts that are allowed as const args. However, we still need to
implement code to check that assoc const definitions satisfy
`#[type_const]` if present (basically is it a const path or a
monomorphic anon const).
Diffstat (limited to 'compiler/rustc_span/src')
-rw-r--r--compiler/rustc_span/src/symbol.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs
index 3524709eebc..54167857227 100644
--- a/compiler/rustc_span/src/symbol.rs
+++ b/compiler/rustc_span/src/symbol.rs
@@ -2083,6 +2083,7 @@ symbols! {
         type_ascribe,
         type_ascription,
         type_changing_struct_update,
+        type_const,
         type_id,
         type_ir_inherent,
         type_length_limit,