aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser/src/grammar/items
diff options
context:
space:
mode:
authorJohn Renner <[email protected]>2020-04-30 18:41:24 +0100
committerJohn Renner <[email protected]>2020-04-30 19:16:09 +0100
commit513a3615f6d462852c0135dc4ac30a2086e25c5a (patch)
tree31b5de91f47cf315074dcf7b1a7282accdbfad1d /crates/ra_parser/src/grammar/items
parentfec1e7c8e10e1c592642fac0c497cd57bd3f003c (diff)
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};
Diffstat (limited to 'crates/ra_parser/src/grammar/items')
-rw-r--r--crates/ra_parser/src/grammar/items/use_item.rs2
1 files changed, 1 insertions, 1 deletions
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) {
47 // use {crate::path::from::root, or::path::from::crate_name}; // Rust 2018 (with a crate named `or`) 47 // use {crate::path::from::root, or::path::from::crate_name}; // Rust 2018 (with a crate named `or`)
48 // use {path::from::root}; // Rust 2015 48 // use {path::from::root}; // Rust 2015
49 // use ::{some::arbritrary::path}; // Rust 2015 49 // use ::{some::arbritrary::path}; // Rust 2015
50 // use ::{{{crate::export}}}; // Nonsensical but perfectly legal nestnig 50 // use ::{{{root::export}}}; // Nonsensical but perfectly legal nesting
51 T!['{'] => { 51 T!['{'] => {
52 use_tree_list(p); 52 use_tree_list(p);
53 } 53 }