rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
96.91k stars 12.52k forks source link

regression: the parameter type `impl InferencePredicate` may not live long enough #130577

Open BoxyUwU opened 5 hours ago

BoxyUwU commented 5 hours ago
[INFO] [stdout] error[E0309]: the parameter type `impl InferencePredicate` may not live long enough
[INFO] [stdout]   --> src/inference/engine/mod.rs:82:9
[INFO] [stdout]    |
[INFO] [stdout] 66 |   pub trait TagDefinition<'cfg, _Bound = &'cfg Self>:
[INFO] [stdout]    |                           ---- the parameter type `impl InferencePredicate` must be valid for the lifetime `'cfg` as defined here...
[INFO] [stdout] ...
[INFO] [stdout] 82 | /         self.append(InferenceDefinitionPair {
[INFO] [stdout] 83 | |             pred,
[INFO] [stdout] 84 | |             value: TagFn(move |element: &mut Element<'cfg>| element.apply_tags(tags.clone())),
[INFO] [stdout] 85 | |             next: EmptyInferenceDefinition {},
[INFO] [stdout] 86 | |         })
[INFO] [stdout]    | |__________^ ...so that the type `impl InferencePredicate` will meet its required lifetime bounds

note: if the relevant team already accepted this breakage then the issue can be closed

compiler-errors commented 5 hours ago

This was a regression in https://github.com/rust-lang/rust/pull/124336, which was not caught by the crater run.