diff options
| author | Seo Sanghyeon <sanxiyn@gmail.com> | 2021-11-13 15:06:22 +0900 |
|---|---|---|
| committer | Seo Sanghyeon <sanxiyn@gmail.com> | 2021-11-13 15:06:22 +0900 |
| commit | 34b75664ee01f4c19ee67480c5711b7300db5f41 (patch) | |
| tree | 8d9ffb5f6d9e5eee9dbb2c49e4ab80f9fa5d0bf4 /src/test/ui/issues | |
| parent | e90c5fbbc5df5c81267747daeb937d4e955ce6ad (diff) | |
| download | rust-34b75664ee01f4c19ee67480c5711b7300db5f41.tar.gz rust-34b75664ee01f4c19ee67480c5711b7300db5f41.zip | |
Type can be unsized and uninhabited
Diffstat (limited to 'src/test/ui/issues')
| -rw-r--r-- | src/test/ui/issues/issue-88150.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-88150.rs b/src/test/ui/issues/issue-88150.rs new file mode 100644 index 00000000000..555a38637a4 --- /dev/null +++ b/src/test/ui/issues/issue-88150.rs @@ -0,0 +1,21 @@ +// run-pass +// compile-flags:-C debuginfo=2 +// edition:2018 + +use core::marker::PhantomData; + +pub struct Foo<T: ?Sized, A>( + PhantomData<(A, T)>, +); + +enum Never {} + +impl<T: ?Sized> Foo<T, Never> { + fn new_foo() -> Foo<T, Never> { + Foo(PhantomData) + } +} + +fn main() { + let _ = Foo::<[()], Never>::new_foo(); +} |
