]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-22684.rs
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[rust.git] / src / test / ui / issues / issue-22684.rs
1 mod foo {
2     pub struct Foo;
3     impl Foo {
4         fn bar(&self) {}
5     }
6
7     pub trait Baz {
8         fn bar(&self) -> bool { true }
9     }
10     impl Baz for Foo {}
11 }
12
13 fn main() {
14     use foo::Baz;
15
16     // Check that `bar` resolves to the trait method, not the inherent impl method.
17     let _: () = foo::Foo.bar(); //~ ERROR mismatched types
18 }