@@ -4,46 +4,5 @@ error: cannot capture late-bound lifetime in constant
4
4
LL | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
5
5
| -- lifetime defined here ^^
6
6
7
- error: overly complex generic constant
8
- --> $DIR/late-bound-in-return-issue-77357.rs:9:46
9
- |
10
- LL | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
11
- | ^^^^^^^^^^^^^^^^^^^^^^^^^ blocks are not supported in generic constants
12
- |
13
- = help: consider moving this anonymous constant into a `const` function
14
- = note: this operation may be supported in the future
15
-
16
- error[E0391]: cycle detected when evaluating type-level constant
17
- --> $DIR/late-bound-in-return-issue-77357.rs:9:46
18
- |
19
- LL | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
20
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
21
- |
22
- note: ...which requires const-evaluating + checking `bug::{constant#0}`...
23
- --> $DIR/late-bound-in-return-issue-77357.rs:9:46
24
- |
25
- LL | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
26
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
27
- note: ...which requires caching mir of `bug::{constant#0}` for CTFE...
28
- --> $DIR/late-bound-in-return-issue-77357.rs:9:46
29
- |
30
- LL | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
31
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
32
- note: ...which requires elaborating drops for `bug::{constant#0}`...
33
- --> $DIR/late-bound-in-return-issue-77357.rs:9:46
34
- |
35
- LL | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
36
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
37
- note: ...which requires borrow-checking `bug::{constant#0}`...
38
- --> $DIR/late-bound-in-return-issue-77357.rs:9:46
39
- |
40
- LL | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
41
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
42
- = note: ...which requires normalizing `Binder { value: ConstEvaluatable(UnevaluatedConst { def: DefId(0:8 ~ late_bound_in_return_issue_77357[9394]::bug::{constant#0}), args: [T/#0] }: usize), bound_vars: [] }`...
43
- = note: ...which again requires evaluating type-level constant, completing the cycle
44
- = note: cycle used when normalizing `&dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]>`
45
- = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
46
-
47
- error: aborting due to 3 previous errors
7
+ error: aborting due to 1 previous error
48
8
49
- For more information about this error, try `rustc --explain E0391`.
0 commit comments