This website requires JavaScript.
Explore
Help
Sign In
nordic-dev.net
/
rust
Watch
2
Star
0
Fork
0
You've already forked rust
mirror of
https://github.com/rust-lang/rust.git
synced
2025-05-05 14:37:37 +00:00
Code
Issues
Packages
Projects
Releases
Wiki
Activity
254bf6027d
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-18 04:15:13 +00:00
struct
T
;
fn
main
(
)
{
T
::
new
(
)
;
Unify output of "variant not found" errors
2020-01-08 16:05:31 +00: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-18 04:15:13 +00:00
}
Reference in New Issue
Copy Permalink