about summary refs log tree commit diff
path: root/tests/ui/codegen/sub-principals-in-codegen.rs
blob: 178c10da5968f5542fcaf71a6040a83b9cd3fe39 (plain)
1
2
3
4
5
6
7
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;
}