about summary refs log tree commit diff
path: root/compiler/rustc_infer/src
AgeCommit message (Collapse)AuthorLines
2021-02-01Rollup merge of #81504 - matsujika:suggestion-field-access, r=estebankJonas Schievink-0/+48
Suggest accessing field when appropriate Fix #81222 r? ``@estebank``
2021-02-01Rollup merge of #81463 - matsujika:nll-ensure-c-case, r=varkorJonas Schievink-11/+11
Rename NLL* to Nll* accordingly to C-CASE Given [C-CASE](https://rust-lang.github.io/api-guidelines/naming.html#casing-conforms-to-rfc-430-c-case), `NLLRegionVariableOrigin` and `NLL` are encouraged to be `NllRegionVariableOrigin` and `Nll` respectively.
2021-01-31RustfmtHirochika Matsumoto-1/+4
2021-01-31Fix prefix of debug logHirochika Matsumoto-1/+1
2021-01-30Rename function to `suggest_accessing_field_where_appropriate`Hirochika Matsumoto-2/+2
2021-01-30Account for unionHirochika Matsumoto-1/+8
2021-01-30Remove logging iteratorHirochika Matsumoto-3/+0
2021-01-29Suggest accessing field when code compiles with itHirochika Matsumoto-0/+41
2021-01-28Rename NLL* to Nll* accordingly to C-CASEHirochika Matsumoto-11/+11
2021-01-28Rollup merge of #79951 - LeSeulArtichaut:ty-ir, r=nikomatsakisYuki Okushi-2/+1
Refractor a few more types to `rustc_type_ir` In the continuation of #79169, ~~blocked on that PR~~. This PR: - moves `IntVarValue`, `FloatVarValue`, `InferTy` (and friends) and `Variance` - creates the `IntTy`, `UintTy` and `FloatTy` enums in `rustc_type_ir`, based on their `ast` and `chalk_ir` equilavents, and uses them for types in the rest of the compiler. ~~I will split up that commit to make this easier to review and to have a better commit history.~~ EDIT: done, I split the PR in commits of 200-ish lines each r? `````@nikomatsakis````` cc `````@jackh726`````
2021-01-18Use ty::{IntTy,UintTy,FloatTy} in rustcLeSeulArtichaut-2/+1
2021-01-18Add suggestion for impl_candidates with E0283Daiki Ihara-1/+39
Update compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
2021-01-16More review commentsJack Huey-4/+2
2021-01-16Review changesJack Huey-36/+37
2021-01-16CleanupJack Huey-1/+1
2021-01-16CleanupJack Huey-1/+1
2021-01-16Remove PredicateKindJack Huey-6/+2
2021-01-16Remove PredicateKind::AtomJack Huey-3/+1
2021-01-14Use Option::map_or instead of `.map(..).unwrap_or(..)`LingMan-2/+2
2021-01-13Auto merge of #80960 - Dylan-DPC:rollup-89tri8x, r=Dylan-DPCbors-12/+64
Rollup of 10 pull requests Successful merges: - #78901 (diagnostics: Note capturing closures can't be coerced to fns) - #79588 (Provide more information for HRTB lifetime errors involving closures) - #80232 (Remove redundant def_id lookups) - #80662 (Added support for i386-unknown-linux-gnu and i486-unknown-linux-gnu) - #80736 (use Once instead of Mutex to manage capture resolution) - #80796 (Update to LLVM 11.0.1) - #80859 (Fix --pretty=expanded with --remap-path-prefix) - #80922 (Revert "Auto merge of #76896 - spastorino:codegen-inline-fns2) - #80924 (Fix rustdoc --test-builder argument parsing) - #80935 (Rename `rustc_middle::lint::LevelSource` to `LevelAndSource`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-01-13Auto merge of #79322 - jyn514:refactor-impl, r=estebankbors-4/+5
Separate out a `hir::Impl` struct This makes it possible to pass the `Impl` directly to functions, instead of having to pass each of the many fields one at a time. It also simplifies matches in many cases. See `rustc_save_analysis::dump_visitor::process_impl` or `rustdoc::clean::clean_impl` for a good example of how this makes `impl`s easier to work with. r? `@petrochenkov` maybe?
2021-01-12Separate out a `hir::Impl` structJoshua Nelson-4/+5
This makes it possible to pass the `Impl` directly to functions, instead of having to pass each of the many fields one at a time. It also simplifies matches in many cases.
2021-01-12Provide more information for HRTB lifetime errors involving closuresEsteban Küber-12/+64
2021-01-10Tweak `?` inference error messagesWilliam Bain-11/+8
2021-01-10Extract parent def handling for infer failure errWilliam Bain-35/+20
2021-01-10Refactor `cannot infer ...` message renderingWilliam Bain-145/+92
2021-01-10Note inference failures using `?` conversionWilliam Bain-30/+168
2021-01-05Rollup merge of #80637 - LingMan:filter, r=oli-obkYuki Okushi-19/+9
Use Option::filter instead of open-coding it `@rustbot` modify labels +C-cleanup +T-compiler
2021-01-03Use Option::filter instead of open-coding itLingMan-19/+9
2021-01-02reduce borrowing and (de)referencing around match patterns ↵Matthias Krüger-1/+1
(clippy::match_ref_pats)
2021-01-01adjust const generics defaults FIXMEs to the new feature gateRémy Rakic-1/+1
2020-12-31FIx ICE on wf check for foreign fnsYuki Okushi-0/+8
2020-12-30Rollup merge of #80509 - matthiaskrgr:ptr_arg, r=varkorYuki Okushi-2/+2
where possible, pass slices instead of &Vec or &String (clippy::ptr_arg)
2020-12-30where possible, pass slices instead of &Vec or &String (clippy::ptr_arg)Matthias Krüger-2/+2
2020-12-30Rollup merge of #80348 - matthiaskrgr:less_clones, r=Dylan-DPCYuki Okushi-1/+1
remove redundant clones (clippy::redundant_clone)
2020-12-28Rollup merge of #80344 - matthiaskrgr:matches, r=Dylan-DPCDylan DPC-17/+4
use matches!() macro in more places
2020-12-24use matches!() macro in more placesMatthias Krüger-17/+4
2020-12-24remove redundant clones (clippy::redundant_clone)Matthias Krüger-1/+1
2020-12-20Prevent 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