mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-20 03:49:51 +00:00
Re-implement rust string highlighting via tool attribute
This commit is contained in:
parent
897f7e579e
commit
bf669dab84
72 changed files with 386 additions and 173 deletions
|
|
@ -692,7 +692,9 @@ mod tests {
|
|||
use crate::RootDatabase;
|
||||
|
||||
/// Creates analysis from a multi-file fixture, returns positions marked with $0.
|
||||
pub(crate) fn position(ra_fixture: &str) -> (RootDatabase, FilePosition) {
|
||||
pub(crate) fn position(
|
||||
#[rust_analyzer::rust_fixture] ra_fixture: &str,
|
||||
) -> (RootDatabase, FilePosition) {
|
||||
let change_fixture = ChangeFixture::parse(ra_fixture);
|
||||
let mut database = RootDatabase::default();
|
||||
database.apply_change(change_fixture.change);
|
||||
|
|
@ -703,7 +705,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[track_caller]
|
||||
fn check(ra_fixture: &str, expect: Expect) {
|
||||
fn check(#[rust_analyzer::rust_fixture] ra_fixture: &str, expect: Expect) {
|
||||
let fixture = format!(
|
||||
r#"
|
||||
//- minicore: sized, fn
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue