resolve: Do not finalize shadowed bindings

I.e. do not mark them as used, or non-speculative loaded, or similar.
Previously they were sometimes finalized during early resolution, causing issues like https://github.com/rust-lang/rust/pull/144793#issuecomment-3168108005.
This commit is contained in:
Vadim Petrochenkov 2025-08-01 21:55:11 +03:00
parent af56430500
commit 26a9dacc14
3 changed files with 2 additions and 4 deletions

View file

@ -12,7 +12,7 @@ use tracing::debug;
use crate::{
ExpandError, ExpandResult, MacroCallId,
builtin::quote::{dollar_crate, quote},
builtin::quote::dollar_crate,
db::ExpandDatabase,
hygiene::span_with_def_site_ctxt,
name::{self, AsName, Name},

View file

@ -19,7 +19,7 @@ use syntax_bridge::syntax_node_to_token_tree;
use crate::{
EditionedFileId, ExpandError, ExpandResult, Lookup as _, MacroCallId,
builtin::quote::{WithDelimiter, dollar_crate, quote},
builtin::quote::{WithDelimiter, dollar_crate},
db::ExpandDatabase,
hygiene::{span_with_call_site_ctxt, span_with_def_site_ctxt},
name,

View file

@ -229,8 +229,6 @@ mod tests {
use span::{Edition, ROOT_ERASED_FILE_AST_ID, SpanAnchor, SyntaxContext};
use syntax::{TextRange, TextSize};
use super::quote;
const DUMMY: tt::Span = tt::Span {
range: TextRange::empty(TextSize::new(0)),
anchor: SpanAnchor {