about summary refs log tree commit diff
path: root/src/librustc_infer
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-17373/+0
2020-08-27Auto merge of #72784 - csmoe:issue-61076, r=estebankbors-0/+60
Await on mismatched future types Closes #61076 This PR suggests to `await` on: 1. `async_fn().bar() => async_fn().await.bar()` 2. `async_fn().field => async_fn().await.field` 3. ` if let x = async() {} => if let x = async().await {}` r? @tmandry @estebank
2020-08-27add projection_ty_from_predicates querycsmoe-11/+1
2020-08-26suggest await on unexpected typescsmoe-0/+70
2020-08-24Stabilize Range[Inclusive]::is_emptyScott McMurray-1/+0
I would like to propose these two simple methods for stabilization: - Knowing that a range is exhaused isn't otherwise trivial - Clippy would like to suggest them, but had to do extra work to disable that path <https://github.com/rust-lang/rust-clippy/issues/3807> because they're unstable - These work on `PartialOrd`, consistently with now-stable `contains`, and are thus more general than iterator-based approaches that need `Step` - They've been unchanged for some time, and have picked up uses in the compiler - Stabilizing them doesn't block any future iterator-based is_empty plans, as the inherent ones are preferred in name resolution
2020-08-18Provide better spans for the match arm without tail expressionWonwoo Choi-0/+9
2020-08-17rust_ast::ast => rustc_astUjjwal Sharma-1/+1
2020-08-15replaced log with tracingGurpreet Singh-2/+2
2020-08-14Rollup merge of #75448 - lcnr:rn-as_local_hir_id, r=davidtwcoTyler Mandry-7/+11
merge `as_local_hir_id` with `local_def_id_to_hir_id` `as_local_hir_id` was defined as just calling `local_def_id_to_hir_id` and I think that having two different ways to call the same method is somewhat confusing. Don't really care about which of these 2 methods we want to keep. Does this require an MCP, considering that these methods are fairly frequently used?
2020-08-14Rework `rustc_serialize`Matthew Jasper-6/+3
- Move the type parameter from `encode` and `decode` methods to the trait. - Remove `UseSpecialized(En|De)codable` traits. - Remove blanket impls for references. - Add `RefDecodable` trait to allow deserializing to arena-allocated references safely. - Remove ability to (de)serialize HIR. - Create proc-macros `(Ty)?(En|De)codable` to help implement these new traits.
2020-08-13merge `as_local_hir_id` with `local_def_id_to_hir_id`Bastian Kauschke-7/+11
2020-08-10Use existing `infcx` when emitting trait impl diagnosticAaron Hill-5/+3
Fixes #75361 Fixes #74918 Previously, we were creating a new `InferCtxt`, which caused an ICE when used with type variables from the existing `InferCtxt`
2020-08-08fix clippy::needless_return: remove unneeded return statementsMatthias Krüger-2/+2
2020-08-08fix clippy::clone_on_copy: don't clone types that are copyMatthias Krüger-4/+4
2020-08-07fix clippy::redundant_pattern_matching: use .is_some() instead of if let ↵Matthias Krüger-1/+2
Some(_) = ..
2020-08-07fix clippy::filter_next: use .find(..) instead of .filter(..).next()Matthias Krüger-5/+1
2020-08-03Auto merge of #74969 - nnethercote:rm-GCX_PTR, r=Mark-Simulacrumbors-2/+2
Remove `GCX_PTR`. We store an `ImplicitCtxt` pointer in a thread-local value (TLV). This allows implicit access to a `GlobalCtxt` and some other things. We also store a `GlobalCtxt` pointer in `GCX_PTR`. This is always the same `GlobalCtxt` as the one within the `ImplicitCtxt` pointer in TLV. `GCX_PTR` is only used in the parallel compiler's `handle_deadlock()` function. This commit does the following. - It removes `GCX_PTR`. - It also adds `ImplicitCtxt::new()`, which constructs an `ImplicitCtxt` from a `GlobalCtxt`. `ImplicitCtxt::new()` + `tls::enter_context()` is now equivalent to the old `tls::enter_global()`. - Makes `tls::get_tlv()` public for the parallel compiler, because it's now used in `handle_deadlock()`. r? @petrochenkov
2020-08-03Use more appropriate `tls::with_*` methods in some places.Nicholas Nethercote-2/+2
2020-08-02fix typosliuzhenyu-3/+3
2020-07-31Move from `log` to `tracing`Oliver Scherer-1/+1
2020-07-27fix rebaseBastian Kauschke-1/+1
2020-07-27directly contain `PredicateAtom` in `PredicateKind::ForAll`Bastian Kauschke-2/+0
2020-07-27introduce PredicateAtomBastian Kauschke-47/+41
2020-07-27add reuse_or_mk_predicateBastian Kauschke-4/+3
2020-07-27refactor query_outlives_constraints_into_obligationsBastian Kauschke-13/+6
2020-07-27this might be unqualified, but at least it's now quantifiedBastian Kauschke-1/+1
2020-07-27split ignore_qualifiersBastian Kauschke-18/+15
2020-07-27reviewBastian Kauschke-28/+14
2020-07-27fix elaborate for predicates with unbound variablesBastian Kauschke-9/+5
2020-07-27`PredicateKint` -> `PredicateKind`, the beginning of the endBastian Kauschke-58/+63
2020-07-27progressBastian Kauschke-3/+3
2020-07-27elaborateBastian Kauschke-14/+20
2020-07-27subst_supertraitBastian Kauschke-2/+2
2020-07-27convert trivial predicatesBastian Kauschke-13/+11
2020-07-27query_outlives_constraints_into_obligationsBastian Kauschke-20/+24
2020-07-27anonymize_predicateBastian Kauschke-22/+15
2020-07-23fixed error reporting for mismatched traitsAyrton-5/+24
mismatched traits were previously referred to as types
2020-07-22Change error code numberEsteban Küber-2/+2
2020-07-22Handle fully-qualified paths and add test casesEsteban Küber-82/+102
2020-07-22Partially account for case where used method is from traitEsteban Küber-5/+21
2020-07-22Use `ty::Instance::resolve` to identify `'static` bound sourceEsteban Küber-121/+100
2020-07-22Further tweak wording of E0759 and introduce E0767Esteban Küber-29/+78
2020-07-22Add more context to diagnosticEsteban Küber-14/+64
2020-07-22Increase accuracy of lifetime bound on trait object impl suggestionEsteban Küber-70/+159
2020-07-22Detect when `'static` obligation might come from an `impl`Esteban Küber-195/+270
Address #71341.
2020-07-17Auto merge of #72983 - Lezzz:rename-typeck, r=nikomatsakisbors-28/+38
Rename TypeckTables to TypeckResults. Originally suggested by @eddyb.
2020-07-17Rename TypeckTables to TypeckResults.Valentin Lazureanu-28/+38
2020-07-16apply bootstrap cfgsMark Rousskov-1/+0
2020-07-15improve namingBastian Kauschke-1/+1
2020-07-15const_eval_resolveBastian Kauschke-2/+2