-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
[RFC] Use one dot .
instead of four dots ::
in path syntax
#12390
Comments
As stated, this proposal is only to change path notation in the context of |
@pnkfelix I've changed the proposal to use |
So now you want to collapse the role if For example: It introduces much ambiguity into the parser. Even if we ignored that and left the job of figuring out the role of each |
yes, need more investigation. see others comments. |
I prefer to stay closer to the C++ heritage (::) than the Java one, since C++ is the language domain most targeted by Rust. Also I like that |
@nick29581 I like the usage of different operators for different things too. And I also agree with @pnkfelix it's already quite late to change this and |
This has been proposed many times in the past, and this is a part of the language which is not going to change. Name resolution is quite complicated as is, and more ambiguities is burdensome on both the compiler and the programmer. |
…ykril fix: Retrigger visibility completion after parentheses close rust-lang#12390 This PR add `(` to trigger_characters as discussed in original issue. Some questions: 1. Is lsp's `ctx.trigger_character` from `params.context` is the same as `ctx.original_token` inside actually completions? 1. If not what's the difference? 2. if they are the same, it's unnecessary to pass it down from handler at all. 3. if they are the same, maybe we could parse it from fixture directly instead of using the `check_with_trigger_character` I added. 2. Some completion fixtures written as `($0)` ( https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-completion/src/tests/fn_param.rs#L105 as an example), If I understand correctly they are not invoked outside tests at all? 1. using `ctx.original_token` directly would break these tests as well as parsing trigger_character from fixture for now. 2. I think it make sense to allow `(` triggering these cases? 3. I hope this line up with rust-lang#12144
…ndoo Refactor lints in clippy_lints::attrs into separate submodules/files This pull request contains the changes requested in issue rust-lang#12390. changelog: none
I would prefer to
use std.rt.io
, instead ofuse std::rt::io
. For the later, I need to press the keyboard for 3 * 2 times more. Java and C# use.
to separate packages and access methods/fields too. IMO,.
is 4 times better than::
.std::task::spawn(...)
->std.task.spawn(...)
We don't really need to write so many dots in Rust source code.
The text was updated successfully, but these errors were encountered: