mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Option begone part 2
This commit is contained in:
parent
96a774261f
commit
a2a3fecae3
31 changed files with 113 additions and 152 deletions
|
@ -201,7 +201,7 @@ impl<'a> DiagnosticsContext<'a> {
|
|||
let sema = &self.sema;
|
||||
(|| {
|
||||
let precise_location = precise_location?;
|
||||
let root = sema.parse_or_expand(node.file_id)?;
|
||||
let root = sema.parse_or_expand(node.file_id);
|
||||
match root.covering_element(precise_location) {
|
||||
syntax::NodeOrToken::Node(it) => Some(sema.original_range(&it)),
|
||||
syntax::NodeOrToken::Token(it) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue