Skip to content

Commit

Permalink
Add issue-80742
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Jan 15, 2021
1 parent 04220b0 commit cb3b42c
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions ices/80742.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#![feature(const_evaluatable_checked)]
#![feature(const_generics)]
#![allow(incomplete_features)]

use core::fmt::Debug;
use core::marker::PhantomData;

struct Inline<T>
where
[u8; ::core::mem::size_of::<T>() + 1]: ,
{
_phantom: PhantomData<T>,
buf: [u8; ::core::mem::size_of::<T>() + 1],
}

impl<T> Inline<T>
where
[u8; ::core::mem::size_of::<T>() + 1]: ,
{
pub fn new(val: T) -> Inline<T> {
todo!()
}
}

fn main() {
// let dst = Inline::<usize>::new(0); OK
let dst = Inline::<dyn Debug>::new(0); // BANG!
}

0 comments on commit cb3b42c

Please sign in to comment.