diff --git a/tests/crashes/150263.rs b/tests/crashes/150263.rs new file mode 100644 index 000000000000..6e3b2a2f3f85 --- /dev/null +++ b/tests/crashes/150263.rs @@ -0,0 +1,21 @@ +//@ known-bug: #150263 +//@ compile-flags: --crate-type lib + +pub trait Scope { + type Timestamp; +} +impl Scope for G { + type Timestamp = (); +} + +pub fn create() { + enter::(); +} + +fn enter() { + unary::(|_: ::Timestamp| {}); +} + +fn unary(constructor: impl FnOnce(G::Timestamp)) { + constructor(None.unwrap()); +}