mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer
This commit is contained in:
commit
bf99a6eb08
1 changed files with 14 additions and 1 deletions
|
@ -42,7 +42,7 @@ pub(crate) fn on_enter(db: &RootDatabase, position: FilePosition) -> Option<Sour
|
||||||
|
|
||||||
let prefix = comment.prefix();
|
let prefix = comment.prefix();
|
||||||
let comment_range = comment.syntax().text_range();
|
let comment_range = comment.syntax().text_range();
|
||||||
if position.offset < comment_range.start() + TextUnit::of_str(prefix) + TextUnit::from(1) {
|
if position.offset < comment_range.start() + TextUnit::of_str(prefix) {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -265,6 +265,19 @@ fn main() {
|
||||||
// <|> me
|
// <|> me
|
||||||
let x = 1 + 1;
|
let x = 1 + 1;
|
||||||
}
|
}
|
||||||
|
",
|
||||||
|
);
|
||||||
|
do_check(
|
||||||
|
r"
|
||||||
|
///<|> Some docs
|
||||||
|
fn foo() {
|
||||||
|
}
|
||||||
|
",
|
||||||
|
r"
|
||||||
|
///
|
||||||
|
/// <|> Some docs
|
||||||
|
fn foo() {
|
||||||
|
}
|
||||||
",
|
",
|
||||||
);
|
);
|
||||||
do_check_noop(
|
do_check_noop(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue