]> git.lizzy.rs Git - rust.git/blob - src/test/ui/mir/mir_call_with_associated_type.rs
Merge commit 'e18101137866b79045fee0ef996e696e68c920b4' into clippyup
[rust.git] / src / test / ui / mir / mir_call_with_associated_type.rs
1 // run-pass
2 trait Trait {
3     type Type;
4 }
5
6 impl<'a> Trait for &'a () {
7     type Type = u32;
8 }
9
10 fn foo<'a>(t: <&'a () as Trait>::Type) -> <&'a () as Trait>::Type {
11     t
12 }
13
14 fn main() {
15     assert_eq!(foo(4), 4);
16 }