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.
Revert "Normalize function type during validation"
This reverts commit d486bfc.
- Loading branch information
Showing
3 changed files
with
8 additions
and
16 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(()); | ||
} |