Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upWrong "possible better candidate is found in another module" suggestion #42944
Comments
This comment has been minimized.
This comment has been minimized.
|
cc @estebank |
petrochenkov
added
A-diagnostics
A-resolve
A-visibility
labels
Jun 28, 2017
Mark-Simulacrum
added
the
C-enhancement
label
Jul 26, 2017
This comment has been minimized.
This comment has been minimized.
|
Why is that even an error? |
This comment has been minimized.
This comment has been minimized.
|
@oli-obk tuple structs have private fields by default, you can't construct instances of B outside of the foo module. |
This comment has been minimized.
This comment has been minimized.
|
oh ^^ maybe we should simply modify this error message then to say that the "function" is private? |
This comment has been minimized.
This comment has been minimized.
|
It already says "constructor is not visible here due to private fields". That's okay, but maybe you might have meant another B from another module or something. However, the candidate offered is not any better as its the same one you are attempting to use. |
nocduro
referenced this issue
Mar 11, 2018
Closed
How to create an ocl::Program with binary files? #99
est31
closed this
Oct 19, 2018
rust-lang
locked and limited conversation to collaborators
Oct 19, 2018
This comment has been minimized.
This comment has been minimized.
|
Reopening to track "removal of suggestion" work for pub tuple structs with private fields. |
estebank
reopened this
Feb 7, 2019
estebank
added
the
A-suggestion-diagnostics
label
Feb 7, 2019
davidtwco
self-assigned this
Feb 11, 2019
Centril
added a commit
to Centril/rust
that referenced
this issue
Feb 13, 2019
Centril
added a commit
to Centril/rust
that referenced
this issue
Feb 13, 2019
Centril
added a commit
to Centril/rust
that referenced
this issue
Feb 13, 2019
bors
closed this
in
#58381
Feb 14, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
est31 commentedJun 28, 2017
For this code:
You get the following error message:
The suggestion may be excused to be not 100% perfect, but here it suggests to add an use statement despite that same item being imported already. What I want is this exactly: that it removes stuff from the suggestion list that is already being imported.
Note that changing the glob import to a non glob one doesn't change anything.