rust/tests/codegen-units/item-collection/auxiliary/cgu_export_trait_method.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
746 B
Rust
Raw Normal View History

#![crate_type = "lib"]
pub trait Trait : Sized {
fn without_self() -> u32;
fn without_self_default() -> u32 { 0 }
fn with_default_impl(self) -> Self { self }
fn with_default_impl_generic<T>(self, x: T) -> (Self, T) { (self, x) }
fn without_default_impl(x: u32) -> (Self, u32);
fn without_default_impl_generic<T>(x: T) -> (Self, T);
}
impl Trait for char {
fn without_self() -> u32 { 2 }
fn without_default_impl(x: u32) -> (Self, u32) { ('c', x) }
fn without_default_impl_generic<T>(x: T) -> (Self, T) { ('c', x) }
}
impl Trait for u32 {
fn without_self() -> u32 { 1 }
fn without_default_impl(x: u32) -> (Self, u32) { (0, x) }
fn without_default_impl_generic<T>(x: T) -> (Self, T) { (0, x) }
}