diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-04-14 01:24:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-14 01:24:16 +0200 |
| commit | e261ef0622d3f56298d71d91dadbb054eca389e3 (patch) | |
| tree | e307c43cd9e5b493820218328018d5074d59217c /src | |
| parent | 9de2a792fb8b88d25102f7c3e3309943e69e073b (diff) | |
| parent | 38bfba659e2ae9423c9d782806db11e23187f3f6 (diff) | |
| download | rust-e261ef0622d3f56298d71d91dadbb054eca389e3.tar.gz rust-e261ef0622d3f56298d71d91dadbb054eca389e3.zip | |
Rollup merge of #71103 - samrat:tait-sized, r=estebank
Add test case for type aliasing `impl Sized` Fixes #71085
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/type-alias-impl-trait/type-alias-impl-trait-sized.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-sized.rs b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-sized.rs new file mode 100644 index 00000000000..c54df664243 --- /dev/null +++ b/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() {} |
