mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +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 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;
|
||||
}
|
||||
|
||||
|
@ -265,6 +265,19 @@ fn main() {
|
|||
// <|> me
|
||||
let x = 1 + 1;
|
||||
}
|
||||
",
|
||||
);
|
||||
do_check(
|
||||
r"
|
||||
///<|> Some docs
|
||||
fn foo() {
|
||||
}
|
||||
",
|
||||
r"
|
||||
///
|
||||
/// <|> Some docs
|
||||
fn foo() {
|
||||
}
|
||||
",
|
||||
);
|
||||
do_check_noop(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue