rust/compiler/rustc_middle/src
bors 41dc3942eb Auto merge of #75608 - estebank:suggest-boxed-match-exprs, r=lcnr,varkor
More structured suggestions for boxed trait objects instead of impl Trait on non-coerceable tail expressions

When encountering a `match` or `if` as a tail expression where the
different arms do not have the same type *and* the return type of that
`fn` is an `impl Trait`, check whether those arms can implement `Trait`
and if so, suggest using boxed trait objects.

Use structured suggestion for `impl T` to `Box<dyn T>`.

Fix https://github.com/rust-lang/rust/issues/69107
2020-09-14 19:57:57 +00:00
..
dep_graph mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
hir mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
ich mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
infer mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
middle pretty: trim paths of unique symbols 2020-09-02 22:26:37 +03:00
mir Auto merge of #75573 - Aaron1011:feature/const-mutation-lint, r=oli-obk 2020-09-10 05:54:26 +00:00
query Remove def_id field from ParamEnv 2020-09-09 10:14:31 +02:00
traits Auto merge of #75608 - estebank:suggest-boxed-match-exprs, r=lcnr,varkor 2020-09-14 19:57:57 +00:00
ty Remove def_id field from ParamEnv 2020-09-09 10:14:31 +02:00
util mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
arena.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
lib.rs datastructures: replace once_cell crate with an impl from std 2020-08-30 20:06:14 +01:00
lint.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
macros.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
tests.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00