mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-30 11:37:31 +00:00
chore: Remove legacy SyntaxContextId re-export
This commit is contained in:
parent
60cd01864a
commit
02a793bd59
38 changed files with 164 additions and 228 deletions
|
|
@ -29,7 +29,7 @@ use crate::{
|
|||
use base_db::AnchoredPathBuf;
|
||||
use either::Either;
|
||||
use hir::{FieldSource, FileRange, HirFileIdExt, InFile, ModuleSource, Semantics};
|
||||
use span::{Edition, EditionedFileId, FileId, SyntaxContextId};
|
||||
use span::{Edition, EditionedFileId, FileId, SyntaxContext};
|
||||
use stdx::{never, TupleExt};
|
||||
use syntax::{
|
||||
ast::{self, HasName},
|
||||
|
|
@ -113,7 +113,7 @@ impl Definition {
|
|||
/// renamed and extern crate names will report its range, though a rename will introduce
|
||||
/// an alias instead.
|
||||
pub fn range_for_rename(self, sema: &Semantics<'_, RootDatabase>) -> Option<FileRange> {
|
||||
let syn_ctx_is_root = |(range, ctx): (_, SyntaxContextId)| ctx.is_root().then_some(range);
|
||||
let syn_ctx_is_root = |(range, ctx): (_, SyntaxContext)| ctx.is_root().then_some(range);
|
||||
let res = match self {
|
||||
Definition::Macro(mac) => {
|
||||
let src = sema.source(mac)?;
|
||||
|
|
@ -220,7 +220,7 @@ impl Definition {
|
|||
fn name_range<D>(
|
||||
def: D,
|
||||
sema: &Semantics<'_, RootDatabase>,
|
||||
) -> Option<(FileRange, SyntaxContextId)>
|
||||
) -> Option<(FileRange, SyntaxContext)>
|
||||
where
|
||||
D: hir::HasSource,
|
||||
D::Ast: ast::HasName,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue