about summary refs log tree commit diff
path: root/tests/ui/editions/never-type-fallback.rs
blob: 987fb305763f2ff19c7dceca2b6196318e55da4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//@ revisions: e2021 e2024
//
//@[e2021] edition: 2021
//@[e2024] edition: 2024
//
//@ run-pass
//@ check-run-results

fn main() {
    print_return_type_of(|| panic!());
}

fn print_return_type_of<R>(_: impl FnOnce() -> R) {
    println!("return type = {}", std::any::type_name::<R>());
}