1 // Tests that we correctly handle opaque types being used opaquely,
2 // even within their defining scope.
4 #![feature(type_alias_impl_trait)]
13 // This method constrains `Foo` to be `bool`
14 fn constrained_foo() -> Foo {
19 // This method does not constrain `Foo`.
20 // Per RFC 2071, function bodies may either
21 // fully constrain an opaque type, or place no
23 fn unconstrained_foo() -> Wrapper<Foo> {
25 //~^ ERROR: type annotations needed