mirror of
https://github.com/rust-lang/rust
synced 2024-09-05 16:57:03 +00:00
13 lines
312 B
Rust
13 lines
312 B
Rust
//@ check-pass
|
|
|
|
fn main() {}
|
|
|
|
trait T {}
|
|
impl T for () {}
|
|
|
|
fn should_ret_unit() -> impl T {
|
|
//~^ warn: this function depends on never type fallback being `()`
|
|
//~| warn: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
|
panic!()
|
|
}
|