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 }}
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.
closure_kind_origin uses a (Span, Symbol) to store which Variable and which span resulted in us selected a particular closure kind(Fn, FnMut, FnOnce).
We want to update this to now use (Span, Place) to point to precise access. This would require us to modify the definition in rustc_middle/src/ty/context.rs, adjust_closure-kind, and uses of this map.
The text was updated successfully, but these errors were encountered:
…mbol, r=nikomatsakis`
Improve diagnostics when closure doesn't meet trait bound
Improves the diagnostics when closure doesn't meet trait bound by modifying `TypeckResuts::closure_kind_origins` such that `hir::Place` is used instead of `Symbol`. Using `hir::Place` to describe which capture influenced the decision of selecting a trait a closure satisfies to (Fn/FnMut/FnOnce, Copy) allows us to show precise path in the diagnostics when `capture_disjoint_field` feature is enabled.
Closesrust-lang/project-rfc-2229/issues/21
r? `@nikomatsakis`
m-ou-se
added a commit
to m-ou-se/rust
that referenced
this issue
Jan 17, 2021
…mbol, r=nikomatsakis`
Improve diagnostics when closure doesn't meet trait bound
Improves the diagnostics when closure doesn't meet trait bound by modifying `TypeckResuts::closure_kind_origins` such that `hir::Place` is used instead of `Symbol`. Using `hir::Place` to describe which capture influenced the decision of selecting a trait a closure satisfies to (Fn/FnMut/FnOnce, Copy) allows us to show precise path in the diagnostics when `capture_disjoint_field` feature is enabled.
Closesrust-lang/project-rfc-2229/issues/21
r? ``@nikomatsakis``
closure_kind_origin
uses a(Span, Symbol)
to store which Variable and which span resulted in us selected a particular closure kind(Fn
,FnMut
,FnOnce
).We want to update this to now use
(Span, Place)
to point to precise access. This would require us to modify the definition inrustc_middle/src/ty/context.rs
,adjust_closure-kind
, and uses of this map.The text was updated successfully, but these errors were encountered: