Skip to content

Instantly share code, notes, and snippets.

@Aaron1011
Created September 5, 2019 21:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Aaron1011/8b69db43800e11a76a1c50d93fa91581 to your computer and use it in GitHub Desktop.
Save Aaron1011/8b69db43800e11a76a1c50d93fa91581 to your computer and use it in GitHub Desktop.
#![feature(no_core)]
#![no_std]
#![no_core]
#![feature(fundamental)]
#![feature(lang_items)]
#![feature(optin_builtin_traits)]
trait MyTrait {
fn default() -> Self;
}
#[lang = "sized"]
#[fundamental]
pub trait Sized {
}
#[lang = "freeze"]
pub(crate) unsafe auto trait Freeze {}
impl<T> MyTrait for [T; 1] where T: MyTrait {
fn default() -> [T; 1] {
loop {}
}
}
fn main() {}
rustc +stage1 -C incremental=true array.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment