1
Fork 0
rust/compiler
Michael Goulet bc60d50eaa Provide associated type information in method chains
When encountering an unmet obligation that affects a method chain, like
in iterator chains where one of the links has the wrong associated
type, we point at every method call and mention their evaluated
associated type at that point to give context to the user of where
expectations diverged from the code as written.

```
note: the expression is of type `Map<std::slice::Iter<'_, {integer}>, [closure@$DIR/invalid-iterator-chain.rs:12:18: 12:21]>`
  --> $DIR/invalid-iterator-chain.rs:12:14
   |
LL |         vec![0, 1]
   |         ---------- this expression has type `Vec<{integer}>`
LL |             .iter()
   |              ------ associated type `std::iter::Iterator::Item` is `&{integer}` here
LL |             .map(|x| { x; })
   |              ^^^^^^^^^^^^^^^ associated type `std::iter::Iterator::Item` is `()` here
```
2022-12-11 09:46:01 -08:00
..
rustc rustc: Use unix_sigpipe instead of rustc_driver::set_sigpipe_handler 2022-10-02 17:49:36 +02:00
rustc_abi compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_apfloat compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_arena compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_ast compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_ast_lowering compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_ast_passes Auto merge of #104861 - nnethercote:attr-cleanups, r=petrochenkov 2022-12-01 07:13:45 +00:00
rustc_ast_pretty Remove outdated syntax from trait alias pretty printing 2022-12-06 13:45:11 +00:00
rustc_attr rustc_attr remove ref patterns 2022-12-06 14:45:58 +00:00
rustc_baked_icu_data Update crate documentation of rustc_baked_icu_data crate 2022-11-18 14:46:36 -08:00
rustc_borrowck Remove unneeded field from SwitchTargets 2022-12-09 04:53:10 -08:00
rustc_builtin_macros Rollup merge of #105537 - kadiwa4:remove_some_imports, r=fee1-dead 2022-12-11 09:51:57 +01:00
rustc_codegen_cranelift Remove unneeded field from SwitchTargets 2022-12-09 04:53:10 -08:00
rustc_codegen_gcc Rollup merge of #105109 - rcvalle:rust-kcfi, r=bjorn3 2022-12-10 09:24:43 +01:00
rustc_codegen_llvm Auto merge of #102900 - abrachet:master, r=bjorn3 2022-12-11 14:42:45 +00:00
rustc_codegen_ssa Rollup merge of #105537 - kadiwa4:remove_some_imports, r=fee1-dead 2022-12-11 09:51:57 +01:00
rustc_const_eval Rollup merge of #105537 - kadiwa4:remove_some_imports, r=fee1-dead 2022-12-11 09:51:57 +01:00
rustc_data_structures compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_driver compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_error_codes compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_error_messages Migrate parts of rustc_expand to session diagnostics 2022-12-10 11:02:41 +01:00
rustc_errors Rollup merge of #105537 - kadiwa4:remove_some_imports, r=fee1-dead 2022-12-11 09:51:57 +01:00
rustc_expand Rollup merge of #105537 - kadiwa4:remove_some_imports, r=fee1-dead 2022-12-11 09:51:57 +01:00
rustc_feature Rollup merge of #105109 - rcvalle:rust-kcfi, r=bjorn3 2022-12-10 09:24:43 +01:00
rustc_fs_util Remove useless borrows and derefs 2022-12-01 17:34:43 +00:00
rustc_graphviz Remove useless borrows and derefs 2022-12-01 17:34:43 +00:00
rustc_hir compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_hir_analysis Rollup merge of #105537 - kadiwa4:remove_some_imports, r=fee1-dead 2022-12-11 09:51:57 +01:00
rustc_hir_pretty Remove outdated syntax from trait alias pretty printing 2022-12-06 13:45:11 +00:00
rustc_hir_typeck Rollup merge of #105542 - compiler-errors:confirm-nits, r=jackh726 2022-12-11 00:30:21 +01:00
rustc_incremental compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_index compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_infer Rollup merge of #105443 - compiler-errors:move-more, r=oli-obk 2022-12-09 07:25:46 +01:00
rustc_interface compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_lexer compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_lint Rollup merge of #105537 - kadiwa4:remove_some_imports, r=fee1-dead 2022-12-11 09:51:57 +01:00
rustc_lint_defs Make deref_into_dyn_supertrait lint the impl and not the usage 2022-11-23 15:40:27 +00:00
rustc_llvm Rollup merge of #105109 - rcvalle:rust-kcfi, r=bjorn3 2022-12-10 09:24:43 +01:00
rustc_log Use IsTerminal in rustc_log 2022-10-16 15:10:40 +01:00
rustc_macros Auto merge of #105220 - oli-obk:feeding, r=cjgillot 2022-12-06 03:47:41 +00:00
rustc_metadata compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_middle Rollup merge of #105537 - kadiwa4:remove_some_imports, r=fee1-dead 2022-12-11 09:51:57 +01:00
rustc_mir_build Rollup merge of #105537 - kadiwa4:remove_some_imports, r=fee1-dead 2022-12-11 09:51:57 +01:00
rustc_mir_dataflow Rollup merge of #105537 - kadiwa4:remove_some_imports, r=fee1-dead 2022-12-11 09:51:57 +01:00
rustc_mir_transform Rollup merge of #105537 - kadiwa4:remove_some_imports, r=fee1-dead 2022-12-11 09:51:57 +01:00
rustc_monomorphize compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_parse compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_parse_format Assert size of rustc_parse_format::Piece<'_> 2022-12-08 22:50:39 +00:00
rustc_passes Rollup merge of #105267 - compiler-errors:issue-104613, r=oli-obk 2022-12-07 15:39:06 +01:00
rustc_plugin_impl Migrate all diagnostics 2022-10-23 10:09:44 +02:00
rustc_privacy drive-by: move field_index to typeck results 2022-12-04 17:59:21 +00:00
rustc_query_impl Auto merge of #104940 - cjgillot:query-feed-simple, r=oli-obk 2022-11-30 17:20:14 +00:00
rustc_query_system compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_resolve Fold Definitions into the untracked data 2022-12-09 14:59:39 +00:00
rustc_save_analysis compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_serialize compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_session compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_smir
rustc_span compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_symbol_mangling Rollup merge of #105109 - rcvalle:rust-kcfi, r=bjorn3 2022-12-10 09:24:43 +01:00
rustc_target compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
rustc_trait_selection Provide associated type information in method chains 2022-12-11 09:46:01 -08:00
rustc_traits Move some suggestions from error_reporting to error_reporting::suggest 2022-12-08 05:58:30 +00:00
rustc_transmute Auto merge of #103831 - chenyukang:yukang/fix-103751-ice, r=nagisa 2022-11-05 13:48:30 +00:00
rustc_ty_utils Rollup merge of #105082 - Swatinem:async-abi, r=compiler-errors 2022-12-10 09:24:43 +01:00
rustc_type_ir compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00