From 513a3615f6d462852c0135dc4ac30a2086e25c5a Mon Sep 17 00:00:00 2001 From: John Renner Date: Thu, 30 Apr 2020 10:41:24 -0700 Subject: Report invalid, nested, multi-segment crate-paths Specifically, things like: use foo::{crate::bar}; Are now being caught, when before we only caught: use foo::{crate}; --- crates/ra_parser/src/grammar/items/use_item.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_parser/src') diff --git a/crates/ra_parser/src/grammar/items/use_item.rs b/crates/ra_parser/src/grammar/items/use_item.rs index e3b991c8c..3a0c7a31a 100644 --- a/crates/ra_parser/src/grammar/items/use_item.rs +++ b/crates/ra_parser/src/grammar/items/use_item.rs @@ -47,7 +47,7 @@ fn use_tree(p: &mut Parser, top_level: bool) { // use {crate::path::from::root, or::path::from::crate_name}; // Rust 2018 (with a crate named `or`) // use {path::from::root}; // Rust 2015 // use ::{some::arbritrary::path}; // Rust 2015 - // use ::{{{crate::export}}}; // Nonsensical but perfectly legal nestnig + // use ::{{{root::export}}}; // Nonsensical but perfectly legal nesting T!['{'] => { use_tree_list(p); } -- cgit v1.2.3