rust-analyzer/crates/ra_syntax/test_data
bors[bot] 745bd45ddb
Merge #4227
4227: Report invalid, nested, multi-segment crate-paths r=matklad a=djrenren

There was a bug in the previous path-validating code that didn't detect multi-segment paths that started with `crate`.

```rust
// Successfully reported
use foo::{crate};

// BUG: was not being reported
use foo::{crate::bar};
```

This was due to my confusion about path-associativity. That is, the path with no qualifier is the innermost path, not the outermost. I've updated the code with a lot of comments to explain what's going on. 

This bug was discovered when I found an erroneous `ok` test which I reported here: 
https://github.com/rust-analyzer/rust-analyzer/issues/4226

This test now fails and has been modified, hopefully in the spirit of the original test, to be correct.  Sorry about submitting the bug in the first place!

Co-authored-by: John Renner <john@jrenner.net>
2020-04-30 18:37:35 +00:00
..
lexer Convert tests to text-size 2020-04-25 11:59:18 +02:00
parser Merge #4227 2020-04-30 18:37:35 +00:00
reparse/fuzz-failures move syntax tests to unit tests 2019-07-24 12:49:19 +03:00
accidentally_quadratic Add a test 2020-01-15 16:52:28 +01:00