summaryrefslogtreecommitdiffstats
path: root/tests/ui/type-alias-impl-trait/issue-77179.rs
blob: 8d818d4a387a6fd199cdf8c33e0c5589820597ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Regression test for #77179.

#![feature(type_alias_impl_trait)]

type Pointer<T> = impl std::ops::Deref<Target=T>;

fn test() -> Pointer<_> {
    //~^ ERROR: the placeholder `_` is not allowed within types
    Box::new(1)
}

fn main() {
    test();
}