Oli Scherer
d3d537b972
Exhaustively match over all alias kinds
2023-03-15 12:00:25 +00:00
Michael Goulet
d2834525ba
Use TyCtxt::trait_solver_next in some places
2023-03-11 22:05:50 +00:00
Michael Goulet
67698aa6ad
Move some solver stuff to middle
2023-03-10 23:46:38 +00:00
Alan Egerton
695072daa6
Remove type-traversal trait aliases
2023-02-22 17:04:58 +00:00
Kyle Matsuda
c183110cc2
remove bound_type_of query; make type_of return EarlyBinder; change type_of in metadata
2023-02-16 17:05:56 -07:00
Maybe Waffle
8751fa1a9a
if $c:expr { Some($r:expr) } else { None }
=>> $c.then(|| $r)
2023-02-16 15:26:00 +00:00
Alan Egerton
63ad5d0522
Rename folder traits' tcx
method to interner
2023-02-13 10:24:51 +00:00
Alan Egerton
9783fcc13b
Make folding traits generic over the Interner
2023-02-13 10:24:49 +00:00
Alan Egerton
dea342d861
Make visiting traits generic over the Interner
2023-02-13 10:24:49 +00:00
Alan Egerton
ba55a453eb
Alias folding/visiting traits instead of re-export
2023-02-13 10:24:46 +00:00
Matthias Krüger
3b6593a0b4
Rollup merge of #107103 - compiler-errors:new-solver-evaluate_obligation, r=lcnr
...
Use new solver in `evaluate_obligation` query (when new solver is enabled)
(only when `-Ztrait-solver=next`, of course)
... Does this make sense? It seems to me like it should be reasonable, but maybe there's some reason why this is a bad idea.
r? ``@lcnr``
Needs a perf run because I guess this `solver == TraitSolver::Next` check is on a hot path.
2023-01-28 05:20:16 +01:00
Camille GILLOT
de110f9208
Pacify tidy.
2023-01-27 22:01:25 +00:00
Camille GILLOT
1974b6b68d
Introduce GeneratorWitnessMIR.
2023-01-27 18:58:44 +00:00
Camille GILLOT
caefec955f
Do not abort compilation when failing to normalize opaque types.
2023-01-27 18:55:58 +00:00
Michael Goulet
5bfd90efd1
Use now solver in evaluate_obligation
2023-01-27 17:53:07 +00:00
bors
56ee85274e
Auto merge of #106090 - WaffleLapkin:dereffffffffff, r=Nilstrieb
...
Remove some `ref` patterns from the compiler
Previous PR: https://github.com/rust-lang/rust/pull/105368
r? `@Nilstrieb`
2023-01-20 04:52:28 +00:00
Scott McMurray
925dc37313
Stop using BREAK
& CONTINUE
in compiler
...
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-17 23:17:51 -08:00
Maybe Waffle
8d3c90ae13
Review suggestions
2023-01-17 07:48:20 +00:00
Maybe Waffle
360e978437
Don't call closures immediately, use try{}
blocks
2023-01-17 07:48:19 +00:00
Michael Goulet
50ab306015
Simplify some canonical type alias names
2023-01-03 01:16:10 +00:00
Oli Scherer
a5cd3bde95
Ensure no one constructs AliasTy
s themselves
2022-12-14 15:36:39 +00:00
Michael Goulet
96cb18e864
Combine identical alias arms
2022-12-13 17:48:55 +00: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
7f3af72606
Use ty::OpaqueTy everywhere
2022-12-13 17:29:26 +00:00
Michael Goulet
d2a80c1571
Avoid noting cause code (which is usually misc, b/c codegen) for opaque type reveal overflow
2022-12-06 00:19:55 +00:00
Michael Goulet
02b64c5d26
Document normalization methods on At
2022-12-01 19:00:09 +00:00
Michael Goulet
fc710832ea
partially_normalize_... -> At::normalize
2022-11-28 17:35:39 +00:00
Michael Goulet
f12e772b83
Rename At::normalize to At::query_normalize
2022-11-28 17:32:35 +00:00
Santiago Pastorino
974e2837bb
Introduce PredicateKind::Clause
2022-11-25 00:04:54 -03:00
Santiago Pastorino
66b4b8b907
with_query_mode -> new
2022-11-24 09:36:17 -03:00
Michael Goulet
b8a92c1dd6
Revert "Normalize opaques with escaping bound vars"
...
This reverts commit 43119d6438
.
2022-11-18 17:40:14 +00:00
Oli Scherer
4f11f3b257
Convert predicates into Predicate in the Obligation constructor
2022-11-16 09:25:19 +00:00
Michael Goulet
152646f23f
Don't normalize constants unless they need normalization
2022-11-07 00:30:56 +00:00
Michael Goulet
9f6b9dd644
Delay ambiguity span bug in normalize query iff not rustdoc
2022-10-21 18:53:16 +00:00
lcnr
e8150fa60c
mir constants: type traversing bye bye
2022-10-17 10:54:01 +02:00
Cameron Steffen
349415d1c6
Remove TypeckResults from InferCtxt
2022-10-07 07:06:19 -05:00
Cameron Steffen
4a68373217
Introduce TypeErrCtxt
...
TypeErrCtxt optionally has a TypeckResults so that InferCtxt doesn't
need to.
2022-10-07 07:06:16 -05:00
Matthias Krüger
3a8bad98d7
Rollup merge of #102137 - b-naber:lazy-const-val-conversion, r=lcnr
...
Don't convert valtree to constvalue during normalization
r? ``@lcnr``
2022-09-23 15:40:22 +02:00
b-naber
a9e657dbfc
don't convert valtree to constvalue during normalization
2022-09-22 14:46:14 +02:00
Michael Goulet
43119d6438
Normalize opaques with escaping bound vars
2022-09-22 02:17:39 +00:00
lcnr
647052fc04
remove the Subst
trait, always use EarlyBinder
2022-09-19 11:37:27 +02:00
bors
efa717bc2d
Auto merge of #101924 - jackh726:revert-static-hrtb-error, r=compiler-errors
...
Re-add HRTB implied static bug note
r? `@compiler-errors` since you reviewed it previously
I deleted a `normalize` call and forgot about it. Whoops.
2022-09-19 04:56:14 +00:00
Jack Huey
e7ca6e1b47
Use Predicate ConstraintCategory when normalizing
2022-09-17 11:46:05 -04:00
Jack Huey
e09242d5b8
Final bits
2022-09-16 17:47:53 -04:00
Jack Huey
92b759f517
Revert "Better errors for implied static bound"
...
This reverts commit c75817b0a7
.
2022-09-16 09:47:07 -04:00
Jack Huey
bba514b7b4
Revert "Use Predicate ConstraintCategory when normalizing"
...
This reverts commit aae37f8763
.
2022-09-16 09:01:28 -04:00
Jack Huey
aae37f8763
Use Predicate ConstraintCategory when normalizing
2022-09-13 20:18:49 -04:00
Jack Huey
c75817b0a7
Better errors for implied static bound
2022-09-13 20:18:04 -04:00
b-naber
a4bbb8db5c
use ty::Unevaluated<'tcx, ()> in type system
2022-09-13 17:40:59 +02:00