mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-28 18:43:01 +00:00
Rollup merge of #145113 - petrochenkov:lessfinalize, r=lcnr
resolve: Do not finalize shadowed bindings I.e. do not mark them as used, or non-speculatively 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:
commit
21c3fe85d6
3 changed files with 2 additions and 4 deletions
|
|
@ -12,7 +12,7 @@ use tracing::debug;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
ExpandError, ExpandResult, MacroCallId,
|
ExpandError, ExpandResult, MacroCallId,
|
||||||
builtin::quote::{dollar_crate, quote},
|
builtin::quote::dollar_crate,
|
||||||
db::ExpandDatabase,
|
db::ExpandDatabase,
|
||||||
hygiene::span_with_def_site_ctxt,
|
hygiene::span_with_def_site_ctxt,
|
||||||
name::{self, AsName, Name},
|
name::{self, AsName, Name},
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ use syntax_bridge::syntax_node_to_token_tree;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
EditionedFileId, ExpandError, ExpandResult, Lookup as _, MacroCallId,
|
EditionedFileId, ExpandError, ExpandResult, Lookup as _, MacroCallId,
|
||||||
builtin::quote::{WithDelimiter, dollar_crate, quote},
|
builtin::quote::{WithDelimiter, dollar_crate},
|
||||||
db::ExpandDatabase,
|
db::ExpandDatabase,
|
||||||
hygiene::{span_with_call_site_ctxt, span_with_def_site_ctxt},
|
hygiene::{span_with_call_site_ctxt, span_with_def_site_ctxt},
|
||||||
name,
|
name,
|
||||||
|
|
|
||||||
|
|
@ -229,8 +229,6 @@ mod tests {
|
||||||
use span::{Edition, ROOT_ERASED_FILE_AST_ID, SpanAnchor, SyntaxContext};
|
use span::{Edition, ROOT_ERASED_FILE_AST_ID, SpanAnchor, SyntaxContext};
|
||||||
use syntax::{TextRange, TextSize};
|
use syntax::{TextRange, TextSize};
|
||||||
|
|
||||||
use super::quote;
|
|
||||||
|
|
||||||
const DUMMY: tt::Span = tt::Span {
|
const DUMMY: tt::Span = tt::Span {
|
||||||
range: TextRange::empty(TextSize::new(0)),
|
range: TextRange::empty(TextSize::new(0)),
|
||||||
anchor: SpanAnchor {
|
anchor: SpanAnchor {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue