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
The example below causes a panic in clippy 1.83. It will also cause a panic in older clippy releases 1.82 and 1.81. If it helps, I set up a repository here containing the example and reproductions.
The ICE disappears if we apply this patch to the example, removing the Channel's generic DMA_INST.
Fixes#13862
`missing_headers::check` is sometimes called from outside of a body
(specifically, from `check_attributes`, where the LateContext's ParamEnv
is not yet properly initialized for that item). Using that empty
ParamEnv for trait solving things from within the body can then lead to
various ICEs, like the linked issue where we have a const generic
parameter `DMA_INST` without a `ConstArgHasType` bound in the ParamEnv
so the const parameter has no type, which is normally not supposed to
happen.
We have the item's DefId so we can just get its ParamEnv/TypingEnv from
there, and using that one for trait solving should be safe.
changelog: none
Summary
The example below causes a panic in clippy 1.83. It will also cause a panic in older clippy releases 1.82 and 1.81. If it helps, I set up a repository here containing the example and reproductions.
The ICE disappears if we apply this patch to the example, removing the
Channel
's genericDMA_INST
.Version
Error output
Backtrace
The text was updated successfully, but these errors were encountered: