Rollup merge of #71103 - samrat:tait-sized, r=estebank

Add test case for type aliasing `impl Sized`

Fixes #71085
This commit is contained in:
Dylan DPC 2020-04-14 01:24:16 +02:00 committed by GitHub
commit e261ef0622
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,17 @@
// check-pass
#![feature(type_alias_impl_trait)]
type A = impl Sized;
fn f1() -> A { 0 }
type B = impl ?Sized;
fn f2() -> &'static B { &[0] }
type C = impl ?Sized + 'static;
fn f3() -> &'static C { &[0] }
type D = impl ?Sized;
fn f4() -> &'static D { &1 }
fn main() {}