]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-impl-trait/issue-77179.rs
Rollup merge of #104965 - zacklukem:p-option-as_ref-docs, r=scottmcm
[rust.git] / tests / ui / type-alias-impl-trait / issue-77179.rs
1 // Regression test for #77179.
2
3 #![feature(type_alias_impl_trait)]
4
5 type Pointer<T> = impl std::ops::Deref<Target=T>;
6
7 fn test() -> Pointer<_> {
8     //~^ ERROR: the placeholder `_` is not allowed within types
9     Box::new(1)
10 }
11
12 fn main() {
13     test();
14 }