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
..
2020-04-25 11:59:18 +02:00
2020-04-25 11:59:18 +02:00
2019-10-05 16:33:05 -07:00
2020-04-25 11:59:18 +02:00
2020-04-25 11:59:18 +02:00
2020-04-25 11:59:18 +02:00
2020-04-25 11:59:18 +02:00
2020-04-25 11:59:18 +02:00
2019-07-24 12:49:19 +03:00
2020-04-25 11:59:18 +02:00
2020-04-25 11:59:18 +02:00
2020-04-25 11:59:18 +02:00
2020-04-25 11:59:18 +02:00
2020-04-25 11:59:18 +02:00
2020-04-25 11:59:18 +02:00
2020-04-25 11:59:18 +02:00
2020-04-25 11:59:18 +02:00
2020-04-25 11:59:18 +02:00
2020-04-25 11:59:18 +02:00
2020-04-25 11:59:18 +02:00
2019-08-23 16:24:30 -07:00
2020-04-25 11:59:18 +02:00
2019-07-24 12:49:19 +03:00
2020-04-25 11:59:18 +02:00
2020-04-25 11:59:18 +02:00
2020-04-25 11:59:18 +02:00
2020-04-25 11:59:18 +02:00
2020-04-25 11:59:18 +02:00
2019-10-05 16:33:05 -07:00
2020-04-25 11:59:18 +02:00
2020-04-25 11:59:18 +02:00
2020-04-25 11:59:18 +02:00
2020-04-25 11:59:18 +02:00
2019-07-24 12:49:19 +03:00
2020-04-25 11:59:18 +02:00
2020-04-25 11:59:18 +02:00
2020-02-10 20:11:44 +00:00
2020-04-25 11:59:18 +02:00
2019-08-23 16:24:30 -07:00
2020-04-25 11:59:18 +02:00
2020-04-25 11:59:18 +02:00
2020-04-25 11:59:18 +02:00
2020-04-25 11:59:18 +02:00
2019-08-13 18:17:10 +08:00
2019-08-14 21:20:04 +08:00
2020-04-25 11:59:18 +02:00
2019-08-23 16:24:30 -07:00
2019-09-14 17:08:22 -07:00
2019-10-05 16:33:05 -07:00
2019-12-22 01:32:08 +00:00
2020-04-25 11:59:18 +02:00
2020-01-16 18:39:29 +01:00
2020-01-09 18:40:01 +01:00
2020-02-06 20:39:27 +00:00