about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
AgeCommit message (Collapse)AuthorLines
2023-01-25Rollup merge of #107282 - BoxyUwU:erica_builtin_pointee_impls, r=compiler-errorsMatthias Krüger-0/+105
erica solver: implement builtin `Pointee` trait impl candidates r? ```@compiler-errors```
2023-01-25Rollup merge of #106897 - estebank:issue-99430, r=davidtwcoMatthias Krüger-1/+1
Tweak E0597 CC #99430
2023-01-25Suggest mutable borrows correctlyMichael Goulet-8/+18
2023-01-25Liberate late-bound regions correctlyMichael Goulet-2/+2
2023-01-25Auto merge of #103902 - vincenzopalazzo:macros/obligation_rulesv2, r=oli-obkbors-73/+60
use `LocalDefId` instead of `HirId` in trait resolution to simplify the obligation clause resolution This commit introduces a refactoring suggested by `@lcnr` to simplify the obligation clause resolution. This is just the first PR that introduces a type of refactoring, but others PRs will follow this to introduce name changing to change from the variable name from `body_id` to something else. Fixes https://github.com/rust-lang/rust/issues/104827 Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com> `@rustbot` r? `@lcnr`
2023-01-25Rollup merge of #107227 - lcnr:solver-new-external-api, r=compiler-errorsDylan DPC-17/+32
`new_outside_solver` -> `evaluate_root_goal` r? ```@rust-lang/initiative-trait-system-refactor```
2023-01-24no without_constnessBoxy-2/+1
2023-01-24sorry ericaBoxy-1/+1
2023-01-24implement builtin candidateBoxy-0/+106
2023-01-23Point at specific field in struct literal when trait fulfillment failsNathan Fenner-1/+3
2023-01-23`new_outside_solver` -> `evaluate_root_goal`lcnr-17/+32
2023-01-23fix: use LocalDefId instead of HirId in trait resVincenzo Palazzo-73/+60
use LocalDefId instead of HirId in trait resolution to simplify the obligation clause resolution Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-01-23Rollup merge of #107101 - compiler-errors:perf-106309-1, r=petrochenkovYuki Okushi-2/+2
Filter param-env predicates for errors before calling `to_opt_poly_trait_pred` cc #106309 https://github.com/rust-lang/rust/pull/106757#issuecomment-1396616318 r? `@ghost`
2023-01-23Rollup merge of #104926 - spastorino:calculate_diverging_fallback-cleanups, ↵Dylan DPC-89/+5
r=lcnr Move relationships from FulfillmentContext to Inherited r? `@lcnr`
2023-01-22Store relationships on InherentSantiago Pastorino-89/+5
2023-01-21Address goal nitsMichael Goulet-38/+54
2023-01-21Implement some more predicatesMichael Goulet-7/+57
2023-01-20Rollup merge of #107061 - compiler-errors:new-solver-new-candidates-3, r=lcnrMichael Goulet-20/+202
Implement some more new solver candidates and fix some bugs First, fix some bugs: 1. `IndexVec::drain_enumerated(a..b)` does not give us an iterator of index keys + items enumerated from `a..b`, but from `0..(b-a)`... That caused a bug. See first commit for the fix. 2. Implement the `_: Trait` ambiguity hack. I put it in assemble, let me know if it should live elsewhere. This is important, since we otherwise consider `_: Sized` to have no solutions, and nothing passes! 3. Swap `Ambiguity` and `Unimplemented` cases for the new solver. Sorry for accidentally swapping them 😄 4. Check GATs' own predicates during projection confirmation. Then implement a few builtin traits: 5. Implement `PointerSized`. Pretty independent. 6. Implement `Fn` family of traits for fnptr, fndef, and closures. Closures are currently broken because `FulfillCtxt::relationships` is intentionally left unimplemented. See comment in the test. r? ```@lcnr```
2023-01-20Auto merge of #105102 - compiler-errors:copy-impl-considering-regions, r=lcnrbors-23/+70
Check ADT fields for copy implementations considering regions Fixes #88901 r? `@ghost`
2023-01-20Auto merge of #107106 - matthiaskrgr:rollup-g7r1ep0, r=matthiaskrgrbors-8/+26
Rollup of 6 pull requests Successful merges: - #106699 ([drop tracking] Visit break expressions ) - #106738 (Fix known-bug annotations) - #106891 (Tweak "borrow closure argument" suggestion) - #106928 (add raw identifier for keyword in suggestion) - #107065 (Clippy: Make sure to include in beta: Move `unchecked_duration_subtraction` to pedantic) - #107068 (autoderive Subdiagnostic for AddtoExternBlockSuggestion) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-20Auto merge of #107105 - matthiaskrgr:rollup-rkz9t7r, r=matthiaskrgrbors-22/+20
Rollup of 8 pull requests Successful merges: - #106783 (Recover labels written as identifiers) - #106973 (Don't treat closures from other crates as local) - #106979 (Document how to get the type of a default associated type) - #107053 (signal update string representation for haiku.) - #107058 (Recognise double-equals homoglyph) - #107067 (Custom MIR: Support storage statements) - #107076 (Added const-generic ui test case for issue #106419) - #107091 (Fix broken format strings in `infer.ftl`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-20Rollup merge of #106891 - estebank:issue-45727, r=petrochenkovMatthias Krüger-8/+26
Tweak "borrow closure argument" suggestion Fix #45727.
2023-01-20Rollup merge of #106973 - oli-obk:tait_ice_closure_in_impl_header, r=lcnrMatthias Krüger-22/+20
Don't treat closures from other crates as local fixes #104817 r? `@lcnr` Specialization can prefer an impl for an opaque type over a blanket impls that also matches. If the blanket impl only applies if an auto-trait applies, we look at the hidden type of the opaque type to see if that implements the auto trait. The hidden type can be a closure or generator, and thus we will end up seeing these types in coherence and have to handle them properly.
2023-01-20Auto merge of #106090 - WaffleLapkin:dereffffffffff, r=Nilstriebbors-9/+9
Remove some `ref` patterns from the compiler Previous PR: https://github.com/rust-lang/rust/pull/105368 r? `@Nilstrieb`
2023-01-20Filter predicates first for fast-path type flagsMichael Goulet-2/+2
2023-01-19Tweak "borrow closure argument" suggestionEsteban Küber-8/+26
Fix #45727.
2023-01-19trait solver: Implement Fn traits and tuple traitMichael Goulet-7/+142
2023-01-19trait solver: PointerSizedMichael Goulet-2/+39
2023-01-19swap Ambiguity and Unimplemented in new trait engineMichael Goulet-2/+4
2023-01-19Assert goal is fully normalized during assembleMichael Goulet-1/+4
2023-01-19Encode whether foreign opaques are TAITs or notMichael Goulet-1/+1
2023-01-19HACK: self ty ambiguity hackMichael Goulet-1/+11
2023-01-19Fix IndexVec::drain_enumeratedMichael Goulet-10/+5
2023-01-19Don't treat closures from other crates as localOli Scherer-22/+20
2023-01-18Rollup merge of #107030 - albertlarsan68:patch-3, r=lcnrMichael Goulet-1/+1
Correct typo https://github.com/rust-lang/rust/pull/106718#discussion_r1073508490
2023-01-18Rollup merge of #107023 - scottmcm:stop-shouting, r=NilstriebMichael Goulet-24/+24
Stop using `BREAK` & `CONTINUE` in compiler Switching them to `Break(())` and `Continue(())` instead. Entirely search-and-replace, though there's one spot where rustfmt insisted on a reformatting too. libs-api would like to remove these constants (https://github.com/rust-lang/rust/pull/102697#issuecomment-1385705202), so stop using them in compiler to make the removal PR later smaller.
2023-01-18Handle structural traits more gracefullyMichael Goulet-215/+212
2023-01-18no subtyping in the new trait solverMichael Goulet-34/+23
2023-01-18Sized, Copy/CloneMichael Goulet-3/+151
2023-01-18Auto and alias traitsMichael Goulet-21/+164
2023-01-18Assemble object bound candidatesMichael Goulet-0/+52
2023-01-18implement consider_assumptionMichael Goulet-10/+70
2023-01-18Canonicalize trait solver response inside probeMichael Goulet-24/+25
2023-01-18Correct typoAlbert Larsan-1/+1
2023-01-17Stop using `BREAK` & `CONTINUE` in compilerScott McMurray-24/+24
Switching them to `Break(())` and `Continue(())` instead. libs-api would like to remove these constants, so stop using them in compiler to make the removal PR later smaller.
2023-01-18add commentlcnr-0/+1
2023-01-18add note about indirect cycleslcnr-0/+4
2023-01-18update project to emulate a projection cachelcnr-14/+124
2023-01-18add `eq` to `InferCtxtExt`lcnr-38/+49
2023-01-18remove assembly context and impl a bit morelcnr-163/+311