rust/tests/ui/codegen/sub-principals-in-codegen.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
232 B
Rust
Raw Normal View History

2024-09-28 13:16:05 -05:00
//@ 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;
}