rust-analyzer/crates
bors[bot] 21588e15df
Merge #4246
4246: Validate uses of self and super r=matklad a=djrenren

This change follows on the validation of the `crate` keyword in paths. It verifies the following things:

`super`:
 - May only be preceded by other `super` segments
 - If in a `UseItem` then all semantically preceding paths also consist only of `super`

`self`
 - May only be the start of a path


Just a note, a couple times while working on this I found myself really wanting a Visitor of some sort so that I could traverse descendants while skipping sub-trees that are unimportant. Iterators don't really work for this, so as you can see I reached for recursion. Considering paths are generally small a fancy debounced visitor probably isn't important but figured I'd say something in case we had something like this lying around and I wasn't using it.

Co-authored-by: John Renner <john@jrenner.net>
2020-05-01 19:24:25 +00:00
..
ra_arena Extract messy tree handling out of profiling code 2020-04-25 21:22:40 +02:00
ra_assists More principled approach for finding From trait 2020-04-29 14:51:44 +02:00
ra_cfg Update versions 2020-02-18 16:12:40 +02:00
ra_db Convert code to text-size 2020-04-25 11:59:18 +02:00
ra_flycheck lsp-types 0.74 2020-04-26 16:05:22 -04:00
ra_fmt Fix a bunch of false-positives in join-lines 2020-04-30 22:08:50 +02:00
ra_hir ? 2020-04-30 00:10:30 +02:00
ra_hir_def Kill more zombies 2020-04-30 22:58:26 +02:00
ra_hir_expand Check dep name to detect it is core 2020-04-28 04:11:24 +08:00
ra_hir_ty Kill more zombies 2020-04-30 22:58:26 +02:00
ra_ide Fix a bunch of false-positives in join-lines 2020-04-30 22:08:50 +02:00
ra_ide_db Rename StructField -> Field 2020-04-25 14:23:34 +02:00
ra_mbe Merge #4139 2020-04-25 16:26:51 +00:00
ra_parser Remove dead code, which elaborately pretends to be alive 2020-04-30 22:41:14 +02:00
ra_proc_macro proc_macro: add ability to log to stderr and view output in vscode 2020-04-23 01:57:02 +03:00
ra_proc_macro_srv Generate uniq name 2020-04-26 18:59:09 +08:00
ra_prof Simplify profiler impl (bubble up Option and shorten code 2020-04-26 00:55:49 +03:00
ra_project_model Merge #4125 2020-04-25 10:35:14 +00:00
ra_syntax Merge #4246 2020-05-01 19:24:25 +00:00
ra_text_edit text-size 1.0.0 2020-04-25 12:15:32 +02:00
ra_tt Improve tt::Subtree debug print 2020-04-10 00:17:32 +08:00
rust-analyzer Address comments 2020-05-01 14:12:31 -04:00
stdx Move timeit to stdx 2020-04-10 20:46:42 +02:00
test_utils text-size 1.0.0 2020-04-25 12:15:32 +02:00