blob: 3458448992821311ae5293324f523cbe7e27dcb4 [file]
#![feature(no_core)]
#![feature(lang_items)]
#![no_core]
pub struct Foo {
a: i32,
// { dg-warning "field is never read" "" { target *-*-* } .-1 }
}
pub struct Bar(i32);
#[lang = "sized"]
pub trait Sized {}
pub mod core {
pub mod default {
use crate::Sized;
pub trait Default: Sized {
fn default() -> Self;
}
impl Default for i32 {
fn default() -> Self {
0
}
}
}
}
impl ::core::default::Default for Bar {
#[inline]
fn default() -> Bar {
Bar(core::default::Default::default())
}
}
impl ::core::default::Default for Foo {
#[inline]
fn default() -> Foo {
Foo {
a: core::default::Default::default(),
}
}
}