summary refs log tree commit diff
path: root/compiler/rustc_infer/src
AgeCommit message (Collapse)AuthorLines
2020-12-31Prevent caching projections in the case of cyclesMatthew Jasper-1/+15
When normalizing a projection which results in a cycle, we would cache the result of `project_type` without the nested obligations (because they're not needed for inference). This would result in the nested obligations only being handled once in fulfill, which would avoid the cycle error. Fixes #79714, a regresion from #79305 caused by the removal of `get_paranoid_cache_value_obligation`.
2020-12-20Auto merge of #80163 - jackh726:binder-refactor-part-3, r=lcnrbors-17/+21
Make BoundRegion have a kind of BoungRegionKind Split from #76814 Also includes making `replace_escaping_bound_vars` only return `T` Going to r? `@lcnr` Feel free to reassign
2020-12-20Auto merge of #79635 - lcnr:const-eval-idk, r=oli-obkbors-1/+13
const_evaluatable_checked: fix occurs check fixes #79615 this is kind of a hack because we use `TypeRelation` for both the `Generalizer` and the `ConstInferUnifier` but i am not sure if there is a useful way to disentangle this without unnecessarily duplicating some code. The error in the added test is kind of unavoidable until we erase the unused substs of `ConstKind::Unevaluated`. We talked a bit about this in the cg lazy norm meeting (https://rust-lang.zulipchat.com/#narrow/stream/260443-project-const-generics/topic/lazy_normalization_consts)
2020-12-19More rebindsJack Huey-3/+3
2020-12-18Change potentially_qualified to be defined on Binder<PredicateAtom>Jack Huey-5/+6
2020-12-18Make BoundRegion have a kind of BoungRegionKindJack Huey-17/+21
2020-12-18Rollup merge of #80046 - camelid:diag-docs, r=lcnrDylan DPC-1/+1
Add more documentation to `Diagnostic` and `DiagnosticBuilder` cc `@estebank`
2020-12-16Fix typo in method nameCamelid-1/+1
unsuccessfull -> unsuccessful
2020-12-11Move binder for dyn to each list itemJack Huey-1/+1
2020-12-08simplify if let Some(_) = x to if x.is_some() ↵Matthias Krüger-2/+2
(clippy::redundant_pattern_matching)
2020-12-05remove redundant clonesMatthias Krüger-1/+1
2020-12-03The details of higher-rank sub are in the rustc book not a doc module.Benjamin Peterson-3/+3
2020-12-02add comment to `visit_ct_substs`Bastian Kauschke-3/+1
2020-12-02Revert "Auto merge of #79209 - spastorino:trait-inheritance-self, ↵Santiago Pastorino-33/+1
r=nikomatsakis" This reverts commit 349b3b324dade7ca638091db93ba08bbc443c63d, reversing changes made to b776d1c3e3db8befabb123ebb1e46c3531eaed46.
2020-12-02const_evaluatable_checked: fix occurs checkBastian Kauschke-1/+15
2020-11-27Return FxIndexSet instead of FxHashSet to avoid order errors on different ↵Santiago Pastorino-3/+3
platforms
2020-11-27Inline elaborate_trait_refs_that_define_assoc_type into ↵Santiago Pastorino-32/+24
transitive_bounds_that_define_assoc_type
2020-11-27Document elaborate_trait_refs_that_define_assoc_typeSantiago Pastorino-0/+5
2020-11-27Allow to self reference associated types in where clausesSantiago Pastorino-0/+35
2020-11-26Rollup merge of #77758 - Stupremee:turbofish-help-for-const, r=varkorJonas Schievink-5/+27
suggest turbofish syntax for uninferred const arguments When not providing a const generic value, and it can not be inferred, the following suggestion is suggested: ![image](https://user-images.githubusercontent.com/39732259/95616180-af127b80-0a69-11eb-8877-551c815f9627.png) Resolves #76737 r? ``@varkor``
2020-11-22Thread `Constness` through selectionJonas Schievink-1/+1
2020-11-19Move `rustc_ty` -> `rustc_ty_utils`LeSeulArtichaut-1/+1
2020-11-18Suggest turbofish for uninferred const argumentJustus K-5/+27
2020-11-17Auto merge of #78779 - LeSeulArtichaut:ty-visitor-return, r=oli-obkbors-17/+13
Introduce `TypeVisitor::BreakTy` Implements MCP rust-lang/compiler-team#383. r? `@ghost` cc `@lcnr` `@oli-obk` ~~Blocked on FCP in rust-lang/compiler-team#383.~~
2020-11-16wordslcnr-1/+1
2020-11-16compiler: fold by valueBastian Kauschke-75/+73
2020-11-14Use `TypeVisitor::BreakTy` in `UnresolvedTypeFinder`LeSeulArtichaut-11/+4
2020-11-14Introduce `TypeVisitor::BreakTy`LeSeulArtichaut-6/+9
2020-11-13Rollup merge of #78463 - varkor:placeholder-const, r=nikomatsakisGuillaume Gomez-9/+9
Add type to `ConstKind::Placeholder` I simply threaded `<'tcx>` through everything that required it. I'm not sure whether this is the correct thing to do, but it seems to work. r? `@nikomatsakis`
2020-11-12Add type to `ConstKind::Placeholder`varkor-9/+9
2020-11-10Rollup merge of #76765 - guswynn:async_return, r=tmandryJonas Schievink-33/+133
Make it more clear what an about async fn's returns when referring to what it returns see #76547 This is *likely* not the ONLY place that this happens to be unclear, but we can move this fn to rustc_middle or something like that and reuse it if need be, to apply it to more diagnostics One outstanding question I have is, if the fn returns (), should I make the message more clear (what about `fn f()` vs `fn f() -> ()`, can you tell those apart in the hir?) R? `@tmandry` `@rustbot` modify labels +A-diagnostics +T-compiler
2020-11-04fix a couple of clippy warnings:Matthias Krüger-1/+0
filter_next manual_strip redundant_static_lifetimes single_char_pattern unnecessary_cast unused_unit op_ref redundant_closure useless_conversion
2020-10-30Remove implicit `Continue` typeLeSeulArtichaut-6/+6
2020-10-30TypeVisitor: use `ControlFlow` in rustc_{infer,lint,trait_selection}LeSeulArtichaut-11/+19
2020-10-29Rollup merge of #78460 - varkor:turbofish-string-generic, r=lcnrYuki Okushi-2/+0
Adjust turbofish help message for const generics Types are no longer special. (This message arguably only makes sense with `min_const_generics` or more, but we'll be there soon.) r? @lcnr
2020-10-28Remove irrelevant FIXMEvarkor-2/+0
2020-10-26Suggest calling await on method call and field accessEsteban Küber-1/+1
When encountering a failing method or field resolution on a `Future`, look at the `Output` and try the same operation on it. If successful, suggest calling `.await` on the `Future`. This had already been introduced in #72784, but at some point they stopped working.
2020-10-26Rollup merge of #78268 - JohnTitor:issue-78262, r=estebankDylan DPC-0/+8
Do not try to report on closures to avoid ICE Fixes #78262
2020-10-25Do not try to report on closures to avoid ICEYuki Okushi-0/+8
2020-10-23Suggest semicolon removal and boxing when appropriateEsteban Küber-8/+27
2020-10-23Add more `.await` suggestions on E0308Esteban Küber-38/+119
2020-10-23Review comments: use newtype instead of `bool`Esteban Küber-2/+3
2020-10-23Account for possible boxable `impl Future` in semicolon removal suggestionsEsteban Küber-14/+32
2020-10-22Reduce diagram mess in 'match arms have incompatible types' errorDavid Tolnay-2/+14
2020-10-21Lift: take self by valueBastian Kauschke-2/+2
2020-10-20review commentsEsteban Küber-1/+1
2020-10-20Tweak "object unsafe" errorsEsteban Küber-15/+22
Fix #77598.
2020-10-19revert workaround #73027SNCPlay42-15/+2
2020-10-17Make it more clear when complaining about async fn's return typesGus Wynn-33/+133
2020-10-16Review commentsJack Huey-1/+1