diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2025-05-02 13:17:47 +0200 |
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2025-05-02 13:36:55 +0200 |
| commit | efc51ce993f27cfb192e37f936941ff613846b98 (patch) | |
| tree | e3687adbac0322d78abd8d0782a1e5938e9e0206 /compiler/rustc_const_eval/src | |
| parent | ddff38703a3e56b26f5a73d56208a8adab5daae1 (diff) | |
| download | rust-efc51ce993f27cfb192e37f936941ff613846b98.tar.gz rust-efc51ce993f27cfb192e37f936941ff613846b98.zip | |
Add `DefPathData::NestedStatic` instead of reusing `DefPathData::AnonConst`
Diffstat (limited to 'compiler/rustc_const_eval/src')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/intern.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/intern.rs b/compiler/rustc_const_eval/src/interpret/intern.rs index adf2c255d08..47cc2d49fe2 100644 --- a/compiler/rustc_const_eval/src/interpret/intern.rs +++ b/compiler/rustc_const_eval/src/interpret/intern.rs @@ -17,14 +17,13 @@ use hir::def::DefKind; use rustc_ast::Mutability; use rustc_data_structures::fx::{FxHashSet, FxIndexMap}; use rustc_hir as hir; -use rustc_hir::definitions::DisambiguatorState; +use rustc_hir::definitions::{DefPathData, DisambiguatorState}; use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrs; use rustc_middle::mir::interpret::{ConstAllocation, CtfeProvenance, InterpResult}; use rustc_middle::query::TyCtxtAt; use rustc_middle::span_bug; use rustc_middle::ty::layout::TyAndLayout; use rustc_span::def_id::LocalDefId; -use rustc_span::sym; use tracing::{instrument, trace}; use super::{ @@ -108,9 +107,9 @@ fn intern_as_new_static<'tcx>( ) { let feed = tcx.create_def( static_id, - Some(sym::nested), - DefKind::Static { safety: hir::Safety::Safe, mutability: alloc.0.mutability, nested: true }, None, + DefKind::Static { safety: hir::Safety::Safe, mutability: alloc.0.mutability, nested: true }, + Some(DefPathData::NestedStatic), disambiguator, ); tcx.set_nested_alloc_id_static(alloc_id, feed.def_id()); |
