mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-28 05:34:45 +00:00

Revise the extra `r: 'static` constraints added upon universe issues to add an explanation, and use that explanation during constraint blame search. This greatly simplifies the region inference logic, which now does not need to reverse-engineer the event that caused a region to outlive 'static.
54 lines
2.2 KiB
Plaintext
54 lines
2.2 KiB
Plaintext
error: implementation of `FnOnce` is not general enough
|
|
--> $DIR/missing-universe-cause-issue-114907.rs:33:5
|
|
|
|
|
LL | accept(callback);
|
|
| ^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough
|
|
|
|
|
= note: closure with signature `fn(&'2 ())` must implement `FnOnce<(&'1 (),)>`, for any lifetime `'1`...
|
|
= note: ...but it actually implements `FnOnce<(&'2 (),)>`, for some specific lifetime `'2`
|
|
|
|
error: implementation of `FnOnce` is not general enough
|
|
--> $DIR/missing-universe-cause-issue-114907.rs:33:5
|
|
|
|
|
LL | accept(callback);
|
|
| ^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough
|
|
|
|
|
= note: closure with signature `fn(&'2 ())` must implement `FnOnce<(&'1 (),)>`, for any lifetime `'1`...
|
|
= note: ...but it actually implements `FnOnce<(&'2 (),)>`, for some specific lifetime `'2`
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
|
|
error: implementation of `FnOnce` is not general enough
|
|
--> $DIR/missing-universe-cause-issue-114907.rs:33:5
|
|
|
|
|
LL | accept(callback);
|
|
| ^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough
|
|
|
|
|
= note: closure with signature `fn(&'2 ())` must implement `FnOnce<(&'1 (),)>`, for any lifetime `'1`...
|
|
= note: ...but it actually implements `FnOnce<(&'2 (),)>`, for some specific lifetime `'2`
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
|
|
error: implementation of `FnOnce` is not general enough
|
|
--> $DIR/missing-universe-cause-issue-114907.rs:33:5
|
|
|
|
|
LL | accept(callback);
|
|
| ^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough
|
|
|
|
|
= note: closure with signature `fn(&'2 ())` must implement `FnOnce<(&'1 (),)>`, for any lifetime `'1`...
|
|
= note: ...but it actually implements `FnOnce<(&'2 (),)>`, for some specific lifetime `'2`
|
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
|
|
|
error: higher-ranked subtype error
|
|
--> $DIR/missing-universe-cause-issue-114907.rs:33:5
|
|
|
|
|
LL | accept(callback);
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
error: higher-ranked subtype error
|
|
--> $DIR/missing-universe-cause-issue-114907.rs:33:21
|
|
|
|
|
LL | accept(callback);
|
|
| ^
|
|
|
|
error: aborting due to 6 previous errors
|
|
|