Camille GILLOT
b275d2c30b
Remove WithOptconstParam.
2023-04-20 17:48:32 +00:00
lcnr
16d061ea77
small type system cleanup
2023-04-19 10:30:30 +02:00
Michael Goulet
758bedc104
Make elaborator generic
2023-04-06 23:30:22 +00:00
Michael Goulet
1ce4b37900
Don't elaborate non-obligations into obligations
2023-03-26 20:33:54 +00:00
Michael Goulet
3a36a093dd
Rename AliasEq -> AliasRelate
2023-03-23 05:56:40 +00:00
Alan Egerton
695072daa6
Remove type-traversal trait aliases
2023-02-22 17:04:58 +00:00
Boxy
e919d7e348
Add Clause::ConstArgHasType variant
2023-02-17 09:30:33 +00:00
Nicholas Nethercote
6248bbbf26
Pre-intern some commonly used type variables.
...
This requires some rearrangement of plumbing, such as adding
`mk_fresh_{,int_,float_}ty` and removing `mk_ty_infer`.
2023-02-13 09:25:36 +11:00
Boxy
23ab2464be
add AliasEq to PredicateKind
2023-02-10 13:44:46 +00:00
Camille GILLOT
1974b6b68d
Introduce GeneratorWitnessMIR.
2023-01-27 18:58:44 +00:00
Michael Goulet
02b80d2f9c
Don't normalize obligations in WF goal for the new solver
2023-01-25 21:28:22 +00:00
Vincenzo Palazzo
7d2c1103d7
fix: use LocalDefId instead of HirId in trait res
...
use LocalDefId instead of HirId in trait resolution to simplify
the obligation clause resolution
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com >
2023-01-23 11:42:18 +00:00
Michael Goulet
200f466d1a
Encode whether foreign opaques are TAITs or not
2023-01-19 15:45:49 +00:00
Matthias Krüger
68f12338af
Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726
...
Remove double spaces after dots in comments
Most of the comments do not have double spaces, so I assume these are typos.
2023-01-17 20:21:25 +01:00
Maybe Waffle
6a28fb42a8
Remove double spaces after dots in comments
2023-01-17 08:09:33 +00:00
Michael Goulet
9b28edb6d7
Make InstantiatedPredicates impl IntoIterator
2023-01-15 15:36:06 +00:00
Albert Larsan
40ba0e84d5
Change src/test to tests in source files, fix tidy and tests
2023-01-11 09:32:13 +00:00
Matthias Krüger
24e584b991
Rollup merge of #105694 - ouz-a:issue_105689, r=estebank
...
Don't create dummy if val has escaping bounds var
Skips creating/pushing obligations if val has escaping bounds vars.
Fixes #105689
2022-12-15 22:02:59 +01:00
Oli Scherer
a5cd3bde95
Ensure no one constructs AliasTys themselves
2022-12-14 15:36:39 +00:00
ouz-a
75cf31faa8
skip if val has ecaping bound vars
2022-12-14 14:05:44 +03:00
Michael Goulet
61adaf8187
Combine projection and opaque into alias
2022-12-13 17:48:55 +00:00
Michael Goulet
c13bd83528
squash OpaqueTy and ProjectionTy into AliasTy
2022-12-13 17:40:27 +00:00
Michael Goulet
5c6afb850c
ProjectionTy.item_def_id -> ProjectionTy.def_id
2022-12-13 17:34:44 +00:00
Michael Goulet
7f3af72606
Use ty::OpaqueTy everywhere
2022-12-13 17:29:26 +00:00
Boxy
c9bab74fb2
support Expr in is_const_evaluatable and compute
2022-12-05 23:17:55 +00:00
bors
aff003becd
Auto merge of #99798 - JulianKnodt:ac1, r=BoxyUwU
...
Add `ConstKind::Expr`
Starting to implement `ty::ConstKind::Abstract`, most of the match cases are stubbed out, some I was unsure what to add, others I didn't want to add until a more complete implementation was ready.
r? `@lcnr`
2022-11-25 22:56:59 +00:00
Boxy
e58b932daf
add FIXME for things that I couldn't find ways to trigger
2022-11-25 09:28:44 +00:00
kadmin
f9750c1554
Add empty ConstKind::Abstract
...
Initial pass at expr/abstract const/s
Address comments
Switch to using a list instead of &[ty::Const], rm `AbstractConst`
Remove try_unify_abstract_consts
Update comments
Add edits
Recurse more
More edits
Prevent equating associated consts
Move failing test to ui
Changes this test from incremental to ui, and mark it as failing and a known bug.
Does not cause the compiler to ICE, so should be ok.
2022-11-25 09:28:43 +00:00
Santiago Pastorino
974e2837bb
Introduce PredicateKind::Clause
2022-11-25 00:04:54 -03:00
Manish Goregaokar
53eab246db
Rollup merge of #103488 - oli-obk:impl_trait_for_tait, r=lcnr
...
Allow opaque types in trait impl headers and rely on coherence to reject unsound cases
r? ````@lcnr````
fixes #99840
2022-11-22 22:54:38 -05:00
Oli Scherer
7658e0fccf
Stop passing the self-type as a separate argument.
2022-11-21 20:39:46 +00:00
Oli Scherer
ad57f88d3f
Add helper to create the trait ref for a lang item
2022-11-21 20:35:17 +00:00
Oli Scherer
ec8d01fdcc
Allow iterators instead of requiring slices that will get turned into iterators
2022-11-21 20:33:55 +00:00
Oli Scherer
6f77c97b38
Assert that various types have the right amount of generic args and fix the sites that used the wrong amount
2022-11-21 20:31:59 +00:00
Oli Scherer
ae80c764d4
Add an always-ambiguous predicate to make sure that we don't accidentlally allow trait resolution to prove false things during coherence
2022-11-21 16:35:04 +00:00
Michael Goulet
c36ff28d42
drive-by: PolyExistentialPredicate
2022-11-19 04:04:27 +00:00
Oli Scherer
4f11f3b257
Convert predicates into Predicate in the Obligation constructor
2022-11-16 09:25:19 +00:00
Deadbeef
b3a328eecf
Use nominal_obligations_without_const in wf for FnDef
2022-11-09 02:08:22 +00:00
Nicholas Nethercote
c8c25ce5a1
Rename some OwnerId fields.
...
spastorino noticed some silly expressions like `item_id.def_id.def_id`.
This commit renames several `def_id: OwnerId` fields as `owner_id`, so
those expressions become `item_id.owner_id.def_id`.
`item_id.owner_id.local_def_id` would be even clearer, but the use of
`def_id` for values of type `LocalDefId` is *very* widespread, so I left
that alone.
2022-10-29 20:28:38 +11:00
Oli Scherer
8286ea5a49
Move a wf-check into the site where the value is instantiated
2022-10-25 14:47:24 +00:00
lcnr
660ca48041
change ConstEvaluatable to use ty::Const
2022-10-18 16:09:04 +02:00
Yuki Okushi
24424d0acb
Rollup merge of #102829 - compiler-errors:rename-impl-item-kind, r=TaKO8Ki
...
rename `ImplItemKind::TyAlias` to `ImplItemKind::Type`
The naming of this variant seems inconsistent given that this is not really a "type alias", and the associated type variant for `TraitItemKind` is just called `Type`.
2022-10-10 00:09:42 +09:00
Michael Goulet
70f3c79c50
ImplItemKind::TyAlias => ImplItemKind::Type
2022-10-09 07:09:57 +00:00
Cameron Steffen
349415d1c6
Remove TypeckResults from InferCtxt
2022-10-07 07:06:19 -05:00
Oli Scherer
c72c6e01c8
Merge the ~const and impl const checks and add some explanatory notes
2022-10-04 08:59:20 +00:00
Oli Scherer
33bcea8f61
Only allow ~const bounds for traits with #[const_trait]
2022-10-04 08:06:54 +00:00
bors
7a8636c843
Auto merge of #100982 - fee1-dead-contrib:const-impl-requires-const-trait, r=oli-obk
...
Require `#[const_trait]` on `Trait` for `impl const Trait`
r? `@oli-obk`
2022-09-22 04:22:24 +00:00
bors
c524c7dd25
Auto merge of #98588 - b-naber:valtrees-cleanup, r=lcnr
...
Use only ty::Unevaluated<'tcx, ()> in type system
r? `@lcnr`
2022-09-17 03:04:22 +00:00
Deadbeef
4231661789
Do not require const predicates to hold when checking if a projection type is wf
2022-09-16 11:48:42 +08:00
b-naber
a4bbb8db5c
use ty::Unevaluated<'tcx, ()> in type system
2022-09-13 17:40:59 +02:00