summaryrefslogtreecommitdiffstats
path: root/src/test/ui/associated-types/associated-types-cc.rs
blob: 13f1d27203ad8d1d82d5a11db250bd4739a0e4d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// run-pass
#![allow(unused_variables)]
// aux-build:associated-types-cc-lib.rs

// Test that we are able to reference cross-crate traits that employ
// associated types.

extern crate associated_types_cc_lib as bar;

use bar::Bar;

fn foo<B:Bar>(b: B) -> <B as Bar>::T {
    Bar::get(None::<B>)
}

fn main() {
    println!("{}", foo(3));
}