10

Github Improve diagnostics when closure doesn't meet trait bound by roxelo · Pul...

 3 years ago
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.
neoserver,ios ssh client

Contributor

roxelo commented 28 days ago

edited

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.

Closes rust-lang/project-rfc-2229/issues/21

r? @nikomatsakis


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK