blob: 77b2407e304fe4074d837b338848515ec11a7452 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
//! Test that it is basically not possible to declare *and opaquely use* opaque types
//! in function bodies. This will work again once we have a `#[defines]` attribute
#![feature(type_alias_impl_trait)]
use std::fmt::Debug;
fn main() {
//~^ ERROR: item does not constrain
type Existential = impl Debug;
#[define_opaque(Existential)]
fn f() -> Existential {}
println!("{:?}", f());
}
|