summaryrefslogtreecommitdiffstats
path: root/tests/ui/uninhabited/issue-107505.rs
blob: 61598541ddf0d51108368bd5a55972e194eb55d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// compile-flags: --crate-type=lib
// check-pass

// Make sure we don't pass inference variables to uninhabitedness checks in borrowck

struct Command<'s> {
    session: &'s (),
    imp: std::convert::Infallible,
}

fn command(_: &()) -> Command<'_> {
    unreachable!()
}

fn with_session<'s>(a: &std::process::Command, b: &'s ()) -> Command<'s> {
    a.get_program();
    command(b)
}