about summary refs log tree commit diff
path: root/compiler/rustc_infer
AgeCommit message (Collapse)AuthorLines
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
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