]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-22684.rs
Require Drop impls to have the same constness on its bounds as the bounds on the...
[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 }