]> git.proxmox.com Git - rustc.git/blob - tests/ui/uninhabited/issue-107505.rs
New upstream version 1.69.0+dfsg1
[rustc.git] / tests / ui / uninhabited / issue-107505.rs
1 // compile-flags: --crate-type=lib
2 // check-pass
3
4 // Make sure we don't pass inference variables to uninhabitedness checks in borrowck
5
6 struct Command<'s> {
7 session: &'s (),
8 imp: std::convert::Infallible,
9 }
10
11 fn command(_: &()) -> Command<'_> {
12 unreachable!()
13 }
14
15 fn with_session<'s>(a: &std::process::Command, b: &'s ()) -> Command<'s> {
16 a.get_program();
17 command(b)
18 }