about summary refs log tree commit diff
path: root/src/librustc_trait_selection
AgeCommit message (Collapse)AuthorLines
2020-04-14Rename AssocKind::Method to AssocKind::FnRustin-Liu-7/+7
Rename fn_has_self_argument to fn_has_self_parameter Rename AssocItemKind::Method to AssocItemKind::Fn Refine has_no_input_arg Refine has_no_input_arg Revert has_no_input_arg Refine suggestion_descr Move as_def_kind into AssocKind Signed-off-by: Rustin-Liu <rustin.liu@gmail.com> Fix tidy check issue Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
2020-04-12Rollup merge of #71069 - marmeladema:dummy-hir-id-obligation-clause, r=eddybDylan DPC-12/+6
Remove some usage of `DUMMY_HIR_ID` Use `ObligationClause::dummy()` when appropriate or replace `hir::DUMMY_HIR_ID`by `hir::CRATE_HIR_ID`, as used in `ObligationClause::dummy()`.
2020-04-12Remove usage of `DUMMY_HIR_ID` in calls to `ObligationClause::misc`marmeladema-12/+6
Use `ObligationClause::dummy()` when appropriate or replace `hir::DUMMY_HIR_ID` by `hir::CRATE_HIR_ID`, as used in `ObligationClause::dummy()`.
2020-04-12Rollup merge of #71041 - JohnTitor:rustc-dev-guide, r=jonas-schievinkDylan DPC-2/+2
Update links of `rustc guide` Picks up the things we left behind in the transition, hopefully they're last ones. r? @spastorino
2020-04-11review commentsEsteban Küber-8/+8
2020-04-11review commentsEsteban Küber-2/+30
2020-04-11Try to use the first char in the trait name as type paramEsteban Küber-2/+2
2020-04-11Account for existing names when suggesting adding a type paramEsteban Küber-4/+5
2020-04-11Account for type params with boundsEsteban Küber-5/+6
2020-04-11review commentsEsteban Küber-92/+86
2020-04-11review commentsEsteban Küber-130/+140
2020-04-11Handle `impl Trait` where `Trait` has an assoc type with missing boundsEsteban Küber-21/+131
Fix #69638.
2020-04-12Update links of `rustc guide`Yuki Okushi-2/+2
2020-04-11Auto merge of #70161 - cjgillot:query-arena, r=nikomatsakisbors-4/+8
Allocate some query results on an arena This avoids a cloning few `Lrc` and `Vec`s in the queries.
2020-04-10Auto merge of #70986 - marmeladema:issue70853/librustc_middle-local-def-id, ↵bors-1/+2
r=eddyb rustc_middle: return `LocalDefId` where possible in hir::map module This changes the return type of the following functions to return a `LocalDefId` instead of a `DefId`: * opt_local_def_id_from_node_id * opt_local_def_id * body_owner_def_id * local_def_id_from_node_id * get_parent_id This is another step in the right direction for #70853 This pull request will be followed by another (substantial one) which changes the return type of `local_def_id` function but this change being more invasive, we might want to wait for #70956 or #70961 (or some other form it) to land first.
2020-04-10Rollup merge of #69745 - estebank:predicate-obligations-3, r=nikomatsakis,eddybMazdak Farrokhzad-22/+38
Use `PredicateObligation`s instead of `Predicate`s Keep more information about trait binding failures. Use more specific spans by pointing at bindings that introduce obligations. Subset of #69709. r? @eddyb
2020-04-10librustc_middle: return LocalDefId instead of DefId in body_owner_def_idmarmeladema-3/+3
2020-04-10librustc_middle: return LocalDefId instead of DefId in opt_local_def_idmarmeladema-1/+2
2020-04-08Small tweaks to required bound spanEsteban Küber-4/+12
2020-04-08Use `PredicateObligation`s instead of `Predicate`sEsteban Küber-20/+28
Keep more information about trait binding failures.
2020-04-08do_normalize_predicates: add delay_span_bugBastian Kauschke-1/+1
2020-04-08replace `has_local_value` with `needs_infer`Bastian Kauschke-8/+8
2020-04-08Rollup merge of #70892 - lcnr:interators_are_nice, r=nikomatsakisDylan DPC-155/+151
wf: refactor `compute_trait_ref` moves `extend_cause_with_original_assoc_item_obligation` out of `compute_trait_ref` and changes `trait_assoc_items` to an iterator. This saves us from building an unnecessary `Vec<_>` r? @eddyb i guess
2020-04-07wf: refactor `compute_trait_ref`Bastian Kauschke-155/+151
2020-04-07Rollup merge of #70857 - faern:use-assoc-int-float-consts, r=dtolnayDylan DPC-7/+3
Don't import integer and float modules, use assoc consts 2 Follow up to #70777. I missed quite a lot of places. Partially because I wanted to keep the size of the last PR down, and partially because my regexes were not good enough :) r? @dtolnay
2020-04-07Auto merge of #70164 - eddyb:walk-generic-arg, r=nikomatsakisbors-114/+181
ty/walk: iterate `GenericArg`s instead of `Ty`s. Before this PR, `Ty::walk` only iterated over `Ty`s, but that's becoming an increasing problem with `const` generics, as `ty::Const`s in `Substs` are missed by it. By working with `GenericArg` instead, we can handle both `Ty`s and `ty::Const`s, but also `ty::Region`s, which used to require ad-hoc mechanisms such as `push_regions`. I've also removed `TraitRef::input_types`, as it's both long obsolete, and easy to misuse.
2020-04-07Use assoc integer constants in librustc_*Linus Färnstrand-7/+3
2020-04-07Rollup merge of #70821 - rkuhn:expose_suggestions_InferCtxtExt, r=eddybDylan DPC-1/+2
expose suggestions::InferCtxtExt for clippy This is very useful to do good async/await diagnostic reporting, for example for https://github.com/rust-lang/rust-clippy/pull/5423.
2020-04-06ty: remove `{Existential,}Trait{Ref,Predicate}::input_types`.Eduard-Mihai Burtescu-23/+39
2020-04-06ty: switch `Ty::walk` from `Ty` to `GenericArg`.Eduard-Mihai Burtescu-74/+94
2020-04-06traits/coherence: stop using `Ty::walk_shallow`.Eduard-Mihai Burtescu-19/+50
2020-04-06Update src/librustc_trait_selection/traits/error_reporting/suggestions.rsRoland Kuhn-1/+1
Co-Authored-By: varkor <github@varkor.com>
2020-04-05expose suggestions::InferCtxtExt for clippyRoland Kuhn-1/+2
2020-04-05"cannot resolve" → "cannot satisfy"Esteban Küber-5/+5
2020-04-05Allocate query Vecs on the arena.Camille GILLOT-4/+8
2020-04-03Rollup merge of #70641 - estebank:dedup-code, r=nikomatsakisMazdak Farrokhzad-295/+2
Remove duplicated code in trait selection
2020-04-03Rollup merge of #70731 - JohnTitor:follow-up-rustc-middle, r=eddybDylan DPC-1/+1
Minor follow-up after renaming librustc(_middle) Fixes #70537 r? @Centril @eddyb
2020-04-03Minor follow-up after renaming librustc(_middle)Yuki Okushi-1/+1
2020-04-03.unwrap() less on .span_to_snippet()Mazdak Farrokhzad-17/+15
2020-04-03get_fn_like_arguments: avoid .unwrapMazdak Farrokhzad-33/+24
2020-04-02Rollup merge of #70658 - davidtwco:issue-70285-still-further-specializable, ↵Mazdak Farrokhzad-1/+1
r=eddyb add `STILL_FURTHER_SPECIALIZABLE` flag Contributes to #70285. This PR adds a `STILL_FURTHER_SPECIALIZABLE` flag to `TypeFlags` which replaces `needs_infer` and `needs_subst` in `Instance::resolve` and `assemble_candidates_from_impls`. r? @eddyb
2020-04-02direct imports for langitem stuffMazdak Farrokhzad-3/+3
2020-04-02use direct import for ErrorReportedMazdak Farrokhzad-5/+3
2020-04-02nix rustc_target::abi::* reexport in ty::layoutMazdak Farrokhzad-1/+1
2020-04-02add `STILL_FURTHER_SPECIALIZABLE` flagDavid Wood-1/+1
This commit adds a STILL_FURTHER_SPECIALIZABLE flag to `TypeFlags` which replaces `needs_infer` and `needs_subst` in `Instance::resolve` and `assemble_candidates_from_impls.` Signed-off-by: David Wood <david@davidtw.co>
2020-04-01Remove duplicated code in trait selectionEsteban Küber-295/+2
2020-03-30Use query instead of `impl_is_default` fnJonas Schievink-2/+1
2020-03-30Sync `Instance::resolve` with the projection codeJonas Schievink-45/+2
2020-03-30spec. graph: track defining and finalizing implsJonas Schievink-55/+14
2020-03-30Simplify `NodeItem`Jonas Schievink-1/+1
The generic parameter is unused, and so is `map`