]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-22684.rs
New upstream version 1.33.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-22684.rs
CommitLineData
54a0048b
SL
1mod foo {
2 pub struct Foo;
3 impl Foo {
4 fn bar(&self) {}
5 }
85aaf69f 6
54a0048b 7 pub trait Baz {
476ff2be 8 fn bar(&self) -> bool { true }
54a0048b
SL
9 }
10 impl Baz for Foo {}
11}
223e47cc 12
d9579d0f 13fn main() {
54a0048b
SL
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
c34b1796 18}