You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
implied bounds from impl header are not used in associated functions/consts #98852
/// A type with an implied bound `'b: 'a`structTy<'a,'b>(&'a&'b());impl<'a,'b>Ty<'a,'b>// <- tait or inherent implwhere//'b: 'a, // <- fixed by an explicit bound{fnf(){// <- no `Self` in signatureSelf;//~^ ERROR lifetime bound not satisfied// Cannot prove WF of `Self` because `'b: 'a` is not known to hold}}
Another repro:
structTy<'a,'b>(&'a&'b());impl<'a,'b>Ty<'a,'b>{fnf(){None::<&'a&'b()>;//~^ ERROR lifetime bound not satisfied}}
The first repro regressed in 1.43 while the second one is as old as implied bounds.
/// A type with an implied bound `'b: 'a`structTy<'a,'b>(&'a&'b());impl<'a,'b>Ty<'a,'b>{constCONST_1:() = ();constCONST_2:() = {Self::CONST_1//~^ ERROR lifetime may not live long enough};}
changed the title [-]implied bounds from impl header are not used in associated functions[/-][+]implied bounds from impl header are not used in associated functions/consts[/+]on Nov 13, 2023
Activity
apiraino commentedon Jul 4, 2022
WG-prioritization assigning priority (Zulip discussion).
@rustbot label -I-prioritize +P-medium
Auto merge of rust-lang#104098 - aliemjay:fn-wf, r=<try>
Auto merge of rust-lang#104098 - aliemjay:fn-wf, r=<try>
aliemjay commentedon Nov 13, 2023
The same issue exists for associated consts:
[-]implied bounds from impl header are not used in associated functions[/-][+]implied bounds from impl header are not used in associated functions/consts[/+]Auto merge of rust-lang#104098 - aliemjay:fn-wf, r=<try>
Auto merge of rust-lang#120019 - lcnr:fn-wf, r=BoxyUwU