summary refs log tree commit diff
path: root/compiler/rustc_middle/src/traits
AgeCommit message (Collapse)AuthorLines
2020-11-25Auto merge of #79336 - camelid:rename-feature-oibit-to-auto, r=oli-obkbors-1/+1
Rename `optin_builtin_traits` to `auto_traits` They were originally called "opt-in, built-in traits" (OIBITs), but people realized that the name was too confusing and a mouthful, and so they were renamed to just "auto traits". The feature flag's name wasn't updated, though, so that's what this PR does. There are some other spots in the compiler that still refer to OIBITs, but I don't think changing those now is worth it since they are internal and not particularly relevant to this PR. Also see <https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/opt-in.2C.20built-in.20traits.20(auto.20traits).20feature.20name>. r? `@oli-obk` (feel free to re-assign if you're not the right reviewer for this)
2020-11-24Use the name "auto traits" everywhere in the compilerCamelid-1/+1
Goodbye, OIBIT!
2020-11-22Thread `Constness` through selectionJonas Schievink-6/+9
2020-11-16wordslcnr-1/+1
2020-10-30Update chalk 0.32.0 -> 0.35.0Matthew Jasper-42/+26
2020-10-23Review comments: use newtype instead of `bool`Esteban Küber-2/+15
2020-10-23Account for possible boxable `impl Future` in semicolon removal suggestionsEsteban Küber-2/+2
2020-10-22Reduce diagram mess in 'match arms have incompatible types' errorDavid Tolnay-0/+1
2020-10-22Normalize when finding trait object candidatesMatthew Jasper-1/+4
2020-10-20review commentsEsteban Küber-1/+1
2020-10-20Tweak "object unsafe" errorsEsteban Küber-20/+54
Fix #77598.
2020-10-06Handle multiple applicable projection candidatesMatthew Jasper-3/+4
2020-10-06Rollup merge of #76995 - LingMan:middle_matches, r=varkorYuki Okushi-4/+1
Reduce boilerplate with the matches! macro Replaces simple bool `match`es of the form match $expr { $pattern => true _ => false } and their inverse with invocations of the matches! macro. Limited to rustc_middle for now to get my feet wet.
2020-09-24remove enum name from ImplSource variantsBastian Kauschke-56/+55
2020-09-21Reduce boilerplate with the matches! macroLingMan-4/+1
Replaces simple bool `match`es of the form match $expr { $pattern => true _ => false } and their inverse with invocations of the matches! macro.
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