Skip to content

Commit 21c3fe8

Browse files
authored
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 rust-lang/rust#144793 (comment).
2 parents f21aef7 + 26a9dac commit 21c3fe8

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

crates/hir-expand/src/builtin/derive_macro.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use tracing::debug;
1212

1313
use crate::{
1414
ExpandError, ExpandResult, MacroCallId,
15-
builtin::quote::{dollar_crate, quote},
15+
builtin::quote::dollar_crate,
1616
db::ExpandDatabase,
1717
hygiene::span_with_def_site_ctxt,
1818
name::{self, AsName, Name},

crates/hir-expand/src/builtin/fn_macro.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use syntax_bridge::syntax_node_to_token_tree;
1919

2020
use crate::{
2121
EditionedFileId, ExpandError, ExpandResult, Lookup as _, MacroCallId,
22-
builtin::quote::{WithDelimiter, dollar_crate, quote},
22+
builtin::quote::{WithDelimiter, dollar_crate},
2323
db::ExpandDatabase,
2424
hygiene::{span_with_call_site_ctxt, span_with_def_site_ctxt},
2525
name,

crates/hir-expand/src/builtin/quote.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,6 @@ mod tests {
229229
use span::{Edition, ROOT_ERASED_FILE_AST_ID, SpanAnchor, SyntaxContext};
230230
use syntax::{TextRange, TextSize};
231231

232-
use super::quote;
233-
234232
const DUMMY: tt::Span = tt::Span {
235233
range: TextRange::empty(TextSize::new(0)),
236234
anchor: SpanAnchor {

0 commit comments

Comments
 (0)