We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Code:
struct S { now_req: bool } trait T { } impl T for S {} fn main() { let x = @S as @T; println("Hello World"); }
rustc output:
/tmp/mt.rs:5:13: 5:14 error: unresolved name `S`. /tmp/mt.rs:5 let x = @S as @T; ^ error: aborting due to previous error
We can do better (in terms of looking S up in the struct namespace and informing the user that they need to provide the { ... } portion).
S
{ ... }
The text was updated successfully, but these errors were encountered:
Now you get (after #6702 is fixed):
error: `S` is a structure name, but this expression uses it like a function name note: Did you mean to write: `S { /* fields */ }`?
This looks great, except "uses it like a function name" is confusing, since there is no call here. I think we just need to reword the message.
Sorry, something went wrong.
Closing, I believe this can be satisfactorily considered solved since #6702 landed.
Auto merge of rust-lang#8552 - Jarcho:ptr_arg_8495, r=xFrednet
8d5c0ea
Don't lint `ptr_arg` on `&mut Cow<_>` fixes: rust-lang#8495 changelog: Don't lint `ptr_arg` on `&mut Cow<_>`
No branches or pull requests
Code:
rustc output:
We can do better (in terms of looking
S
up in the struct namespace and informing the user that they need to provide the{ ... }
portion).The text was updated successfully, but these errors were encountered: