mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 19:23:50 +00:00
14 lines
271 B
Rust
14 lines
271 B
Rust
// Test variance computation doesn't explode when we leak unnameable
|
|
// types due to `-> _` recovery.
|
|
|
|
pub struct Type<'a>(&'a ());
|
|
|
|
pub fn g() {}
|
|
|
|
pub fn f<T>() -> _ {
|
|
//~^ ERROR the placeholder `_` is not allowed within types on item signatures
|
|
g
|
|
}
|
|
|
|
fn main() {}
|