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
2019-07-24 12:49:19 +03:00
2020-04-30 11:16:09 -07:00
2020-04-30 11:16:09 -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-02-06 19:45:51 +00: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
2019-08-08 09:12:07 +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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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
2019-08-08 09:12:07 +07: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03:00
2020-04-25 11:59:18 +02:00
2019-10-03 00:39:52 -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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03:00
2020-04-25 11:59:18 +02:00
2020-01-07 09:29:03 +10:30
2020-04-25 11:59:18 +02:00
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03:00
2020-04-25 11:59:18 +02:00
2019-08-08 09:12:07 +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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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
2019-08-23 16:59:50 +03: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03:00
2020-04-25 11:59:18 +02:00
2019-08-23 16:59:50 +03: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-02-29 21:33:15 +01:00
2020-04-25 11:59:18 +02:00
2019-10-03 00:39:52 -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
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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03:00
2020-04-25 11:59:18 +02:00
2019-10-03 00:39:52 -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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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-02-29 21:33:15 +01:00
2020-04-25 11:59:18 +02:00
2019-10-03 00:39:52 -07:00
2020-04-25 11:59:18 +02:00
2019-08-11 16:56:05 +07: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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
2019-08-08 09:12:07 +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
2019-07-24 12:49:19 +03:00
2020-04-25 11:59:18 +02:00
2019-08-23 16:59:50 +03: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-02-06 19:45:51 +00: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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
2019-08-23 16:59:50 +03: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03:00
2020-04-25 11:59:18 +02:00
2019-08-08 09:12:07 +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
2019-07-24 12:49:19 +03:00
2020-04-25 11:59:18 +02:00
2019-08-23 16:59:50 +03: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
2019-07-24 12:49:19 +03:00
2020-04-25 11:59:18 +02:00
2020-02-07 13:51:51 +01: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-02-28 13:08:47 +08: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03: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
2019-07-24 12:49:19 +03:00
2020-04-25 11:59:18 +02:00
2019-08-07 21:00:02 +02:00
2020-04-25 11:59:18 +02:00
2019-08-13 18:17:10 +08:00
2020-04-25 11:59:18 +02:00
2019-08-08 09:12:07 +07:00
2020-04-25 11:59:18 +02:00
2019-08-08 09:12:07 +07:00
2020-04-25 11:59:18 +02: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
2020-04-25 11:59:18 +02:00
2019-09-14 17:08:22 -07:00
2020-04-25 11:59:18 +02:00
2019-09-20 11:43:34 -04: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
2019-12-22 01:32:08 +00:00
2020-04-25 11:59:18 +02:00
2019-12-21 18:29:14 +08:00
2020-04-25 11:59:18 +02:00
2019-12-21 18:29:14 +08:00
2020-04-25 11:59:18 +02:00
2020-01-16 18:39:29 +01:00
2020-04-25 11:59:18 +02:00
2020-01-07 09:29:03 +10:30
2020-04-25 11:59:18 +02:00
2020-01-09 18:40:01 +01:00
2020-04-25 11:59:18 +02:00
2020-01-16 22:20:17 -05:00
2020-04-25 11:59:18 +02:00
2020-02-06 19:45:51 +00:00
2020-04-25 11:59:18 +02:00
2020-02-06 20:39:27 +00:00
2020-04-25 11:59:18 +02:00
2020-03-13 12:20:42 +01:00
2020-04-25 11:59:18 +02:00
2020-02-09 22:06:28 +00:00
2020-04-25 11:59:18 +02:00
2020-02-12 23:09:13 +01:00
2020-04-25 11:59:18 +02:00
2020-03-20 08:50:34 +01:00
2020-04-25 11:59:18 +02:00
2020-03-11 14:28:18 +01:00
2020-04-25 11:59:18 +02:00
2020-03-25 17:01:28 +01:00
2020-04-30 14:17:14 +02:00
2020-04-30 14:17:14 +02:00
2020-04-30 22:07:46 +08:00
2020-04-30 22:07:46 +08:00