1
Fork 0
rust/compiler/rustc_trait_selection/src/traits
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
..
error_reporting Rollup merge of #80635 - sexxi-goose:use-place-instead-of-symbol, r=nikomatsakis` 2021-01-17 12:24:44 +00:00
query remove redundant clones 2020-12-05 12:59:54 +01:00
select reduce borrowing and (de)referencing around match patterns (clippy::match_ref_pats) 2021-01-02 20:09:17 +01:00
specialize Thread Constness through selection 2020-11-22 02:13:53 +01:00
auto_trait.rs Rollup merge of #80254 - Aaron1011:rustdoc-auto-param-env, r=estebank 2021-01-15 18:26:04 +09:00
chalk_fulfill.rs compiler: fold by value 2020-11-16 22:34:57 +01:00
codegen.rs compiler: fold by value 2020-11-16 22:34:57 +01:00
coherence.rs use matches!() macro in more places 2020-12-24 13:35:12 +01:00
const_evaluatable.rs Keep an unoptimized duplicate of const fn around 2021-01-04 21:40:38 +00:00
engine.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
fulfill.rs compiler: fold by value 2020-11-16 22:34:57 +01:00
misc.rs compiler: fold by value 2020-11-16 22:34:57 +01:00
mod.rs use matches!() macro in more places 2020-12-24 13:35:12 +01:00
object_safety.rs More rebinds 2020-12-19 04:26:35 -05:00
on_unimplemented.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
project.rs Prevent caching projections in the case of cycles 2020-12-20 21:47:51 +00:00
structural_match.rs Use TypeVisitor::BreakTy in structural_match::Search 2020-11-14 21:15:32 +01:00
util.rs More rebinds 2020-12-19 04:26:35 -05:00
wf.rs Separate out a hir::Impl struct 2021-01-12 20:32:33 -05:00