forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#107532 - compiler-errors:erase-regions-in-u…
…ninhabited, r=jackh726 Erase regions before doing uninhabited check in borrowck ~Also, fingerprint query keys/values when debug assertions are enabled. This should make it easier to check for issues like this without `-Cincremental`, and make UI tests a bit cleaner.~ edit: moving that to a separate PR Fixes rust-lang#107505
- Loading branch information
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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) | ||
} |