mirror of
https://github.com/rust-lang/rust
synced 2024-09-05 16:57:03 +00:00
19 lines
343 B
Rust
19 lines
343 B
Rust
//@ 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));
|
|
}
|