]> git.lizzy.rs Git - rust.git/blob - tests/ui/methods/method-self-arg-aux1.rs
Rollup merge of #107125 - WaffleLapkin:expect_an_item_in_your_hir_by_the_next_morning...
[rust.git] / tests / ui / methods / method-self-arg-aux1.rs
1 // run-pass
2 // Test method calls with self as an argument (cross-crate)
3
4 // aux-build:method_self_arg1.rs
5 extern crate method_self_arg1;
6 use method_self_arg1::Foo;
7
8 fn main() {
9     let x = Foo;
10     // Test external call.
11     Foo::bar(&x);
12     Foo::baz(x);
13     Foo::qux(Box::new(x));
14
15     x.foo(&x);
16
17     assert_eq!(method_self_arg1::get_count(), 2*3*3*3*5*5*5*7*7*7);
18 }