struct Foo(T); //~^ ERROR `impl Trait` only allowed in function and inherent method return types type Result = std::result::Result; //~^ ERROR `impl Trait` only allowed in function and inherent method return types // should not cause ICE fn x() -> Foo { Foo(0) } fn main() -> Result<()> {}