mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-29 10:58:02 +00:00
Fix #[rustc_deprecated_safe_2024]
It should be considered by the edition of the caller, not the callee. Technically we still don't do it correctly - we need the span of the method name (if it comes from a macro), but we don't keep it and this is good enough for now.
This commit is contained in:
parent
6862329068
commit
55c63abc59
16 changed files with 274 additions and 100 deletions
|
|
@ -478,7 +478,15 @@ fn traverse(
|
|||
{
|
||||
continue;
|
||||
}
|
||||
highlight_format_string(hl, sema, krate, &string, &expanded_string, range);
|
||||
highlight_format_string(
|
||||
hl,
|
||||
sema,
|
||||
krate,
|
||||
&string,
|
||||
&expanded_string,
|
||||
range,
|
||||
file_id.edition(),
|
||||
);
|
||||
|
||||
if !string.is_raw() {
|
||||
highlight_escape_string(hl, &string, range.start());
|
||||
|
|
@ -526,6 +534,7 @@ fn traverse(
|
|||
&mut bindings_shadow_count,
|
||||
config.syntactic_name_ref_highlighting,
|
||||
name_like,
|
||||
file_id.edition(),
|
||||
),
|
||||
NodeOrToken::Token(token) => {
|
||||
highlight::token(sema, token, file_id.edition()).zip(Some(None))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue