about summary refs log tree commit diff
path: root/compiler/rustc_traits/src/chalk
AgeCommit message (Collapse)AuthorLines
2022-02-11Fix more chalk lowering issuesMatthew Jasper-16/+22
- Implement lowering for subtype goals - Use correct lang item for Generator trait - Use `lower_into` for lowering `ty::Variance`
2022-02-11Stop using a placeholder for empty regions in ChalkMatthew Jasper-60/+14
2022-02-11Revert "Auto merge of #92007 - oli-obk:lazy_tait2, r=nikomatsakis"Oli Scherer-6/+0
This reverts commit e7cc3bddbe0d0e374d05e7003e662bba1742dbae, reversing changes made to 734368a200904ef9c21db86c595dc04263c87be0.
2022-02-02Lazily resolve type-alias-impl-trait defining usesOli Scherer-0/+6
by using an opaque type obligation to bubble up comparisons between opaque types and other types Also uses proper obligation causes so that the body id works, because out of some reason nll uses body ids for logic instead of just diagnostics.
2022-01-18Auto merge of #87648 - JulianKnodt:const_eq_constrain, r=oli-obkbors-3/+17
allow eq constraints on associated constants Updates #70256 (cc `@varkor,` `@Centril)`
2022-01-18Rollup merge of #92640 - compiler-errors:array-deref-on-newtype, r=lcnrMatthias Krüger-4/+4
Fix ICEs related to `Deref<Target=[T; N]>` on newtypes 1. Stash a const infer's type into the canonical var during canonicalization, so we can recreate the fresh const infer with that same type. For example, given `[T; _]` we know `_` is a `usize`. If we go from infer => canonical => infer, we shouldn't forget that variable is a usize. Fixes #92626 Fixes #83704 2. Don't stash the autoderef'd slice type that we get from method lookup, but instead recreate it during method confirmation. We need to do this because the type we receive back after picking the method references a type variable that does not exist after probing is done. Fixes #92637 ... A better solution for the second issue would be to actually _properly_ implement `Deref` for `[T; N]` instead of fixing this autoderef hack to stop leaking inference variables. But I actually looked into this, and there are many complications with const impls.
2022-01-17Add term to ExistentialProjectionkadmin-1/+3
Also prevent ICE when adding a const in associated const equality.
2022-01-17Update term for use in more placeskadmin-2/+14
Replace use of `ty()` on term and use it in more places. This will allow more flexibility in the future, but slightly worried it allows items which are consts which only accept types.
2022-01-17Use Term in ProjectionPredicatekadmin-2/+2
ProjectionPredicate should be able to handle both associated types and consts so this adds the first step of that. It mainly just pipes types all the way down, not entirely sure how to handle consts, but hopefully that'll come with time.
2022-01-15initial revertEllen-13/+2
2022-01-12Canonicalize const variables correctlyMichael Goulet-4/+4
2022-01-07Add `trait_item_def_id` to `AssocItem`Matthew Jasper-13/+3
This allows avoiding some lookups by name
2021-12-31Auto merge of #91929 - ↵bors-1/+1
anuvratsingh:remove_in_band_lifetimes_compiler_rustc_traits, r=jackh726 Removed `in_band_lifetimes` from `rustc_traits` Issue: [#91867](https://github.com/rust-lang/rust/issues/91867)
2021-12-30Removed `in_band_lifetimes` from `rustc_traits`Anuvrat-1/+1
2021-12-22Update chalk to 0.75.0pierwill-81/+82
- Compute flags in `intern_ty` - Remove tracing-serde from PERMITTED_DEPENDENCIES - Disable `tracing-full` feature in `chalk-solve` - Bump tracing-tree to 0.2.0
2021-12-02Reduce boilerplate around infallible foldersAlan Egerton-43/+35
2021-11-26Unwrap the results of type foldersLeSeulArtichaut-21/+23
Co-authored-by: Alan Egerton <eggyal@gmail.com>
2021-11-26Adapt `TypeFolder` implementors to return a `Result`LeSeulArtichaut-14/+20
Co-authored-by: Alan Egerton <eggyal@gmail.com>
2021-10-08clippy::complexity fixesMatthias Krüger-1/+1
2021-08-26make unevaluated const substs optionallcnr-4/+5
2021-08-26require a `tcx` for `TypeVisitor`lcnr-2/+12
2021-08-22Fix typos “a”→“an”Frank Steffahn-1/+1
2021-08-19introduce a Coerce predicateNiko Matsakis-0/+4
2021-08-13move Constness into TraitPredicateDeadbeef-4/+4
2021-06-23Use HTTPS links where possibleSmitty-1/+1
2021-03-31Add var to BoundRegion. Add query to get bound vars for applicable items.Jack Huey-17/+21
2021-03-31Add tcx lifetime to BinderJack Huey-6/+11
2021-03-23Add has_default to GenericParamDefKind::Constkadmin-1/+1
This currently creates a field which is always false on GenericParamDefKind for future use when consts are permitted to have defaults Update const_generics:default locations Previously just ignored them, now actually do something about them. Fix using type check instead of value Add parsing This adds all the necessary changes to lower const-generics defaults from parsing. Change P<Expr> to AnonConst This matches the arguments passed to instantiations of const generics, and makes it specific to just anonymous constants. Attempt to fix lowering bugs
2021-03-03Fix testsRyan Levick-1/+1
2021-02-13Make ProjectionTy::trait_ref truncate substs againMatthew Jasper-5/+2
Also make sure that type arguments of associated types are printed in some error messages.
2021-02-02Update ChalkJack Huey-3/+2
2021-02-01Upgrade ChalkJack Huey-15/+120
2021-01-18Use ty::{IntTy,UintTy,FloatTy} in rustcLeSeulArtichaut-44/+42
2021-01-16Review changesJack Huey-50/+50
2021-01-16CleanupJack Huey-20/+8
2020-12-27fix: small typo error in chalk/mod.rs0xflotus-1/+1
2020-12-18Make BoundRegion have a kind of BoungRegionKindJack Huey-45/+35
2020-12-11Move binder for dyn to each list itemJack Huey-29/+34
2020-11-17Auto merge of #78779 - LeSeulArtichaut:ty-visitor-return, r=oli-obkbors-5/+5
Introduce `TypeVisitor::BreakTy` Implements MCP rust-lang/compiler-team#383. r? `@ghost` cc `@lcnr` `@oli-obk` ~~Blocked on FCP in rust-lang/compiler-team#383.~~
2020-11-16compiler: fold by valueBastian Kauschke-15/+15
2020-11-14Introduce `TypeVisitor::BreakTy`LeSeulArtichaut-5/+5
2020-11-09Rollup merge of #78502 - matthewjasper:chalkup, r=nikomatsakisDylan DPC-292/+304
Update Chalk to 0.36.0 This PR updates Chalk and fixes a number of bugs in the chalk integration code. cc `@rust-lang/wg-traits` r? `@nikomatsakis`
2020-10-30Auto merge of #78182 - LeSeulArtichaut:ty-visitor-contolflow, r=lcnr,oli-obkbors-5/+6
TypeVisitor: use `std::ops::ControlFlow` instead of `bool` Implements MCP rust-lang/compiler-team#374. Blocked on FCP in rust-lang/compiler-team#374. r? `@lcnr` cc `@jonas-schievink`
2020-10-30Address review comment and update chalk to 0.36.0Matthew Jasper-29/+29
2020-10-30Fix various Chalk lowering bugsMatthew Jasper-42/+128
- Add more well-known traits - Use the correct binders when lowering trait objects - Use correct substs when lowering trait objects - Use the correct binders for opaque_ty_data - Lower negative impls with the correct polarity - Supply associated type values - Use `predicates_defined_on` for where clauses
2020-10-30Update chalk 0.32.0 -> 0.35.0Matthew Jasper-250/+176
2020-10-30Fix some more clippy warningsJoshua Nelson-20/+20
2020-10-30Remove implicit `Continue` typeLeSeulArtichaut-5/+5
2020-10-30TypeVisitor: use `ControlFlow` in rustc_{mir,privacy,traits,typeck}LeSeulArtichaut-5/+6
2020-10-16Review commentsJack Huey-8/+20