summary refs log tree commit diff
path: root/compiler/rustc_middle/src/traits
AgeCommit message (Collapse)AuthorLines
2020-09-24remove enum name from ImplSource variantsBastian Kauschke-56/+55
2020-09-14Auto merge of #75608 - estebank:suggest-boxed-match-exprs, r=lcnr,varkorbors-0/+3
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-11Add test cases and address review commentsEsteban Küber-2/+2
2020-09-11Suggest boxed trait objects in tail `match` and `if` expressionsEsteban Küber-0/+3
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.
2020-09-09Remove def_id field from ParamEnvBram van den Heuvel-31/+5
2020-09-07Rollup merge of #76340 - jonas-schievink:rm-dupe, r=Mark-SimulacrumDylan DPC-68/+0
Remove unused duplicated `trivial_dropck_outlives` The copy that is actually in use now lives here: https://github.com/rust-lang/rust/blob/d2454643e137bde519786ee9e650c455d7ad6f34/compiler/rustc_trait_selection/src/traits/query/dropck_outlives.rs#L84
2020-09-04Review commentsJack Huey-23/+19
2020-09-04More chalk workJack Huey-0/+38
2020-09-04Upgrade chalk to 0.21Jack Huey-0/+15
2020-09-04Remove unused duplicated `trivial_dropck_outlives`Jonas Schievink-68/+0
2020-09-04Change ty.kind to a methodLeSeulArtichaut-1/+1
2020-08-30mv compiler to compiler/mark-0/+2060