This website requires JavaScript.
Explore
Help
Sign in
mathieu
/
granite-rust
Watch
1
Star
0
Fork
You've already forked granite-rust
0
Code
Issues
Pull requests
Projects
Releases
Packages
Wiki
Activity
39fa192d8b
granite-rust
/
tests
/
ui
/
dont-suggest-private-trait-method.rs
7 lines
103 B
Rust
Raw
Normal View
History
Unescape
Escape
Do not suggest private traits that have missing method When encountering a method call for an ADT that doesn't have any implementation of it, we search for traits that could be implemented that do have that method. Filter out private non-local traits that would not be able to be implemented. This doesn't account for public traits that are in a private scope, but works as a first approximation and is a more correct behavior than the current one.
2018-01-17 20:15:13 -08:00
struct
T
;
fn
main
(
)
{
T
::
new
(
)
;
Unify output of "variant not found" errors
2020-01-08 08:05:31 -08:00
//~^ ERROR no function or associated item named `new` found
Do not suggest private traits that have missing method When encountering a method call for an ADT that doesn't have any implementation of it, we search for traits that could be implemented that do have that method. Filter out private non-local traits that would not be able to be implemented. This doesn't account for public traits that are in a private scope, but works as a first approximation and is a more correct behavior than the current one.
2018-01-17 20:15:13 -08:00
}
Reference in a new issue
Copy permalink