Uh oh!
There was an error while loading. Please reload this page.
Point out correct turbofish usage on Foo<Bar<Baz>> - #40500
Conversation
rust-highfive
commented
Mar 14, 2017
r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) |
estebank
commented
Mar 14, 2017
CC @jonathandturner@GuillaumeGomez@jorendorff thoughts? |
sophiajt
commented
Mar 14, 2017
I'm very 👍 this, so please don't take this as a blocking comment. I was just thinking about how we could make this a little clearer. Would a snippet help? Not sure which is better, but figured it was worth a look to see the other approach. |
estebank
commented
Mar 14, 2017
@jonathandturner I love the idea, but in order to provide those suggestions reliably we would have to parse the line in a different way to how we're doing it now, make sure we're properly closing all opening brackets (and if the code isn't, do it ourselves) and make sure that whatever results is actually a valid type and valid code in this context. Should we open a ticket for that task? I'd love to do that at one point, but I think merging this gets us 80% there with very little effort. |
sophiajt
commented
Mar 14, 2017
@estebank - absolutely agree. Like I said, don't block on my suggestion. Let's improve things with your design and if we can go a few percent better later on, then we can do that later. |
GuillaumeGomez
commented
Mar 14, 2017
Awesome! @jonathandturner's suggestion is good. Might be worth opening an issue to implement it as well. |
pnkfelix
commented
Mar 14, 2017
@bors r+ rollup |
bors
commented
Mar 14, 2017
📌 Commit 699bfa0 has been approved by |
pnkfelix
commented
Mar 14, 2017
@bors r- Travis failure looks legit. |
Whenever we parse a chain of binary operations, as long as the first operation is `<` and the subsequent operations are either `>` or `<`, present the following diagnostic help: use `::<...>` instead of `<...>` if you meant to specify type arguments This will lead to spurious recommendations on situations like `2 < 3 < 4` but should be clear from context that the help doesn't apply in that case.
estebank
commented
Mar 14, 2017
bors
commented
Mar 14, 2017
📌 Commit e3b8550 has been approved by |
Point out correct turbofish usage on `Foo<Bar<Baz>>` Whenever we parse a chain of binary operations, as long as the first operation is `<` and the subsequent operations are either `>` or `<`, present the following diagnostic help: use `::<...>` instead of `<...>` if you meant to specify type arguments This will lead to spurious recommendations on situations like `2 < 3 < 4` but should be clear from context that the help doesn't apply in that case. Fixesrust-lang#40396.
Point out correct turbofish usage on `Foo<Bar<Baz>>` Whenever we parse a chain of binary operations, as long as the first operation is `<` and the subsequent operations are either `>` or `<`, present the following diagnostic help: use `::<...>` instead of `<...>` if you meant to specify type arguments This will lead to spurious recommendations on situations like `2 < 3 < 4` but should be clear from context that the help doesn't apply in that case. Fixesrust-lang#40396.
Point out correct turbofish usage on `Foo<Bar<Baz>>` Whenever we parse a chain of binary operations, as long as the first operation is `<` and the subsequent operations are either `>` or `<`, present the following diagnostic help: use `::<...>` instead of `<...>` if you meant to specify type arguments This will lead to spurious recommendations on situations like `2 < 3 < 4` but should be clear from context that the help doesn't apply in that case. Fixesrust-lang#40396.
Point out correct turbofish usage on `Foo<Bar<Baz>>` Whenever we parse a chain of binary operations, as long as the first operation is `<` and the subsequent operations are either `>` or `<`, present the following diagnostic help: use `::<...>` instead of `<...>` if you meant to specify type arguments This will lead to spurious recommendations on situations like `2 < 3 < 4` but should be clear from context that the help doesn't apply in that case. Fixesrust-lang#40396.
Point out correct turbofish usage on `Foo<Bar<Baz>>` Whenever we parse a chain of binary operations, as long as the first operation is `<` and the subsequent operations are either `>` or `<`, present the following diagnostic help: use `::<...>` instead of `<...>` if you meant to specify type arguments This will lead to spurious recommendations on situations like `2 < 3 < 4` but should be clear from context that the help doesn't apply in that case. Fixesrust-lang#40396.
Point out correct turbofish usage on `Foo<Bar<Baz>>` Whenever we parse a chain of binary operations, as long as the first operation is `<` and the subsequent operations are either `>` or `<`, present the following diagnostic help: use `::<...>` instead of `<...>` if you meant to specify type arguments This will lead to spurious recommendations on situations like `2 < 3 < 4` but should be clear from context that the help doesn't apply in that case. Fixesrust-lang#40396.
Whenever we parse a chain of binary operations, as long as the first
operation is
<and the subsequent operations are either>or<,present the following diagnostic help:
This will lead to spurious recommendations on situations like
2 < 3 < 4but should be clear from context that the help doesn't applyin that case.
Fixes#40396.