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
wfcheck incorrectly assumes unnormalized types to be wf #100910
this compiles with #100676 because we now assume unnormalized types in the impl header to be well formed when computing implied bounds. We don't check that when using the impl so we should be able to transmute lifetimes with this, though I haven't tried that yet.
Going to fix that myself once I am back home in 2 weeks. cc @rust-lang/types
(FYI I also nominated PR #100676 for discussion at T-compiler meeting, essentially because of this associated issue; I hadn't seen that this was tagged as P-critical at that time. I'm leaving it nominated for now, just to ensure doubly that we discuss the matter.)
this is an existing issue on stable if we prevent the projection from normalizing in the impl while normalizing it when using the impl:
structFoo<T>(T);traitGoodBye{typeForget;}impl<T>GoodByeforT{typeForget = ();}traitNeedsWf<'a,'b>{typeAssoc;}impl<'a,'b>NeedsWf<'a,'b>forFoo<<&'a&'b()asGoodBye>::Forget>where&'a&'b():GoodBye,// this line prevents us from normalizing in the param env.{typeAssoc = &'a&'b();}fnneeds_wf<'a,'b,T:NeedsWf<'a,'b>>(){}fnfoo<'a:'a,'b:'b>(_:&'bString){needs_wf::<'a,'b,Foo<()>>();}fnmain(){let x = String::from("hello");foo::<'static,'_>(&x);}
that's the same issue as #98543, which has been only fixed for function signatures
Activity
lcnr commentedon Aug 23, 2022
assigning
P-criticalafter a very long and deep discussion in https://rust-lang.zulipchat.com/#narrow/stream/245100-t-compiler.2Fwg-prioritization.2Falerts/topic/.23100910.20wfcheck.20incorrectly.20assumes.20unnormalized.20types.20to.20b.E2.80.A6pnkfelix commentedon Aug 24, 2022
(FYI I also nominated PR #100676 for discussion at T-compiler meeting, essentially because of this associated issue; I hadn't seen that this was tagged as P-critical at that time. I'm leaving it nominated for now, just to ensure doubly that we discuss the matter.)
lcnr commentedon Aug 25, 2022
this is an existing issue on stable if we prevent the projection from normalizing in the impl while normalizing it when using the impl:
that's the same issue as #98543, which has been only fixed for function signatures
edit: that's #100051
Auto merge of rust-lang#100989 - lcnr:implied-bounds-uwu, r=spastorino