-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vim: Tweak how comment nesting works #12308
Conversation
LGTM |
In Apart from that, the behaviour (as distinct from highlighting) of the previous implementation remains, including all the caveats: good. |
@chris-morgan I intentionally made Incidentally, I wish I could just remove the |
Yes, the Is it worth duplicating the Nest rules for Doc and non-Doc? Well, if you want to get highlighting consistent, I guess it is. |
I think I can use |
Nevermind, it doesn't work right, and there's no way to debug this. |
Don't try to match line comments inside of a comment block. That makes no sense and can highlight differently for people who override their highlights. Similarly, don't match a doc-comment inside of a comment block. It shouldn't be highlighted differently unless it's actually a doc-comment (and nested comments are obviously not doc comments). Fixes rust-lang#12307.
I've gone ahead and duplicated the rule so it can highlight correctly. |
vim: Tweak how comment nesting works Reviewed-by: brson
…predicate, r=lowr Consider bounds on inherent impl in method resolution There are three type-related things we should consider in method resolution: `Self` type, receiver type, and impl bounds. While we check the first two and impl bounds on trait impls, we've been ignoring the impl bounds on inherent impls. With this patch rust-analyzer now takes them into account and is able to select the appropriate inherent method. Resolves rust-lang#5441 Resolves rust-lang#12308
Look for `implied_bounds_in_impls` in more positions With this, we lint `impl Trait` implied bounds in more positions: - Type alias impl trait - Associated type position impl trait - Argument position impl trait - these are not opaque types, but instead are desugared to `where` clauses, so we need extra logic for finding them (`check_generics`), however the rest of the logic is the same Before this, we'd only lint RPIT `impl Trait`s. "Hide whitespaces" and reviewing commits individually might make this easier changelog: [`implied_bounds_in_impls`]: start linting implied bounds in APIT, ATPIT, TAIT
Don't try to match line comments inside of a comment block. That makes
no sense and can highlight differently for people who override their
highlights.
Similarly, don't match a doc-comment inside of a comment block. It
shouldn't be highlighted differently unless it's actually a doc-comment
(and nested comments are obviously not doc comments).
Fixes #12307.