]> git.lizzy.rs Git - rust.git/blob - tests/ui/associated-types/associated-types-cc.rs
Rollup merge of #107531 - GuillaumeGomez:inline-images-in-css, r=notriddle
[rust.git] / tests / ui / associated-types / associated-types-cc.rs
1 // run-pass
2 #![allow(unused_variables)]
3 // aux-build:associated-types-cc-lib.rs
4
5 // Test that we are able to reference cross-crate traits that employ
6 // associated types.
7
8 extern crate associated_types_cc_lib as bar;
9
10 use bar::Bar;
11
12 fn foo<B:Bar>(b: B) -> <B as Bar>::T {
13     Bar::get(None::<B>)
14 }
15
16 fn main() {
17     println!("{}", foo(3));
18 }