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
this passes but should error. The issue is that when writing the opaque type into the TypeckResults we drop the previous entry without comparing them for equality.
normally this would get caught by borrowck which does handle them correctly, however Tait<U> is defined in unreachable code so mir borrowck does not catch this.
we do explicitly check that the opaques from unreachable code are equal to the reachable ones but this check uses the opaques from hir typeck which means we again ignore Tait<U> there.
The text was updated successfully, but these errors were encountered:
lcnr
changed the title
hir typeck overwrites multiple definitions of the same opaque
hir typeck overwrites multiple defining uses of the same opaque
Apr 20, 2023
this passes but should error. The issue is that when writing the opaque type into the
TypeckResults
we drop the previous entry without comparing them for equality.rust/compiler/rustc_hir_typeck/src/writeback.rs
Line 587 in 7e23d18
normally this would get caught by borrowck which does handle them correctly, however
Tait<U>
is defined in unreachable code so mir borrowck does not catch this.we do explicitly check that the opaques from unreachable code are equal to the reachable ones but this check uses the opaques from hir typeck which means we again ignore
Tait<U>
there.The text was updated successfully, but these errors were encountered: