mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-28 21:55:31 +00:00
18 lines
267 B
Rust
18 lines
267 B
Rust
//@ check-pass
|
|
|
|
#![feature(import_trait_associated_functions)]
|
|
|
|
trait Trait: Default {
|
|
fn f() -> Self { Default::default() }
|
|
fn g() -> Self { Default::default() }
|
|
}
|
|
|
|
impl Trait for u8 {}
|
|
|
|
use Trait::*;
|
|
|
|
fn main() {
|
|
let _: u8 = f();
|
|
let _: u8 = g();
|
|
}
|