rust/src/librustc_typeck
Mazdak Farrokhzad 4720fcac4c
Rollup merge of #59216 - stepnivlk:type_dependent_defs-wrappers, r=oli-obk
Type dependent defs wrappers

First of all, forgive me if something would seem lame to you or I offend some rule (although I tried to read through docs), this is my first PR.

Issue: https://github.com/rust-lang/rust/issues/59094

This PR adds 3 helper methods to `TypeckTables`:
* `opt_type_dependent_def`
* `opt_type_dependent_def_id`
* `type_dependent_def_id`

I didn't add `type_dependent_def` as was proposed in the issue simply because it wasn't used anywhere in the code. Only non-option wrapped`type_dependent_defs()[]` accesses were found in clippy which always called `def_id()` on result.
Speaking of clippy, should I open separate PR in its own repo, given it's used as submodule here?

Sry it took me so long, as I said I'm new here and I had tough week :).
2019-03-28 13:35:33 +01:00
..
check Rollup merge of #59216 - stepnivlk:type_dependent_defs-wrappers, r=oli-obk 2019-03-28 13:35:33 +01:00
coherence Auto merge of #59068 - ljedrz:kill_off_NodeId_stragglers, r=Zoxc 2019-03-23 17:34:18 +00:00
outlives HirIdification: replace NodeId method calls 2019-03-07 09:22:43 +01:00
variance Separate variant id and variant constructor id. 2019-03-24 12:10:16 +03:00
astconv.rs hir: replace NodeId with HirId in ItemId 2019-03-25 13:08:46 +01:00
Cargo.toml librustc_typeck => 2018 2019-02-08 22:30:58 +09:00
check_unused.rs HirIdification: replace NodeId method calls 2019-03-07 09:22:43 +01:00
collect.rs Rollup merge of #59004 - GuillaumeGomez:generics-handling, r=QuietMisdreavus 2019-03-26 22:26:36 +01:00
constrained_type_params.rs Revert the LazyConst PR 2019-03-16 21:04:10 +01:00
diagnostics.rs Unify E0109, E0110 and E0111 diagnostic messages 2019-03-20 18:32:13 +00:00
impl_wf_check.rs Handle const generics in typeck 2019-03-05 22:20:01 +00:00
lib.rs Rollup merge of #59004 - GuillaumeGomez:generics-handling, r=QuietMisdreavus 2019-03-26 22:26:36 +01:00
namespace.rs Remove licenses 2018-12-25 21:08:33 -07:00
README.md rustc-guide has moved 2018-11-26 15:03:13 -06:00
structured_errors.rs Rollup merge of #57856 - lzutao:fix-old-first-edition, r=steveklabnik 2019-02-14 02:41:16 +01:00

For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc guide.