]> git.lizzy.rs Git - rust.git/blob - src/tools/miri/tests/fail/issue-miri-2432.rs
Rollup merge of #101642 - SkiFire13:fix-inplace-collection-leak, r=the8472
[rust.git] / src / tools / miri / tests / fail / issue-miri-2432.rs
1 #![allow(where_clauses_object_safety)]
2
3 trait Trait {}
4
5 trait X {
6     fn foo(&self)
7     where
8         Self: Trait;
9 }
10
11 impl X for () {
12     fn foo(&self) {}
13 }
14
15 impl Trait for dyn X {}
16
17 pub fn main() {
18     <dyn X as X>::foo(&()); //~ERROR: trying to call something that is not a method
19 }