mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
internal: use API stabilized in 1.52
This commit is contained in:
parent
3b4d5df840
commit
6a16ec52aa
7 changed files with 16 additions and 90 deletions
|
@ -17,7 +17,7 @@ use std::{
|
|||
};
|
||||
|
||||
use profile::StopWatch;
|
||||
use stdx::{is_ci, lines_with_ends};
|
||||
use stdx::is_ci;
|
||||
use text_size::{TextRange, TextSize};
|
||||
|
||||
pub use dissimilar::diff as __diff;
|
||||
|
@ -181,7 +181,7 @@ pub fn extract_annotations(text: &str) -> Vec<(TextRange, String)> {
|
|||
let mut prev_line_start: Option<TextSize> = None;
|
||||
let mut line_start: TextSize = 0.into();
|
||||
let mut prev_line_annotations: Vec<(TextSize, usize)> = Vec::new();
|
||||
for line in lines_with_ends(text) {
|
||||
for line in text.split_inclusive('\n') {
|
||||
let mut this_line_annotations = Vec::new();
|
||||
if let Some(idx) = line.find("//") {
|
||||
let annotation_offset = TextSize::of(&line[..idx + "//".len()]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue