Github Improve diagnostics when closure doesn't meet trait bound by roxelo · Pul...
source link: https://github.com/rust-lang/rust/pull/80635
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
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.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK