blob: 1fe0109771c5c0c9e73f5fcc26924ffe13acd600 [file] [log] [blame]
error: cannot capture late-bound lifetime in constant
--> $DIR/late-bound-in-return-issue-77357.rs:9:53
|
LL | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
| -- lifetime defined here ^^
error: overly complex generic constant
--> $DIR/late-bound-in-return-issue-77357.rs:9:46
|
LL | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^ blocks are not supported in generic constants
|
= help: consider moving this anonymous constant into a `const` function
= note: this operation may be supported in the future
error: aborting due to 2 previous errors