Skip to content

Commit

Permalink
Add test case for type aliasing impl Sized
Browse files Browse the repository at this point in the history
  • Loading branch information
samrat committed Apr 13, 2020
1 parent a00bd29 commit 38bfba6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/test/ui/type-alias-impl-trait/type-alias-impl-trait-sized.rs
@@ -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() {}

0 comments on commit 38bfba6

Please sign in to comment.