forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
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#79193 - tmiasko:revert-78969-normalize, r=d…
…avidtwco Revert rust-lang#78969 "Normalize function type during validation" Closes rust-lang#79066. Reopens rust-lang#78442.
- Loading branch information
Showing
3 changed files
with
16 additions
and
21 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
4 changes: 4 additions & 0 deletions
4
src/test/ui/issues/issue-50865-private-impl-trait/auxiliary/lib.rs
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 |
---|---|---|
@@ -1,27 +1,17 @@ | ||
// Regression test for various issues related to normalization & inlining. | ||
// * #68347, #77306, #77668 - missed normalization during inlining. | ||
// * #78442 - missed normalization in validator after inlining. | ||
// | ||
// build-pass | ||
// run-pass | ||
// compile-flags:-Zmir-opt-level=2 | ||
|
||
// Previously ICEd because we did not normalize during inlining, | ||
// see https://github.com/rust-lang/rust/pull/77306 for more discussion. | ||
|
||
pub fn write() { | ||
create()() | ||
} | ||
|
||
pub fn write_generic<T>(_t: T) { | ||
hide()(); | ||
} | ||
|
||
pub fn create() -> impl FnOnce() { | ||
|| () | ||
} | ||
|
||
pub fn hide() -> impl Fn() { | ||
write | ||
} | ||
|
||
fn main() { | ||
write(); | ||
write_generic(()); | ||
} |