Full list of `impl const Default` types: - () - bool - char - Cell - std::ascii::Char - usize - u8 - u16 - u32 - u64 - u128 - i8 - i16 - i32 - i64 - i128 - f16 - f32 - f64 - f128 - std::marker::PhantomData<T> - Option<T> - std::iter::Empty<T> - std::ptr::Alignment - &[T] - &mut [T] - &str - &mut str - String - Vec<T>
20 lines
524 B
Rust
20 lines
524 B
Rust
//@ compile-flags: -Znext-solver
|
|
//@ known-bug: #110395
|
|
|
|
#![crate_type = "lib"]
|
|
#![feature(staged_api, const_trait_impl, const_default)]
|
|
#![stable(feature = "foo", since = "1.0.0")]
|
|
|
|
#[stable(feature = "potato", since = "1.27.0")]
|
|
pub struct Data {
|
|
_data: u128,
|
|
}
|
|
|
|
#[stable(feature = "potato", since = "1.27.0")]
|
|
#[rustc_const_unstable(feature = "data_foo", issue = "none")]
|
|
impl const std::fmt::Debug for Data {
|
|
fn fmt(&self, _: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
|
|
Ok(())
|
|
}
|
|
}
|