rust/compiler/rustc_trait_selection/src
Mara Bos 19f97802ca
Rollup merge of #80635 - sexxi-goose:use-place-instead-of-symbol, 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.

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

r? ```@nikomatsakis```
2021-01-17 12:24:44 +00:00
..
traits Rollup merge of #80635 - sexxi-goose:use-place-instead-of-symbol, r=nikomatsakis` 2021-01-17 12:24:44 +00:00
autoderef.rs compiler: fold by value 2020-11-16 22:34:57 +01:00
infer.rs Remove compile-fail test suite 2020-12-29 23:39:56 +03:00
lib.rs TypeVisitor: use ControlFlow in rustc_{infer,lint,trait_selection} 2020-10-30 12:27:34 +01:00
opaque_types.rs Remove extra call to upvar_tys 2020-11-29 19:11:20 -05:00