-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 #130863 - compiler-errors:relax-codegen-dyn-assert, r…
…=lcnr Relax a debug assertion for dyn principal *equality* in codegen Maybe this sucks and I should just bite the bullet and use `infcx.sub` here. Thoughts? r? lcnr Fixes #130855
- Loading branch information
Showing
5 changed files
with
66 additions
and
20 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
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
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,8 @@ | ||
//@ build-pass | ||
|
||
// Regression test for an overly aggressive assertion in #130855. | ||
|
||
fn main() { | ||
let subtype: &(dyn for<'a> Fn(&'a i32) -> &'a i32) = &|x| x; | ||
let supertype: &(dyn Fn(&'static i32) -> &'static i32) = subtype; | ||
} |