mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-16 01:38:13 +00:00
Merge #1321
1321: Rustc r=matklad a=matklad Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
8a9cc67421
62 changed files with 648 additions and 618 deletions
|
@ -66,16 +66,18 @@ mod tests {
|
|||
}
|
||||
",
|
||||
),
|
||||
@r###"[
|
||||
CompletionItem {
|
||||
label: "the_field",
|
||||
source_range: [94; 94),
|
||||
delete: [94; 94),
|
||||
insert: "the_field",
|
||||
kind: Field,
|
||||
detail: "u32"
|
||||
}
|
||||
]"###
|
||||
@r###"
|
||||
⋮[
|
||||
⋮ CompletionItem {
|
||||
⋮ label: "the_field",
|
||||
⋮ source_range: [94; 94),
|
||||
⋮ delete: [94; 94),
|
||||
⋮ insert: "the_field",
|
||||
⋮ kind: Field,
|
||||
⋮ detail: "u32",
|
||||
⋮ },
|
||||
⋮]
|
||||
"###
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -95,27 +97,29 @@ mod tests {
|
|||
}
|
||||
",
|
||||
),
|
||||
@r###"[
|
||||
CompletionItem {
|
||||
label: "foo",
|
||||
source_range: [187; 187),
|
||||
delete: [187; 187),
|
||||
insert: "foo()$0",
|
||||
kind: Method,
|
||||
detail: "fn foo(self)"
|
||||
},
|
||||
CompletionItem {
|
||||
label: "the_field",
|
||||
source_range: [187; 187),
|
||||
delete: [187; 187),
|
||||
insert: "the_field",
|
||||
kind: Field,
|
||||
detail: "(u32,)",
|
||||
documentation: Documentation(
|
||||
"This is the_field"
|
||||
)
|
||||
}
|
||||
]"###
|
||||
@r###"
|
||||
⋮[
|
||||
⋮ CompletionItem {
|
||||
⋮ label: "foo",
|
||||
⋮ source_range: [187; 187),
|
||||
⋮ delete: [187; 187),
|
||||
⋮ insert: "foo()$0",
|
||||
⋮ kind: Method,
|
||||
⋮ detail: "fn foo(self)",
|
||||
⋮ },
|
||||
⋮ CompletionItem {
|
||||
⋮ label: "the_field",
|
||||
⋮ source_range: [187; 187),
|
||||
⋮ delete: [187; 187),
|
||||
⋮ insert: "the_field",
|
||||
⋮ kind: Field,
|
||||
⋮ detail: "(u32,)",
|
||||
⋮ documentation: Documentation(
|
||||
⋮ "This is the_field",
|
||||
⋮ ),
|
||||
⋮ },
|
||||
⋮]
|
||||
"###
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -132,24 +136,26 @@ mod tests {
|
|||
}
|
||||
",
|
||||
),
|
||||
@r###"[
|
||||
CompletionItem {
|
||||
label: "foo",
|
||||
source_range: [126; 126),
|
||||
delete: [126; 126),
|
||||
insert: "foo()$0",
|
||||
kind: Method,
|
||||
detail: "fn foo(&self)"
|
||||
},
|
||||
CompletionItem {
|
||||
label: "the_field",
|
||||
source_range: [126; 126),
|
||||
delete: [126; 126),
|
||||
insert: "the_field",
|
||||
kind: Field,
|
||||
detail: "(u32, i32)"
|
||||
}
|
||||
]"###
|
||||
@r###"
|
||||
⋮[
|
||||
⋮ CompletionItem {
|
||||
⋮ label: "foo",
|
||||
⋮ source_range: [126; 126),
|
||||
⋮ delete: [126; 126),
|
||||
⋮ insert: "foo()$0",
|
||||
⋮ kind: Method,
|
||||
⋮ detail: "fn foo(&self)",
|
||||
⋮ },
|
||||
⋮ CompletionItem {
|
||||
⋮ label: "the_field",
|
||||
⋮ source_range: [126; 126),
|
||||
⋮ delete: [126; 126),
|
||||
⋮ insert: "the_field",
|
||||
⋮ kind: Field,
|
||||
⋮ detail: "(u32, i32)",
|
||||
⋮ },
|
||||
⋮]
|
||||
"###
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -182,16 +188,18 @@ mod tests {
|
|||
}
|
||||
",
|
||||
),
|
||||
@r###"[
|
||||
CompletionItem {
|
||||
label: "the_method",
|
||||
source_range: [144; 144),
|
||||
delete: [144; 144),
|
||||
insert: "the_method()$0",
|
||||
kind: Method,
|
||||
detail: "fn the_method(&self)"
|
||||
}
|
||||
]"###
|
||||
@r###"
|
||||
⋮[
|
||||
⋮ CompletionItem {
|
||||
⋮ label: "the_method",
|
||||
⋮ source_range: [144; 144),
|
||||
⋮ delete: [144; 144),
|
||||
⋮ insert: "the_method()$0",
|
||||
⋮ kind: Method,
|
||||
⋮ detail: "fn the_method(&self)",
|
||||
⋮ },
|
||||
⋮]
|
||||
"###
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -208,16 +216,18 @@ mod tests {
|
|||
}
|
||||
",
|
||||
),
|
||||
@r###"[
|
||||
CompletionItem {
|
||||
label: "the_method",
|
||||
source_range: [151; 151),
|
||||
delete: [151; 151),
|
||||
insert: "the_method()$0",
|
||||
kind: Method,
|
||||
detail: "fn the_method(&self)"
|
||||
}
|
||||
]"###
|
||||
@r###"
|
||||
⋮[
|
||||
⋮ CompletionItem {
|
||||
⋮ label: "the_method",
|
||||
⋮ source_range: [151; 151),
|
||||
⋮ delete: [151; 151),
|
||||
⋮ insert: "the_method()$0",
|
||||
⋮ kind: Method,
|
||||
⋮ detail: "fn the_method(&self)",
|
||||
⋮ },
|
||||
⋮]
|
||||
"###
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -257,16 +267,18 @@ mod tests {
|
|||
}
|
||||
",
|
||||
),
|
||||
@r###"[
|
||||
CompletionItem {
|
||||
label: "the_method",
|
||||
source_range: [249; 249),
|
||||
delete: [249; 249),
|
||||
insert: "the_method()$0",
|
||||
kind: Method,
|
||||
detail: "fn the_method(&self)"
|
||||
}
|
||||
]"###
|
||||
@r###"
|
||||
⋮[
|
||||
⋮ CompletionItem {
|
||||
⋮ label: "the_method",
|
||||
⋮ source_range: [249; 249),
|
||||
⋮ delete: [249; 249),
|
||||
⋮ insert: "the_method()$0",
|
||||
⋮ kind: Method,
|
||||
⋮ detail: "fn the_method(&self)",
|
||||
⋮ },
|
||||
⋮]
|
||||
"###
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -281,24 +293,26 @@ mod tests {
|
|||
}
|
||||
",
|
||||
),
|
||||
@r###"[
|
||||
CompletionItem {
|
||||
label: "0",
|
||||
source_range: [75; 75),
|
||||
delete: [75; 75),
|
||||
insert: "0",
|
||||
kind: Field,
|
||||
detail: "i32"
|
||||
},
|
||||
CompletionItem {
|
||||
label: "1",
|
||||
source_range: [75; 75),
|
||||
delete: [75; 75),
|
||||
insert: "1",
|
||||
kind: Field,
|
||||
detail: "f64"
|
||||
}
|
||||
]"###
|
||||
@r###"
|
||||
⋮[
|
||||
⋮ CompletionItem {
|
||||
⋮ label: "0",
|
||||
⋮ source_range: [75; 75),
|
||||
⋮ delete: [75; 75),
|
||||
⋮ insert: "0",
|
||||
⋮ kind: Field,
|
||||
⋮ detail: "i32",
|
||||
⋮ },
|
||||
⋮ CompletionItem {
|
||||
⋮ label: "1",
|
||||
⋮ source_range: [75; 75),
|
||||
⋮ delete: [75; 75),
|
||||
⋮ insert: "1",
|
||||
⋮ kind: Field,
|
||||
⋮ detail: "f64",
|
||||
⋮ },
|
||||
⋮]
|
||||
"###
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -322,16 +336,18 @@ mod tests {
|
|||
}
|
||||
",
|
||||
),
|
||||
@r###"[
|
||||
CompletionItem {
|
||||
label: "blah",
|
||||
source_range: [299; 300),
|
||||
delete: [299; 300),
|
||||
insert: "blah()$0",
|
||||
kind: Method,
|
||||
detail: "pub fn blah(&self)"
|
||||
}
|
||||
]"###
|
||||
@r###"
|
||||
⋮[
|
||||
⋮ CompletionItem {
|
||||
⋮ label: "blah",
|
||||
⋮ source_range: [299; 300),
|
||||
⋮ delete: [299; 300),
|
||||
⋮ insert: "blah()$0",
|
||||
⋮ kind: Method,
|
||||
⋮ detail: "pub fn blah(&self)",
|
||||
⋮ },
|
||||
⋮]
|
||||
"###
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -346,16 +362,18 @@ mod tests {
|
|||
};
|
||||
",
|
||||
),
|
||||
@r###"[
|
||||
CompletionItem {
|
||||
label: "the_field",
|
||||
source_range: [106; 106),
|
||||
delete: [106; 106),
|
||||
insert: "the_field",
|
||||
kind: Field,
|
||||
detail: "u32"
|
||||
}
|
||||
]"###
|
||||
@r###"
|
||||
⋮[
|
||||
⋮ CompletionItem {
|
||||
⋮ label: "the_field",
|
||||
⋮ source_range: [106; 106),
|
||||
⋮ delete: [106; 106),
|
||||
⋮ insert: "the_field",
|
||||
⋮ kind: Field,
|
||||
⋮ detail: "u32",
|
||||
⋮ },
|
||||
⋮]
|
||||
"###
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,15 +71,17 @@ mod tests {
|
|||
fn baz(file<|>) {}
|
||||
",
|
||||
),
|
||||
@r###"[
|
||||
CompletionItem {
|
||||
label: "file_id: FileId",
|
||||
source_range: [110; 114),
|
||||
delete: [110; 114),
|
||||
insert: "file_id: FileId",
|
||||
lookup: "file_id"
|
||||
}
|
||||
]"###
|
||||
@r###"
|
||||
⋮[
|
||||
⋮ CompletionItem {
|
||||
⋮ label: "file_id: FileId",
|
||||
⋮ source_range: [110; 114),
|
||||
⋮ delete: [110; 114),
|
||||
⋮ insert: "file_id: FileId",
|
||||
⋮ lookup: "file_id",
|
||||
⋮ },
|
||||
⋮]
|
||||
"###
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -93,15 +95,17 @@ mod tests {
|
|||
fn baz(file<|>, x: i32) {}
|
||||
",
|
||||
),
|
||||
@r###"[
|
||||
CompletionItem {
|
||||
label: "file_id: FileId",
|
||||
source_range: [110; 114),
|
||||
delete: [110; 114),
|
||||
insert: "file_id: FileId",
|
||||
lookup: "file_id"
|
||||
}
|
||||
]"###
|
||||
@r###"
|
||||
⋮[
|
||||
⋮ CompletionItem {
|
||||
⋮ label: "file_id: FileId",
|
||||
⋮ source_range: [110; 114),
|
||||
⋮ delete: [110; 114),
|
||||
⋮ insert: "file_id: FileId",
|
||||
⋮ lookup: "file_id",
|
||||
⋮ },
|
||||
⋮]
|
||||
"###
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -118,15 +122,17 @@ mod tests {
|
|||
}
|
||||
",
|
||||
),
|
||||
@r###"[
|
||||
CompletionItem {
|
||||
label: "file_id: FileId",
|
||||
source_range: [289; 293),
|
||||
delete: [289; 293),
|
||||
insert: "file_id: FileId",
|
||||
lookup: "file_id"
|
||||
}
|
||||
]"###
|
||||
@r###"
|
||||
⋮[
|
||||
⋮ CompletionItem {
|
||||
⋮ label: "file_id: FileId",
|
||||
⋮ source_range: [289; 293),
|
||||
⋮ delete: [289; 293),
|
||||
⋮ insert: "file_id: FileId",
|
||||
⋮ lookup: "file_id",
|
||||
⋮ },
|
||||
⋮]
|
||||
"###
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,35 +53,37 @@ mod tests {
|
|||
}
|
||||
",
|
||||
);
|
||||
assert_debug_snapshot_matches!(completions, @r###"[
|
||||
CompletionItem {
|
||||
label: "E",
|
||||
source_range: [246; 246),
|
||||
delete: [246; 246),
|
||||
insert: "E",
|
||||
kind: Enum
|
||||
},
|
||||
CompletionItem {
|
||||
label: "X",
|
||||
source_range: [246; 246),
|
||||
delete: [246; 246),
|
||||
insert: "X",
|
||||
kind: EnumVariant
|
||||
},
|
||||
CompletionItem {
|
||||
label: "Z",
|
||||
source_range: [246; 246),
|
||||
delete: [246; 246),
|
||||
insert: "Z",
|
||||
kind: Const
|
||||
},
|
||||
CompletionItem {
|
||||
label: "m",
|
||||
source_range: [246; 246),
|
||||
delete: [246; 246),
|
||||
insert: "m",
|
||||
kind: Module
|
||||
}
|
||||
]"###);
|
||||
assert_debug_snapshot_matches!(completions, @r###"
|
||||
⋮[
|
||||
⋮ CompletionItem {
|
||||
⋮ label: "E",
|
||||
⋮ source_range: [246; 246),
|
||||
⋮ delete: [246; 246),
|
||||
⋮ insert: "E",
|
||||
⋮ kind: Enum,
|
||||
⋮ },
|
||||
⋮ CompletionItem {
|
||||
⋮ label: "X",
|
||||
⋮ source_range: [246; 246),
|
||||
⋮ delete: [246; 246),
|
||||
⋮ insert: "X",
|
||||
⋮ kind: EnumVariant,
|
||||
⋮ },
|
||||
⋮ CompletionItem {
|
||||
⋮ label: "Z",
|
||||
⋮ source_range: [246; 246),
|
||||
⋮ delete: [246; 246),
|
||||
⋮ insert: "Z",
|
||||
⋮ kind: Const,
|
||||
⋮ },
|
||||
⋮ CompletionItem {
|
||||
⋮ label: "m",
|
||||
⋮ source_range: [246; 246),
|
||||
⋮ delete: [246; 246),
|
||||
⋮ insert: "m",
|
||||
⋮ kind: Module,
|
||||
⋮ },
|
||||
⋮]
|
||||
"###);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,15 +44,17 @@ mod tests {
|
|||
}
|
||||
",
|
||||
);
|
||||
assert_debug_snapshot_matches!(completions, @r###"[
|
||||
CompletionItem {
|
||||
label: "the_field",
|
||||
source_range: [83; 86),
|
||||
delete: [83; 86),
|
||||
insert: "the_field",
|
||||
kind: Field,
|
||||
detail: "u32"
|
||||
}
|
||||
]"###);
|
||||
assert_debug_snapshot_matches!(completions, @r###"
|
||||
⋮[
|
||||
⋮ CompletionItem {
|
||||
⋮ label: "the_field",
|
||||
⋮ source_range: [83; 86),
|
||||
⋮ delete: [83; 86),
|
||||
⋮ insert: "the_field",
|
||||
⋮ kind: Field,
|
||||
⋮ detail: "u32",
|
||||
⋮ },
|
||||
⋮]
|
||||
"###);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.132341107Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.119822026Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -11,13 +11,13 @@ expression: kind_completions
|
|||
delete: [83; 83),
|
||||
insert: "quux()$0",
|
||||
kind: Function,
|
||||
detail: "fn quux()"
|
||||
detail: "fn quux()",
|
||||
},
|
||||
CompletionItem {
|
||||
label: "x",
|
||||
source_range: [83; 83),
|
||||
delete: [83; 83),
|
||||
insert: "x",
|
||||
kind: Binding
|
||||
}
|
||||
kind: Binding,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.126809445Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.122168608Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,14 +10,14 @@ expression: kind_completions
|
|||
source_range: [214; 214),
|
||||
delete: [214; 214),
|
||||
insert: "a",
|
||||
kind: Binding
|
||||
kind: Binding,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "b",
|
||||
source_range: [214; 214),
|
||||
delete: [214; 214),
|
||||
insert: "b",
|
||||
kind: Binding
|
||||
kind: Binding,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "quux",
|
||||
|
@ -25,6 +25,6 @@ expression: kind_completions
|
|||
delete: [214; 214),
|
||||
insert: "quux()$0",
|
||||
kind: Function,
|
||||
detail: "fn quux()"
|
||||
}
|
||||
detail: "fn quux()",
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.126696322Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.122797188Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -11,20 +11,20 @@ expression: kind_completions
|
|||
delete: [79; 79),
|
||||
insert: "quux($0)",
|
||||
kind: Function,
|
||||
detail: "fn quux(x: i32)"
|
||||
detail: "fn quux(x: i32)",
|
||||
},
|
||||
CompletionItem {
|
||||
label: "x",
|
||||
source_range: [79; 79),
|
||||
delete: [79; 79),
|
||||
insert: "x",
|
||||
kind: Binding
|
||||
kind: Binding,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "y",
|
||||
source_range: [79; 79),
|
||||
delete: [79; 79),
|
||||
insert: "y",
|
||||
kind: Binding
|
||||
}
|
||||
kind: Binding,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:23.976673150Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.067956470Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,48 +10,48 @@ expression: kind_completions
|
|||
source_range: [55; 55),
|
||||
delete: [55; 55),
|
||||
insert: "break;",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "continue",
|
||||
source_range: [55; 55),
|
||||
delete: [55; 55),
|
||||
insert: "continue;",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "if",
|
||||
source_range: [55; 55),
|
||||
delete: [55; 55),
|
||||
insert: "if $0 {}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "loop",
|
||||
source_range: [55; 55),
|
||||
delete: [55; 55),
|
||||
insert: "loop {$0}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "match",
|
||||
source_range: [55; 55),
|
||||
delete: [55; 55),
|
||||
insert: "match $0 {}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "return",
|
||||
source_range: [55; 55),
|
||||
delete: [55; 55),
|
||||
insert: "return $0;",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "while",
|
||||
source_range: [55; 55),
|
||||
delete: [55; 55),
|
||||
insert: "while $0 {}",
|
||||
kind: Keyword
|
||||
}
|
||||
kind: Keyword,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.068967569Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:44:10.859967190Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,34 +10,34 @@ expression: kind_completions
|
|||
source_range: [60; 60),
|
||||
delete: [60; 60),
|
||||
insert: "if $0 {}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "loop",
|
||||
source_range: [60; 60),
|
||||
delete: [60; 60),
|
||||
insert: "loop {$0}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "match",
|
||||
source_range: [60; 60),
|
||||
delete: [60; 60),
|
||||
insert: "match $0 {}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "return",
|
||||
source_range: [60; 60),
|
||||
delete: [60; 60),
|
||||
insert: "return $0;",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "while",
|
||||
source_range: [60; 60),
|
||||
delete: [60; 60),
|
||||
insert: "while $0 {}",
|
||||
kind: Keyword
|
||||
}
|
||||
kind: Keyword,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.180517434Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.139262926Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,7 +10,7 @@ expression: kind_completions
|
|||
source_range: [18; 18),
|
||||
delete: [18; 18),
|
||||
insert: "Option",
|
||||
kind: Struct
|
||||
kind: Struct,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "foo",
|
||||
|
@ -18,13 +18,13 @@ expression: kind_completions
|
|||
delete: [18; 18),
|
||||
insert: "foo()$0",
|
||||
kind: Function,
|
||||
detail: "fn foo()"
|
||||
detail: "fn foo()",
|
||||
},
|
||||
CompletionItem {
|
||||
label: "std",
|
||||
source_range: [18; 18),
|
||||
delete: [18; 18),
|
||||
insert: "std",
|
||||
kind: Module
|
||||
}
|
||||
kind: Module,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.118807216Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.108690807Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,6 +10,6 @@ expression: kind_completions
|
|||
source_range: [9; 9),
|
||||
delete: [9; 9),
|
||||
insert: "bar",
|
||||
kind: Module
|
||||
}
|
||||
kind: Module,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.044567777Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.085633034Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,6 +10,6 @@ expression: kind_completions
|
|||
source_range: [23; 25),
|
||||
delete: [23; 25),
|
||||
insert: "Spam",
|
||||
kind: Struct
|
||||
}
|
||||
kind: Struct,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:23.987788705Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.081993214Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,34 +10,34 @@ expression: kind_completions
|
|||
source_range: [85; 85),
|
||||
delete: [85; 85),
|
||||
insert: "if $0 {}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "loop",
|
||||
source_range: [85; 85),
|
||||
delete: [85; 85),
|
||||
insert: "loop {$0}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "match",
|
||||
source_range: [85; 85),
|
||||
delete: [85; 85),
|
||||
insert: "match $0 {}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "return",
|
||||
source_range: [85; 85),
|
||||
delete: [85; 85),
|
||||
insert: "return $0",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "while",
|
||||
source_range: [85; 85),
|
||||
delete: [85; 85),
|
||||
insert: "while $0 {}",
|
||||
kind: Keyword
|
||||
}
|
||||
kind: Keyword,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.211680376Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.158296242Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -11,7 +11,7 @@ expression: kind_completions
|
|||
delete: [35; 39),
|
||||
insert: "frobnicate",
|
||||
kind: Function,
|
||||
detail: "fn frobnicate()"
|
||||
detail: "fn frobnicate()",
|
||||
},
|
||||
CompletionItem {
|
||||
label: "main",
|
||||
|
@ -19,6 +19,6 @@ expression: kind_completions
|
|||
delete: [35; 39),
|
||||
insert: "main",
|
||||
kind: Function,
|
||||
detail: "fn main()"
|
||||
}
|
||||
detail: "fn main()",
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-24T16:33:48.008220694Z"
|
||||
creator: insta@0.6.3
|
||||
created: "2019-05-23T22:44:10.920136527Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -11,6 +11,6 @@ expression: kind_completions
|
|||
delete: [67; 69),
|
||||
insert: "new",
|
||||
kind: Function,
|
||||
detail: "fn new() -> Foo"
|
||||
}
|
||||
detail: "fn new() -> Foo",
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.213677341Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.154795561Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -11,6 +11,6 @@ expression: kind_completions
|
|||
delete: [40; 41),
|
||||
insert: "foo",
|
||||
kind: Function,
|
||||
detail: "pub fn foo()"
|
||||
}
|
||||
detail: "pub fn foo()",
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-04-04T14:52:24.531844100Z"
|
||||
creator: insta@0.7.4
|
||||
created: "2019-05-23T22:23:35.142044205Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,7 +10,7 @@ expression: kind_completions
|
|||
source_range: [126; 126),
|
||||
delete: [126; 126),
|
||||
insert: "bar",
|
||||
kind: Binding
|
||||
kind: Binding,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "foo",
|
||||
|
@ -18,6 +18,6 @@ expression: kind_completions
|
|||
delete: [126; 126),
|
||||
insert: "foo()$0",
|
||||
kind: Function,
|
||||
detail: "fn foo()"
|
||||
}
|
||||
detail: "fn foo()",
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.045355450Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.090178265Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -13,8 +13,8 @@ expression: kind_completions
|
|||
kind: EnumVariant,
|
||||
detail: "(i32)",
|
||||
documentation: Documentation(
|
||||
"Bar Variant with i32"
|
||||
)
|
||||
"Bar Variant with i32",
|
||||
),
|
||||
},
|
||||
CompletionItem {
|
||||
label: "Foo",
|
||||
|
@ -24,7 +24,7 @@ expression: kind_completions
|
|||
kind: EnumVariant,
|
||||
detail: "()",
|
||||
documentation: Documentation(
|
||||
"Foo Variant"
|
||||
)
|
||||
}
|
||||
"Foo Variant",
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-04-02T07:43:12.954637543Z"
|
||||
creator: insta@0.7.4
|
||||
created: "2019-05-23T22:23:35.091325331Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -13,8 +13,8 @@ expression: kind_completions
|
|||
kind: EnumVariant,
|
||||
detail: "(i32, u32)",
|
||||
documentation: Documentation(
|
||||
"Bar Variant with i32 and u32"
|
||||
)
|
||||
"Bar Variant with i32 and u32",
|
||||
),
|
||||
},
|
||||
CompletionItem {
|
||||
label: "Foo",
|
||||
|
@ -24,8 +24,8 @@ expression: kind_completions
|
|||
kind: EnumVariant,
|
||||
detail: "()",
|
||||
documentation: Documentation(
|
||||
"Foo Variant (empty)"
|
||||
)
|
||||
"Foo Variant (empty)",
|
||||
),
|
||||
},
|
||||
CompletionItem {
|
||||
label: "S",
|
||||
|
@ -35,7 +35,7 @@ expression: kind_completions
|
|||
kind: EnumVariant,
|
||||
detail: "(S)",
|
||||
documentation: Documentation(
|
||||
""
|
||||
)
|
||||
}
|
||||
"",
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.137183638Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.123197049Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,6 +10,6 @@ expression: kind_completions
|
|||
source_range: [4; 4),
|
||||
delete: [4; 4),
|
||||
insert: "other_crate",
|
||||
kind: Module
|
||||
}
|
||||
kind: Module,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.143253235Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.123825399Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,7 +10,7 @@ expression: kind_completions
|
|||
source_range: [44; 44),
|
||||
delete: [44; 44),
|
||||
insert: "T",
|
||||
kind: TypeParam
|
||||
kind: TypeParam,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "quux",
|
||||
|
@ -18,6 +18,6 @@ expression: kind_completions
|
|||
delete: [44; 44),
|
||||
insert: "quux()$0",
|
||||
kind: Function,
|
||||
detail: "fn quux<T>()"
|
||||
}
|
||||
detail: "fn quux<T>()",
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.149424158Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.130778739Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,13 +10,13 @@ expression: kind_completions
|
|||
source_range: [46; 46),
|
||||
delete: [46; 46),
|
||||
insert: "T",
|
||||
kind: TypeParam
|
||||
kind: TypeParam,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "X",
|
||||
source_range: [46; 46),
|
||||
delete: [46; 46),
|
||||
insert: "X",
|
||||
kind: Struct
|
||||
}
|
||||
kind: Struct,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.224510370Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.156115632Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -11,7 +11,7 @@ expression: kind_completions
|
|||
delete: [53; 56),
|
||||
insert: "main()$0",
|
||||
kind: Function,
|
||||
detail: "fn main()"
|
||||
detail: "fn main()",
|
||||
},
|
||||
CompletionItem {
|
||||
label: "no_args",
|
||||
|
@ -19,6 +19,6 @@ expression: kind_completions
|
|||
delete: [53; 56),
|
||||
insert: "no_args()$0",
|
||||
kind: Function,
|
||||
detail: "fn no_args()"
|
||||
}
|
||||
detail: "fn no_args()",
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.267013140Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:44:10.916806744Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -11,7 +11,7 @@ expression: kind_completions
|
|||
delete: [72; 77),
|
||||
insert: "main()$0",
|
||||
kind: Function,
|
||||
detail: "fn main()"
|
||||
detail: "fn main()",
|
||||
},
|
||||
CompletionItem {
|
||||
label: "with_args",
|
||||
|
@ -19,6 +19,6 @@ expression: kind_completions
|
|||
delete: [72; 77),
|
||||
insert: "with_args($0)",
|
||||
kind: Function,
|
||||
detail: "fn with_args(x: i32, y: String)"
|
||||
}
|
||||
detail: "fn with_args(x: i32, y: String)",
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.303360770Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:44:40.543731193Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -11,6 +11,6 @@ expression: kind_completions
|
|||
delete: [139; 140),
|
||||
insert: "foo()$0",
|
||||
kind: Method,
|
||||
detail: "fn foo(&self)"
|
||||
}
|
||||
detail: "fn foo(&self)",
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:23.987788720Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.075690846Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,34 +10,34 @@ expression: kind_completions
|
|||
source_range: [41; 41),
|
||||
delete: [41; 41),
|
||||
insert: "if $0 {}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "loop",
|
||||
source_range: [41; 41),
|
||||
delete: [41; 41),
|
||||
insert: "loop {$0}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "match",
|
||||
source_range: [41; 41),
|
||||
delete: [41; 41),
|
||||
insert: "match $0 {}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "return",
|
||||
source_range: [41; 41),
|
||||
delete: [41; 41),
|
||||
insert: "return;",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "while",
|
||||
source_range: [41; 41),
|
||||
delete: [41; 41),
|
||||
insert: "while $0 {}",
|
||||
kind: Keyword
|
||||
}
|
||||
kind: Keyword,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:23.984740354Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.068799431Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,48 +10,48 @@ expression: kind_completions
|
|||
source_range: [92; 92),
|
||||
delete: [92; 92),
|
||||
insert: "else {$0}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "else if",
|
||||
source_range: [92; 92),
|
||||
delete: [92; 92),
|
||||
insert: "else if $0 {}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "if",
|
||||
source_range: [92; 92),
|
||||
delete: [92; 92),
|
||||
insert: "if $0 {}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "loop",
|
||||
source_range: [92; 92),
|
||||
delete: [92; 92),
|
||||
insert: "loop {$0}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "match",
|
||||
source_range: [92; 92),
|
||||
delete: [92; 92),
|
||||
insert: "match $0 {}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "return",
|
||||
source_range: [92; 92),
|
||||
delete: [92; 92),
|
||||
insert: "return;",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "while",
|
||||
source_range: [92; 92),
|
||||
delete: [92; 92),
|
||||
insert: "while $0 {}",
|
||||
kind: Keyword
|
||||
}
|
||||
kind: Keyword,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.049699338Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.085655258Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,34 +10,34 @@ expression: kind_completions
|
|||
source_range: [48; 48),
|
||||
delete: [48; 48),
|
||||
insert: "if $0 {}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "loop",
|
||||
source_range: [48; 48),
|
||||
delete: [48; 48),
|
||||
insert: "loop {$0}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "match",
|
||||
source_range: [48; 48),
|
||||
delete: [48; 48),
|
||||
insert: "match $0 {}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "return",
|
||||
source_range: [48; 48),
|
||||
delete: [48; 48),
|
||||
insert: "return $0;",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "while",
|
||||
source_range: [48; 48),
|
||||
delete: [48; 48),
|
||||
insert: "while $0 {}",
|
||||
kind: Keyword
|
||||
}
|
||||
kind: Keyword,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.090949782Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:44:10.869539856Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,34 +10,34 @@ expression: kind_completions
|
|||
source_range: [41; 41),
|
||||
delete: [41; 41),
|
||||
insert: "if $0 {}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "loop",
|
||||
source_range: [41; 41),
|
||||
delete: [41; 41),
|
||||
insert: "loop {$0}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "match",
|
||||
source_range: [41; 41),
|
||||
delete: [41; 41),
|
||||
insert: "match $0 {}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "return",
|
||||
source_range: [41; 41),
|
||||
delete: [41; 41),
|
||||
insert: "return;",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "while",
|
||||
source_range: [41; 41),
|
||||
delete: [41; 41),
|
||||
insert: "while $0 {}",
|
||||
kind: Keyword
|
||||
}
|
||||
kind: Keyword,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:23.988755424Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.066687241Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,20 +10,20 @@ expression: kind_completions
|
|||
source_range: [17; 17),
|
||||
delete: [17; 17),
|
||||
insert: "crate::",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "self",
|
||||
source_range: [17; 17),
|
||||
delete: [17; 17),
|
||||
insert: "self",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "super",
|
||||
source_range: [17; 17),
|
||||
delete: [17; 17),
|
||||
insert: "super::",
|
||||
kind: Keyword
|
||||
}
|
||||
kind: Keyword,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.030382527Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:44:10.859494330Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,13 +10,13 @@ expression: kind_completions
|
|||
source_range: [20; 20),
|
||||
delete: [20; 20),
|
||||
insert: "self",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "super",
|
||||
source_range: [20; 20),
|
||||
delete: [20; 20),
|
||||
insert: "super::",
|
||||
kind: Keyword
|
||||
}
|
||||
kind: Keyword,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.073607133Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:44:40.506690279Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,13 +10,13 @@ expression: kind_completions
|
|||
source_range: [24; 24),
|
||||
delete: [24; 24),
|
||||
insert: "self",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "super",
|
||||
source_range: [24; 24),
|
||||
delete: [24; 24),
|
||||
insert: "super::",
|
||||
kind: Keyword
|
||||
}
|
||||
kind: Keyword,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:23.989188654Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.082403612Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,34 +10,34 @@ expression: kind_completions
|
|||
source_range: [83; 83),
|
||||
delete: [83; 83),
|
||||
insert: "if $0 {}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "loop",
|
||||
source_range: [83; 83),
|
||||
delete: [83; 83),
|
||||
insert: "loop {$0}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "match",
|
||||
source_range: [83; 83),
|
||||
delete: [83; 83),
|
||||
insert: "match $0 {}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "return",
|
||||
source_range: [83; 83),
|
||||
delete: [83; 83),
|
||||
insert: "return $0;",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "while",
|
||||
source_range: [83; 83),
|
||||
delete: [83; 83),
|
||||
insert: "while $0 {}",
|
||||
kind: Keyword
|
||||
}
|
||||
kind: Keyword,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.036383875Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:44:10.871868390Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,34 +10,34 @@ expression: kind_completions
|
|||
source_range: [83; 83),
|
||||
delete: [83; 83),
|
||||
insert: "if $0 {}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "loop",
|
||||
source_range: [83; 83),
|
||||
delete: [83; 83),
|
||||
insert: "loop {$0}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "match",
|
||||
source_range: [83; 83),
|
||||
delete: [83; 83),
|
||||
insert: "match $0 {}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "return",
|
||||
source_range: [83; 83),
|
||||
delete: [83; 83),
|
||||
insert: "return $0;",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "while",
|
||||
source_range: [83; 83),
|
||||
delete: [83; 83),
|
||||
insert: "while $0 {}",
|
||||
kind: Keyword
|
||||
}
|
||||
kind: Keyword,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.066918191Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.093689514Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -12,7 +12,7 @@ expression: kind_completions
|
|||
insert: "my",
|
||||
kind: Module,
|
||||
documentation: Documentation(
|
||||
"Some simple\ndocs describing `mod my`."
|
||||
)
|
||||
}
|
||||
"Some simple\ndocs describing `mod my`.",
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.161888678Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.133106898Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,14 +10,14 @@ expression: kind_completions
|
|||
source_range: [89; 89),
|
||||
delete: [89; 89),
|
||||
insert: "Baz",
|
||||
kind: Enum
|
||||
kind: Enum,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "Foo",
|
||||
source_range: [89; 89),
|
||||
delete: [89; 89),
|
||||
insert: "Foo",
|
||||
kind: Struct
|
||||
kind: Struct,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "quux",
|
||||
|
@ -25,6 +25,6 @@ expression: kind_completions
|
|||
delete: [89; 89),
|
||||
insert: "quux()$0",
|
||||
kind: Function,
|
||||
detail: "fn quux()"
|
||||
}
|
||||
detail: "fn quux()",
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.180517419Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.134417551Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,7 +10,7 @@ expression: kind_completions
|
|||
source_range: [101; 101),
|
||||
delete: [101; 101),
|
||||
insert: "Bar",
|
||||
kind: Struct
|
||||
kind: Struct,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "quux",
|
||||
|
@ -18,6 +18,6 @@ expression: kind_completions
|
|||
delete: [101; 101),
|
||||
insert: "quux()$0",
|
||||
kind: Function,
|
||||
detail: "fn quux()"
|
||||
}
|
||||
detail: "fn quux()",
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.085605313Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.099358768Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,13 +10,13 @@ expression: kind_completions
|
|||
source_range: [12; 14),
|
||||
delete: [12; 14),
|
||||
insert: "Spam",
|
||||
kind: Struct
|
||||
kind: Struct,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "foo",
|
||||
source_range: [12; 14),
|
||||
delete: [12; 14),
|
||||
insert: "foo",
|
||||
kind: Module
|
||||
}
|
||||
kind: Module,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:23.999953358Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.085365816Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,48 +10,48 @@ expression: kind_completions
|
|||
source_range: [106; 108),
|
||||
delete: [106; 108),
|
||||
insert: "break",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "continue",
|
||||
source_range: [106; 108),
|
||||
delete: [106; 108),
|
||||
insert: "continue",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "if",
|
||||
source_range: [106; 108),
|
||||
delete: [106; 108),
|
||||
insert: "if $0 {}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "loop",
|
||||
source_range: [106; 108),
|
||||
delete: [106; 108),
|
||||
insert: "loop {$0}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "match",
|
||||
source_range: [106; 108),
|
||||
delete: [106; 108),
|
||||
insert: "match $0 {}",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "return",
|
||||
source_range: [106; 108),
|
||||
delete: [106; 108),
|
||||
insert: "return",
|
||||
kind: Keyword
|
||||
kind: Keyword,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "while",
|
||||
source_range: [106; 108),
|
||||
delete: [106; 108),
|
||||
insert: "while $0 {}",
|
||||
kind: Keyword
|
||||
}
|
||||
kind: Keyword,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-04-22T07:37:13.981826301Z"
|
||||
creator: insta@0.7.4
|
||||
created: "2019-05-23T22:23:35.118738523Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,48 +10,48 @@ expression: kind_completions
|
|||
source_range: [76; 76),
|
||||
delete: [72; 76),
|
||||
insert: "dbg!(bar)",
|
||||
detail: "dbg!(expr)"
|
||||
detail: "dbg!(expr)",
|
||||
},
|
||||
CompletionItem {
|
||||
label: "if",
|
||||
source_range: [76; 76),
|
||||
delete: [72; 76),
|
||||
insert: "if bar {$0}",
|
||||
detail: "if expr {}"
|
||||
detail: "if expr {}",
|
||||
},
|
||||
CompletionItem {
|
||||
label: "match",
|
||||
source_range: [76; 76),
|
||||
delete: [72; 76),
|
||||
insert: "match bar {\n ${1:_} => {$0\\},\n}",
|
||||
detail: "match expr {}"
|
||||
detail: "match expr {}",
|
||||
},
|
||||
CompletionItem {
|
||||
label: "not",
|
||||
source_range: [76; 76),
|
||||
delete: [72; 76),
|
||||
insert: "!bar",
|
||||
detail: "!expr"
|
||||
detail: "!expr",
|
||||
},
|
||||
CompletionItem {
|
||||
label: "ref",
|
||||
source_range: [76; 76),
|
||||
delete: [72; 76),
|
||||
insert: "&bar",
|
||||
detail: "&expr"
|
||||
detail: "&expr",
|
||||
},
|
||||
CompletionItem {
|
||||
label: "refm",
|
||||
source_range: [76; 76),
|
||||
delete: [72; 76),
|
||||
insert: "&mut bar",
|
||||
detail: "&mut expr"
|
||||
detail: "&mut expr",
|
||||
},
|
||||
CompletionItem {
|
||||
label: "while",
|
||||
source_range: [76; 76),
|
||||
delete: [72; 76),
|
||||
insert: "while bar {\n$0\n}",
|
||||
detail: "while expr {}"
|
||||
}
|
||||
detail: "while expr {}",
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-04-04T14:52:24.525395600Z"
|
||||
creator: insta@0.7.4
|
||||
created: "2019-05-23T22:23:35.140648630Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,7 +10,7 @@ expression: kind_completions
|
|||
source_range: [47; 47),
|
||||
delete: [47; 47),
|
||||
insert: "Foo",
|
||||
kind: Struct
|
||||
kind: Struct,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "x",
|
||||
|
@ -18,6 +18,6 @@ expression: kind_completions
|
|||
delete: [47; 47),
|
||||
insert: "x()$0",
|
||||
kind: Function,
|
||||
detail: "fn x()"
|
||||
}
|
||||
detail: "fn x()",
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.174038680Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.141900902Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,13 +10,13 @@ expression: kind_completions
|
|||
source_range: [25; 25),
|
||||
delete: [25; 25),
|
||||
insert: "Self",
|
||||
kind: TypeParam
|
||||
kind: TypeParam,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "self",
|
||||
source_range: [25; 25),
|
||||
delete: [25; 25),
|
||||
insert: "self",
|
||||
kind: Binding
|
||||
}
|
||||
kind: Binding,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.191576723Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.141901047Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,13 +10,13 @@ expression: kind_completions
|
|||
source_range: [17; 17),
|
||||
delete: [17; 17),
|
||||
insert: "eprintln!(\"$0 = {:?}\", $0);",
|
||||
kind: Snippet
|
||||
kind: Snippet,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "ppd",
|
||||
source_range: [17; 17),
|
||||
delete: [17; 17),
|
||||
insert: "eprintln!(\"$0 = {:#?}\", $0);",
|
||||
kind: Snippet
|
||||
}
|
||||
kind: Snippet,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.187670733Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.149234118Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -11,13 +11,13 @@ expression: kind_completions
|
|||
delete: [66; 66),
|
||||
insert: "#[test]\nfn ${1:feature}() {\n $0\n}",
|
||||
kind: Snippet,
|
||||
lookup: "tfn"
|
||||
lookup: "tfn",
|
||||
},
|
||||
CompletionItem {
|
||||
label: "pub(crate)",
|
||||
source_range: [66; 66),
|
||||
delete: [66; 66),
|
||||
insert: "pub(crate) $0",
|
||||
kind: Snippet
|
||||
}
|
||||
kind: Snippet,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.093406123Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.101474826Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -13,7 +13,7 @@ expression: kind_completions
|
|||
kind: Const,
|
||||
detail: "const C: i32 = 42;",
|
||||
documentation: Documentation(
|
||||
"An associated const"
|
||||
)
|
||||
}
|
||||
"An associated const",
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-24T16:33:47.990111169Z"
|
||||
creator: insta@0.6.3
|
||||
created: "2019-05-23T22:23:35.102351365Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -13,7 +13,7 @@ expression: kind_completions
|
|||
kind: Function,
|
||||
detail: "fn m()",
|
||||
documentation: Documentation(
|
||||
"An associated method"
|
||||
)
|
||||
}
|
||||
"An associated method",
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.090876030Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.105188762Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -13,7 +13,7 @@ expression: kind_completions
|
|||
kind: TypeAlias,
|
||||
detail: "type T = i32;",
|
||||
documentation: Documentation(
|
||||
"An associated type"
|
||||
)
|
||||
}
|
||||
"An associated type",
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.098574884Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.105336210Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,13 +10,13 @@ expression: kind_completions
|
|||
source_range: [11; 13),
|
||||
delete: [11; 13),
|
||||
insert: "Spam",
|
||||
kind: Struct
|
||||
kind: Struct,
|
||||
},
|
||||
CompletionItem {
|
||||
label: "foo",
|
||||
source_range: [11; 13),
|
||||
delete: [11; 13),
|
||||
insert: "foo",
|
||||
kind: Module
|
||||
}
|
||||
kind: Module,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-02-18T09:22:24.102063333Z"
|
||||
creator: insta@0.6.2
|
||||
created: "2019-05-23T22:23:35.106923266Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
---
|
||||
|
@ -10,6 +10,6 @@ expression: kind_completions
|
|||
source_range: [26; 26),
|
||||
delete: [26; 26),
|
||||
insert: "Bar",
|
||||
kind: Struct
|
||||
}
|
||||
kind: Struct,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -310,28 +310,30 @@ mod tests {
|
|||
fn test_unresolved_module_diagnostic() {
|
||||
let (analysis, file_id) = single_file("mod foo;");
|
||||
let diagnostics = analysis.diagnostics(file_id).unwrap();
|
||||
assert_debug_snapshot_matches!(diagnostics, @r####"[
|
||||
Diagnostic {
|
||||
message: "unresolved module",
|
||||
range: [0; 8),
|
||||
fix: Some(
|
||||
SourceChange {
|
||||
label: "create module",
|
||||
source_file_edits: [],
|
||||
file_system_edits: [
|
||||
CreateFile {
|
||||
source_root: SourceRootId(
|
||||
0
|
||||
),
|
||||
path: "foo.rs"
|
||||
}
|
||||
],
|
||||
cursor_position: None
|
||||
}
|
||||
),
|
||||
severity: Error
|
||||
}
|
||||
]"####);
|
||||
assert_debug_snapshot_matches!(diagnostics, @r###"
|
||||
⋮[
|
||||
⋮ Diagnostic {
|
||||
⋮ message: "unresolved module",
|
||||
⋮ range: [0; 8),
|
||||
⋮ fix: Some(
|
||||
⋮ SourceChange {
|
||||
⋮ label: "create module",
|
||||
⋮ source_file_edits: [],
|
||||
⋮ file_system_edits: [
|
||||
⋮ CreateFile {
|
||||
⋮ source_root: SourceRootId(
|
||||
⋮ 0,
|
||||
⋮ ),
|
||||
⋮ path: "foo.rs",
|
||||
⋮ },
|
||||
⋮ ],
|
||||
⋮ cursor_position: None,
|
||||
⋮ },
|
||||
⋮ ),
|
||||
⋮ severity: Error,
|
||||
⋮ },
|
||||
⋮]
|
||||
"###);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
created: "2019-04-08T09:44:50.196004400Z"
|
||||
creator: insta@0.7.4
|
||||
created: "2019-05-23T22:23:35.168422050Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/display/structure.rs
|
||||
expression: structure
|
||||
---
|
||||
|
@ -12,20 +12,20 @@ expression: structure
|
|||
node_range: [1; 26),
|
||||
kind: STRUCT_DEF,
|
||||
detail: None,
|
||||
deprecated: false
|
||||
deprecated: false,
|
||||
},
|
||||
StructureNode {
|
||||
parent: Some(
|
||||
0
|
||||
0,
|
||||
),
|
||||
label: "x",
|
||||
navigation_range: [18; 19),
|
||||
node_range: [18; 24),
|
||||
kind: NAMED_FIELD_DEF,
|
||||
detail: Some(
|
||||
"i32"
|
||||
"i32",
|
||||
),
|
||||
deprecated: false
|
||||
deprecated: false,
|
||||
},
|
||||
StructureNode {
|
||||
parent: None,
|
||||
|
@ -34,46 +34,46 @@ expression: structure
|
|||
node_range: [28; 158),
|
||||
kind: MODULE,
|
||||
detail: None,
|
||||
deprecated: false
|
||||
deprecated: false,
|
||||
},
|
||||
StructureNode {
|
||||
parent: Some(
|
||||
2
|
||||
2,
|
||||
),
|
||||
label: "bar1",
|
||||
navigation_range: [43; 47),
|
||||
node_range: [40; 52),
|
||||
kind: FN_DEF,
|
||||
detail: Some(
|
||||
"fn()"
|
||||
"fn()",
|
||||
),
|
||||
deprecated: false
|
||||
deprecated: false,
|
||||
},
|
||||
StructureNode {
|
||||
parent: Some(
|
||||
2
|
||||
2,
|
||||
),
|
||||
label: "bar2",
|
||||
navigation_range: [60; 64),
|
||||
node_range: [57; 81),
|
||||
kind: FN_DEF,
|
||||
detail: Some(
|
||||
"fn<T>(t: T) -> T"
|
||||
"fn<T>(t: T) -> T",
|
||||
),
|
||||
deprecated: false
|
||||
deprecated: false,
|
||||
},
|
||||
StructureNode {
|
||||
parent: Some(
|
||||
2
|
||||
2,
|
||||
),
|
||||
label: "bar3",
|
||||
navigation_range: [89; 93),
|
||||
node_range: [86; 156),
|
||||
kind: FN_DEF,
|
||||
detail: Some(
|
||||
"fn<A, B>(a: A, b: B) -> Vec< u32 >"
|
||||
"fn<A, B>(a: A, b: B) -> Vec< u32 >",
|
||||
),
|
||||
deprecated: false
|
||||
deprecated: false,
|
||||
},
|
||||
StructureNode {
|
||||
parent: None,
|
||||
|
@ -82,29 +82,29 @@ expression: structure
|
|||
node_range: [160; 180),
|
||||
kind: ENUM_DEF,
|
||||
detail: None,
|
||||
deprecated: false
|
||||
deprecated: false,
|
||||
},
|
||||
StructureNode {
|
||||
parent: Some(
|
||||
6
|
||||
6,
|
||||
),
|
||||
label: "X",
|
||||
navigation_range: [169; 170),
|
||||
node_range: [169; 170),
|
||||
kind: ENUM_VARIANT,
|
||||
detail: None,
|
||||
deprecated: false
|
||||
deprecated: false,
|
||||
},
|
||||
StructureNode {
|
||||
parent: Some(
|
||||
6
|
||||
6,
|
||||
),
|
||||
label: "Y",
|
||||
navigation_range: [172; 173),
|
||||
node_range: [172; 178),
|
||||
kind: ENUM_VARIANT,
|
||||
detail: None,
|
||||
deprecated: false
|
||||
deprecated: false,
|
||||
},
|
||||
StructureNode {
|
||||
parent: None,
|
||||
|
@ -113,9 +113,9 @@ expression: structure
|
|||
node_range: [181; 193),
|
||||
kind: TYPE_ALIAS_DEF,
|
||||
detail: Some(
|
||||
"()"
|
||||
"()",
|
||||
),
|
||||
deprecated: false
|
||||
deprecated: false,
|
||||
},
|
||||
StructureNode {
|
||||
parent: None,
|
||||
|
@ -124,9 +124,9 @@ expression: structure
|
|||
node_range: [194; 213),
|
||||
kind: STATIC_DEF,
|
||||
detail: Some(
|
||||
"i32"
|
||||
"i32",
|
||||
),
|
||||
deprecated: false
|
||||
deprecated: false,
|
||||
},
|
||||
StructureNode {
|
||||
parent: None,
|
||||
|
@ -135,9 +135,9 @@ expression: structure
|
|||
node_range: [214; 232),
|
||||
kind: CONST_DEF,
|
||||
detail: Some(
|
||||
"i32"
|
||||
"i32",
|
||||
),
|
||||
deprecated: false
|
||||
deprecated: false,
|
||||
},
|
||||
StructureNode {
|
||||
parent: None,
|
||||
|
@ -146,7 +146,7 @@ expression: structure
|
|||
node_range: [234; 243),
|
||||
kind: IMPL_BLOCK,
|
||||
detail: None,
|
||||
deprecated: false
|
||||
deprecated: false,
|
||||
},
|
||||
StructureNode {
|
||||
parent: None,
|
||||
|
@ -155,7 +155,7 @@ expression: structure
|
|||
node_range: [245; 269),
|
||||
kind: IMPL_BLOCK,
|
||||
detail: None,
|
||||
deprecated: false
|
||||
deprecated: false,
|
||||
},
|
||||
StructureNode {
|
||||
parent: None,
|
||||
|
@ -164,9 +164,9 @@ expression: structure
|
|||
node_range: [271; 301),
|
||||
kind: FN_DEF,
|
||||
detail: Some(
|
||||
"fn()"
|
||||
"fn()",
|
||||
),
|
||||
deprecated: true
|
||||
deprecated: true,
|
||||
},
|
||||
StructureNode {
|
||||
parent: None,
|
||||
|
@ -175,8 +175,8 @@ expression: structure
|
|||
node_range: [303; 359),
|
||||
kind: FN_DEF,
|
||||
detail: Some(
|
||||
"fn()"
|
||||
"fn()",
|
||||
),
|
||||
deprecated: true
|
||||
}
|
||||
deprecated: true,
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
created: "2019-05-23T12:10:32.628883358Z"
|
||||
created: "2019-05-23T22:23:35.242742395Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/syntax_highlighting.rs
|
||||
expression: result
|
||||
|
@ -8,139 +8,139 @@ Ok(
|
|||
[
|
||||
HighlightedRange {
|
||||
range: [1; 24),
|
||||
tag: "attribute"
|
||||
tag: "attribute",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [25; 31),
|
||||
tag: "keyword"
|
||||
tag: "keyword",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [32; 35),
|
||||
tag: "function"
|
||||
tag: "function",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [42; 45),
|
||||
tag: "keyword"
|
||||
tag: "keyword",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [46; 47),
|
||||
tag: "function"
|
||||
tag: "function",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [49; 52),
|
||||
tag: "text"
|
||||
tag: "text",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [58; 61),
|
||||
tag: "keyword"
|
||||
tag: "keyword",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [62; 63),
|
||||
tag: "function"
|
||||
tag: "function",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [65; 68),
|
||||
tag: "text"
|
||||
tag: "text",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [73; 75),
|
||||
tag: "keyword"
|
||||
tag: "keyword",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [76; 79),
|
||||
tag: "function"
|
||||
tag: "function",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [80; 81),
|
||||
tag: "type"
|
||||
tag: "type",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [80; 81),
|
||||
tag: "function"
|
||||
tag: "function",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [88; 89),
|
||||
tag: "type"
|
||||
tag: "type",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [96; 110),
|
||||
tag: "macro"
|
||||
tag: "macro",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [117; 127),
|
||||
tag: "comment"
|
||||
tag: "comment",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [128; 130),
|
||||
tag: "keyword"
|
||||
tag: "keyword",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [131; 135),
|
||||
tag: "function"
|
||||
tag: "function",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [145; 153),
|
||||
tag: "macro"
|
||||
tag: "macro",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [154; 166),
|
||||
tag: "string"
|
||||
tag: "string",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [168; 170),
|
||||
tag: "literal"
|
||||
tag: "literal",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [178; 181),
|
||||
tag: "keyword"
|
||||
tag: "keyword",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [182; 185),
|
||||
tag: "keyword"
|
||||
tag: "keyword",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [186; 189),
|
||||
tag: "macro"
|
||||
tag: "macro",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [197; 200),
|
||||
tag: "macro"
|
||||
tag: "macro",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [192; 195),
|
||||
tag: "text"
|
||||
tag: "text",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [208; 211),
|
||||
tag: "macro"
|
||||
tag: "macro",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [212; 216),
|
||||
tag: "macro"
|
||||
tag: "macro",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [226; 227),
|
||||
tag: "literal"
|
||||
tag: "literal",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [232; 233),
|
||||
tag: "literal"
|
||||
tag: "literal",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [242; 248),
|
||||
tag: "keyword.unsafe"
|
||||
tag: "keyword.unsafe",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [251; 254),
|
||||
tag: "text"
|
||||
tag: "text",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [255; 262),
|
||||
tag: "text"
|
||||
tag: "text",
|
||||
},
|
||||
HighlightedRange {
|
||||
range: [263; 264),
|
||||
tag: "literal"
|
||||
}
|
||||
]
|
||||
tag: "literal",
|
||||
},
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
created: "2019-01-24T08:39:53.759318522+00:00"
|
||||
creator: insta@0.5.2
|
||||
created: "2019-05-23T22:23:35.215905447Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/references.rs
|
||||
expression: "&source_change"
|
||||
source: crates/ra_ide_api/src/rename.rs
|
||||
---
|
||||
Some(
|
||||
SourceChange {
|
||||
|
@ -10,29 +10,29 @@ Some(
|
|||
source_file_edits: [
|
||||
SourceFileEdit {
|
||||
file_id: FileId(
|
||||
2
|
||||
2,
|
||||
),
|
||||
edit: TextEdit {
|
||||
atoms: [
|
||||
AtomTextEdit {
|
||||
delete: [4; 7),
|
||||
insert: "foo2"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
insert: "foo2",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
file_system_edits: [
|
||||
MoveFile {
|
||||
src: FileId(
|
||||
3
|
||||
3,
|
||||
),
|
||||
dst_source_root: SourceRootId(
|
||||
0
|
||||
0,
|
||||
),
|
||||
dst_path: "bar/foo2.rs"
|
||||
}
|
||||
dst_path: "bar/foo2.rs",
|
||||
},
|
||||
],
|
||||
cursor_position: None
|
||||
}
|
||||
cursor_position: None,
|
||||
},
|
||||
)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
created: "2019-01-22T14:45:00.975229300+00:00"
|
||||
creator: insta@0.4.0
|
||||
created: "2019-05-23T22:23:35.213830371Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/references.rs
|
||||
expression: "&source_change"
|
||||
source: "crates\\ra_ide_api\\src\\rename.rs"
|
||||
---
|
||||
Some(
|
||||
SourceChange {
|
||||
|
@ -10,29 +10,29 @@ Some(
|
|||
source_file_edits: [
|
||||
SourceFileEdit {
|
||||
file_id: FileId(
|
||||
1
|
||||
1,
|
||||
),
|
||||
edit: TextEdit {
|
||||
atoms: [
|
||||
AtomTextEdit {
|
||||
delete: [4; 7),
|
||||
insert: "foo2"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
insert: "foo2",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
file_system_edits: [
|
||||
MoveFile {
|
||||
src: FileId(
|
||||
2
|
||||
2,
|
||||
),
|
||||
dst_source_root: SourceRootId(
|
||||
0
|
||||
0,
|
||||
),
|
||||
dst_path: "foo2/mod.rs"
|
||||
}
|
||||
dst_path: "foo2/mod.rs",
|
||||
},
|
||||
],
|
||||
cursor_position: None
|
||||
}
|
||||
cursor_position: None,
|
||||
},
|
||||
)
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
---
|
||||
created: "2019-01-22T14:45:00.975229300+00:00"
|
||||
creator: insta@0.4.0
|
||||
created: "2019-05-23T22:23:35.217100106Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/runnables.rs
|
||||
expression: "&runnables"
|
||||
source: "crates\\ra_ide_api\\src\\runnables.rs"
|
||||
---
|
||||
[
|
||||
Runnable {
|
||||
range: [1; 21),
|
||||
kind: Bin
|
||||
kind: Bin,
|
||||
},
|
||||
Runnable {
|
||||
range: [22; 46),
|
||||
kind: Test {
|
||||
name: "test_foo"
|
||||
}
|
||||
name: "test_foo",
|
||||
},
|
||||
},
|
||||
Runnable {
|
||||
range: [47; 81),
|
||||
kind: Test {
|
||||
name: "test_foo"
|
||||
}
|
||||
}
|
||||
name: "test_foo",
|
||||
},
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
---
|
||||
created: "2019-01-22T14:45:00.976230700+00:00"
|
||||
creator: insta@0.4.0
|
||||
created: "2019-05-23T22:23:35.219258850Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/runnables.rs
|
||||
expression: "&runnables"
|
||||
source: "crates\\ra_ide_api\\src\\runnables.rs"
|
||||
---
|
||||
[
|
||||
Runnable {
|
||||
range: [1; 59),
|
||||
kind: TestMod {
|
||||
path: "test_mod"
|
||||
}
|
||||
path: "test_mod",
|
||||
},
|
||||
},
|
||||
Runnable {
|
||||
range: [28; 57),
|
||||
kind: Test {
|
||||
name: "test_foo1"
|
||||
}
|
||||
}
|
||||
name: "test_foo1",
|
||||
},
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
---
|
||||
created: "2019-01-22T14:45:00.979218100+00:00"
|
||||
creator: insta@0.4.0
|
||||
created: "2019-05-23T22:23:35.219671663Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/runnables.rs
|
||||
expression: "&runnables"
|
||||
source: "crates\\ra_ide_api\\src\\runnables.rs"
|
||||
---
|
||||
[
|
||||
Runnable {
|
||||
range: [41; 115),
|
||||
kind: TestMod {
|
||||
path: "foo::bar::test_mod"
|
||||
}
|
||||
path: "foo::bar::test_mod",
|
||||
},
|
||||
},
|
||||
Runnable {
|
||||
range: [68; 105),
|
||||
kind: Test {
|
||||
name: "test_foo1"
|
||||
}
|
||||
}
|
||||
name: "test_foo1",
|
||||
},
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
---
|
||||
created: "2019-01-22T14:45:01.016119500+00:00"
|
||||
creator: insta@0.4.0
|
||||
created: "2019-05-23T22:23:35.224315047Z"
|
||||
creator: insta@0.8.1
|
||||
source: crates/ra_ide_api/src/runnables.rs
|
||||
expression: "&runnables"
|
||||
source: "crates\\ra_ide_api\\src\\runnables.rs"
|
||||
---
|
||||
[
|
||||
Runnable {
|
||||
range: [23; 85),
|
||||
kind: TestMod {
|
||||
path: "foo::test_mod"
|
||||
}
|
||||
path: "foo::test_mod",
|
||||
},
|
||||
},
|
||||
Runnable {
|
||||
range: [46; 79),
|
||||
kind: Test {
|
||||
name: "test_foo1"
|
||||
}
|
||||
}
|
||||
name: "test_foo1",
|
||||
},
|
||||
},
|
||||
]
|
||||
|
|
|
@ -103,7 +103,7 @@ pub(super) fn maybe_item(p: &mut Parser, m: Marker, flavor: ItemFlavor) -> Resul
|
|||
p.bump_remap(T![auto]);
|
||||
has_mods = true;
|
||||
}
|
||||
if p.at(IDENT) && p.at_contextual_kw("default") && p.nth(1) == T![impl ] {
|
||||
if p.at(IDENT) && p.at_contextual_kw("default") && p.nth(1) == T![impl] {
|
||||
p.bump_remap(T![default]);
|
||||
has_mods = true;
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ pub(super) fn maybe_item(p: &mut Parser, m: Marker, flavor: ItemFlavor) -> Resul
|
|||
|
||||
// test unsafe_default_impl
|
||||
// unsafe default impl Foo {}
|
||||
T![impl ] => {
|
||||
T![impl] => {
|
||||
traits::impl_block(p);
|
||||
m.complete(p, IMPL_BLOCK);
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ pub(crate) fn trait_item_list(p: &mut Parser) {
|
|||
// test impl_block
|
||||
// impl Foo {}
|
||||
pub(super) fn impl_block(p: &mut Parser) {
|
||||
assert!(p.at(T![impl ]));
|
||||
assert!(p.at(T![impl]));
|
||||
p.bump();
|
||||
if choose_type_params_over_qpath(p) {
|
||||
type_params::opt_type_param_list(p);
|
||||
|
@ -130,7 +130,7 @@ fn choose_type_params_over_qpath(p: &Parser) -> bool {
|
|||
// impl impl NotType {}
|
||||
// impl Trait2 for impl NotType {}
|
||||
pub(crate) fn impl_type(p: &mut Parser) {
|
||||
if p.at(T![impl ]) {
|
||||
if p.at(T![impl]) {
|
||||
p.error("expected trait or type");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -150,7 +150,7 @@ pub(super) fn opt_where_clause(p: &mut Parser) {
|
|||
fn is_where_predicate(p: &mut Parser) -> bool {
|
||||
match p.current() {
|
||||
LIFETIME => true,
|
||||
T![impl ] => false,
|
||||
T![impl] => false,
|
||||
token => types::TYPE_FIRST.contains(token),
|
||||
}
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ fn where_predicate(p: &mut Parser) {
|
|||
p.error("expected colon");
|
||||
}
|
||||
}
|
||||
T![impl ] => {
|
||||
T![impl] => {
|
||||
p.error("expected lifetime or type");
|
||||
}
|
||||
_ => {
|
||||
|
|
|
@ -25,7 +25,7 @@ fn type_with_bounds_cond(p: &mut Parser, allow_bounds: bool) {
|
|||
T![_] => placeholder_type(p),
|
||||
T![fn] | T![unsafe] | T![extern] => fn_pointer_type(p),
|
||||
T![for] => for_type(p),
|
||||
T![impl ] => impl_trait_type(p),
|
||||
T![impl] => impl_trait_type(p),
|
||||
T![dyn ] => dyn_trait_type(p),
|
||||
// Some path types are not allowed to have bounds (no plus)
|
||||
T![<] => path_type_(p, allow_bounds),
|
||||
|
@ -221,7 +221,7 @@ pub(super) fn for_type(p: &mut Parser) {
|
|||
// test impl_trait_type
|
||||
// type A = impl Iterator<Item=Foo<'a>> + 'a;
|
||||
fn impl_trait_type(p: &mut Parser) {
|
||||
assert!(p.at(T![impl ]));
|
||||
assert!(p.at(T![impl]));
|
||||
let m = p.start();
|
||||
p.bump();
|
||||
type_params::bounds_without_colon(p);
|
||||
|
|
Loading…
Reference in a new issue