rust/compiler
bors da7d405357 Auto merge of #87244 - jackh726:issue-71883, r=estebank
Better diagnostics with mismatched types due to implicit static lifetime

Fixes #78113

I think this is my first diagnostics PR...definitely happy to hear thoughts on the direction/implementation here.

I was originally just trying to solve the error above, where the lifetime on a GAT was causing a cryptic "mismatched types" error. But as I was writing this, I realized that this (unintentionally) also applied to a different case: `wf-in-foreign-fn-decls-issue-80468.rs`. I'm not sure if this diagnostic should get a new error code, or even reuse an existing one. And, there might be some ways to make this even more generalized. Also, the error is a bit more lengthy and verbose than probably needed. So thoughts there are welcome too.

This PR essentially ended up adding a new nice region error pass that triggers if a type doesn't match the self type of an impl which is selected because of a predicate because of an implicit static bound on that self type.

r? `@estebank`
2021-07-20 10:56:08 +00:00
..
rustc
rustc_apfloat
rustc_arena
rustc_ast Remove special case for ExprKind::Paren in MutVisitor 2021-07-19 17:23:10 -05:00
rustc_ast_lowering Auto merge of #87244 - jackh726:issue-71883, r=estebank 2021-07-20 10:56:08 +00:00
rustc_ast_passes
rustc_ast_pretty
rustc_attr
rustc_builtin_macros Auto merge of #87225 - estebank:cleanup, r=oli-obk 2021-07-19 18:44:27 +00:00
rustc_codegen_cranelift Rollup merge of #87092 - ricobbe:fix-raw-dylib-multiple-definitions, r=petrochenkov 2021-07-18 14:21:56 +09:00
rustc_codegen_llvm Auto merge of #86950 - tmiasko:personality, r=nagisa 2021-07-18 20:33:23 +00:00
rustc_codegen_ssa Auto merge of #87153 - michaelwoerister:debuginfo-names-dyn-trait-projection-bounds, r=wesleywiser 2021-07-19 21:25:43 +00:00
rustc_data_structures
rustc_driver
rustc_error_codes
rustc_errors Various diagnostics clean ups/tweaks 2021-07-19 08:43:35 -07:00
rustc_expand Only use assign_id! for ast nodes that support attributes 2021-07-17 23:03:58 -05:00
rustc_feature Improve impl_trait_in_bindings removed feature text 2021-07-19 09:20:15 -03:00
rustc_fs_util
rustc_graphviz
rustc_hir Use == to compare OpaqueTyOrigin values 2021-07-18 09:30:10 -03:00
rustc_hir_pretty
rustc_incremental Move OnDiskCache to rustc_query_impl. 2021-07-18 11:14:07 +02:00
rustc_index
rustc_infer Auto merge of #87244 - jackh726:issue-71883, r=estebank 2021-07-20 10:56:08 +00:00
rustc_interface Remove deadlock virtual call. 2021-07-18 11:14:08 +02:00
rustc_lexer
rustc_lint Auto merge of #84959 - camsteffen:lint-suggest-group, r=estebank 2021-07-20 02:11:55 +00:00
rustc_lint_defs Compute a better lint_node_id during expansion 2021-07-17 23:03:56 -05:00
rustc_llvm
rustc_macros Move OnDiskCache to rustc_query_impl. 2021-07-18 11:14:07 +02:00
rustc_metadata Auto merge of #86698 - cjgillot:modc, r=estebank 2021-07-18 10:42:23 +00:00
rustc_middle Auto merge of #87244 - jackh726:issue-71883, r=estebank 2021-07-20 10:56:08 +00:00
rustc_mir Auto merge of #87224 - RalfJung:miri-ptr-oob, r=oli-obk 2021-07-20 08:15:15 +00:00
rustc_mir_build Revert "structural_match: non-structural-match ty closures" 2021-07-18 09:30:10 -03:00
rustc_parse Auto merge of #87242 - JohnTitor:rollup-t9rmwpo, r=JohnTitor 2021-07-18 08:15:17 +00:00
rustc_parse_format
rustc_passes
rustc_plugin_impl
rustc_privacy
rustc_query_impl Remove deadlock virtual call. 2021-07-18 11:14:08 +02:00
rustc_query_system
rustc_resolve Compute a better lint_node_id during expansion 2021-07-17 23:03:56 -05:00
rustc_save_analysis
rustc_serialize
rustc_session Make --force-warns a normal lint level option 2021-07-17 23:13:59 -07:00
rustc_span Auto merge of #87225 - estebank:cleanup, r=oli-obk 2021-07-19 18:44:27 +00:00
rustc_symbol_mangling
rustc_target
rustc_trait_selection Auto merge of #87244 - jackh726:issue-71883, r=estebank 2021-07-20 10:56:08 +00:00
rustc_traits
rustc_ty_utils
rustc_type_ir
rustc_typeck Auto merge of #87141 - spastorino:remove_impl_trait_in_bindings, r=oli-obk 2021-07-20 05:34:22 +00:00