-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use type folder + normalization for MIR assignment type-checking
- Loading branch information
Showing
2 changed files
with
29 additions
and
78 deletions.
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,10 @@ | ||
// build-pass | ||
//! This used to fail MIR validation due to the types on both sides of an assignment not being equal. | ||
//! The failure doesn't occur with a check-only build. | ||
fn iter_slice<'a, T>(xs: &'a [T]) -> impl Iterator<Item = &'a T> { | ||
xs.iter() | ||
} | ||
|
||
fn main() { | ||
iter_slice::<()> as fn(_) -> _; | ||
} |