aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/data.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-12-01 12:27:52 +0000
committerGitHub <[email protected]>2020-12-01 12:27:52 +0000
commiteb7f96951068bd8f8672a8234aa55b2a69d912b0 (patch)
tree30e949b7972420131a4367369c38b3bf2c5f66fa /crates/hir_def/src/data.rs
parent75e037fcf75691a3a87d0cb37ea660dd7105ffba (diff)
parentea7b81fef990e281b4b958cff7357544076d4b15 (diff)
Merge #6683
6683: Emit macro diagnostics when lowering bodies r=matklad a=jonas-schievink Changes `Expander::enter_expand` to return an `ExpandResult`, and adds any contained errors to the body diagnostic list. Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/hir_def/src/data.rs')
-rw-r--r--crates/hir_def/src/data.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_def/src/data.rs b/crates/hir_def/src/data.rs
index ff1ef0df6..146045938 100644
--- a/crates/hir_def/src/data.rs
+++ b/crates/hir_def/src/data.rs
@@ -257,7 +257,7 @@ fn collect_items(
257 let root = db.parse_or_expand(file_id).unwrap(); 257 let root = db.parse_or_expand(file_id).unwrap();
258 let call = ast_id_map.get(call.ast_id).to_node(&root); 258 let call = ast_id_map.get(call.ast_id).to_node(&root);
259 259
260 if let Some((mark, mac)) = expander.enter_expand(db, None, call) { 260 if let Some((mark, mac)) = expander.enter_expand(db, None, call).value {
261 let src: InFile<ast::MacroItems> = expander.to_source(mac); 261 let src: InFile<ast::MacroItems> = expander.to_source(mac);
262 let item_tree = db.item_tree(src.file_id); 262 let item_tree = db.item_tree(src.file_id);
263 let iter = 263 let iter =