Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_expand/src/lib.rs')
-rw-r--r--crates/hir_expand/src/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir_expand/src/lib.rs b/crates/hir_expand/src/lib.rs
index a1b1e943f1..51899ca2f6 100644
--- a/crates/hir_expand/src/lib.rs
+++ b/crates/hir_expand/src/lib.rs
@@ -205,7 +205,7 @@ impl HirFileId {
.to_node(db)
.doc_comments_and_attrs()
.nth(invoc_attr_index as usize)
- .and_then(Either::right)?
+ .and_then(Either::left)?
.token_tree()?;
Some(InFile::new(ast_id.file_id, tt))
}
@@ -382,7 +382,7 @@ impl MacroCallKind {
.doc_comments_and_attrs()
.nth(derive_attr_index as usize)
.expect("missing derive")
- .expect_right("derive is a doc comment?")
+ .expect_left("derive is a doc comment?")
.syntax()
.text_range()
}
@@ -391,7 +391,7 @@ impl MacroCallKind {
.doc_comments_and_attrs()
.nth(invoc_attr_index as usize)
.expect("missing attribute")
- .expect_right("attribute macro is a doc comment?")
+ .expect_left("attribute macro is a doc comment?")
.syntax()
.text_range(),
};
@@ -483,7 +483,7 @@ impl ExpansionInfo {
let attr = item
.doc_comments_and_attrs()
.nth(*invoc_attr_index as usize)
- .and_then(Either::right)?;
+ .and_then(Either::left)?;
match attr.token_tree() {
Some(token_tree)
if token_tree.syntax().text_range().contains_range(token_range) =>