-
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
"try using a variant of the expected type" suggesting a peculiar syntax #65494
Comments
improvement needed inside rust/src/librustc/hir/print.rs Lines 1491 to 1536 in f54911c
|
Thanks! I'll try to fix it tomorrow :-) |
@Patryk27 consider also modifying the following to use rust/src/librustc_typeck/check/demand.rs Line 175 in fa0f7d0
That way we ensure that we suggest the code as it is in the user's code whenever that is possible, regardless of formatting they might be using and the idiosyncrasies of |
Improve the "try using a variant of the expected type" hint. Fix rust-lang#65494. - Change type-printing output. - Use `span_to_snippet` when possible. - Change the message to `try using a variant of the expected enum`
Improve the "try using a variant of the expected type" hint. Fix rust-lang#65494. - Change type-printing output. - Use `span_to_snippet` when possible. - Change the message to `try using a variant of the expected enum`
Improve the "try using a variant of the expected type" hint. Fix rust-lang#65494. - Change type-printing output. - Use `span_to_snippet` when possible. - Change the message to `try using a variant of the expected enum`
Hi,
I've got following code:
(playground link)
The suggested
<Foo>::new()
syntax is valid, but - quite frankly - spooky (and it seems to be this way from the very beginning of this feature). Could it suggest justFoo::new()
?I'd like to tackle this myself, but I'd need at least a hint where to look :-)
The text was updated successfully, but these errors were encountered: