rust/compiler/rustc_middle/src
Matthias Krüger b8b2f88a04
Rollup merge of #101100 - compiler-errors:generalize-call-suggestions, r=petrochenkov
Make call suggestions more general and more accurate

Cleans up some suggestions that have to do with adding `()` to make typeck happy.

1. Drive-by rename of `expr_t` to `base_ty` since it's the type of the `base_expr`
1. Autoderef until we get to a callable type in `suggest_fn_call`.
1. Don't erroneously suggest calling constructor when a method/field does not exist on it.
1. Suggest calling a method receiver if its function output has a method (e.g. `fn.method()` => `fn().method()`)
1. Extend call suggestions to type parameters, fn pointers, trait objects where possible
1. Suggest calling in operators too (fixes #101054)
1. Use `/* {ty} */` as argument placeholder instead of just `_`, which is confusing and makes suggestions look less like `if let` syntax.
2022-08-31 07:58:00 +02:00
..
dep_graph Simplify the syntax for macros generated by rustc_queries 2022-08-24 00:37:49 -05:00
hir Rollup merge of #99821 - cjgillot:ast-lifetimes-2, r=compiler-errors 2022-08-29 16:49:39 +05:30
infer make PlaceholderConst not store the type of the const 2022-08-01 15:42:38 +01:00
middle Rollup merge of #99821 - cjgillot:ast-lifetimes-2, r=compiler-errors 2022-08-29 16:49:39 +05:30
mir Auto merge of #99102 - JakobDegen:reorder-generators, r=oli-obk 2022-08-30 23:43:33 +00:00
query Rollup merge of #99821 - cjgillot:ast-lifetimes-2, r=compiler-errors 2022-08-29 16:49:39 +05:30
thir Rename thir::Adt as thir::AdtExpr. 2022-08-24 15:06:50 +10:00
traits Note binding obligation causes for const equate errors 2022-08-24 17:53:35 +00:00
ty Rollup merge of #101100 - compiler-errors:generalize-call-suggestions, r=petrochenkov 2022-08-31 07:58:00 +02:00
util span: move MultiSpan 2022-04-05 07:01:00 +01:00
arena.rs arena > Rc for query results 2022-07-12 15:27:24 +02:00
lib.rs Revert let_chains stabilization 2022-08-29 19:34:11 +02:00
lint.rs Rename debugging_opts to unstable_opts 2022-07-13 17:47:06 -05:00
macros.rs impl TypeVisitable in type traversal macros 2022-07-05 22:25:33 +01:00
metadata.rs resolve/metadata: Stop encoding macros as reexports 2022-02-24 22:55:40 +03:00
tests.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
thir.rs Add some more THIR size assertions. 2022-08-24 15:06:50 +10:00