spun off from #47184 and #54570 :
Most of the necessary support for checking lifetime constraints introduced via complex patterns has been added. But one exceptional case which has not been properly dealt with is ref bindings.
If you look here the code explicitly says "ignore pattern_user_ty for now."
|
BindingMode::ByRef(..) => { |
|
// If this is a `ref` binding (e.g., `let ref |
|
// x: T = ..`), then the type of `x` is not |
|
// `T` but rather `&T`, so ignore |
|
// `pattern_user_ty` for now. |
|
// |
|
// FIXME(#47184): extract or handle `pattern_user_ty` somehow |
|
pattern_user_ty = None; |
|
} |
(I fixed a lot of instances of FIXME(#47184) in PR #55274, but I punted on this one.)
spun off from #47184 and #54570 :
Most of the necessary support for checking lifetime constraints introduced via complex patterns has been added. But one exceptional case which has not been properly dealt with is
refbindings.If you look here the code explicitly says "ignore
pattern_user_tyfor now."rust/src/librustc_mir/build/matches/mod.rs
Lines 518 to 526 in 3e6f30e
(I fixed a lot of instances of FIXME(#47184) in PR #55274, but I punted on this one.)