Michael Goulet
6f6f91ab82
Rip out old effects var handling code from traits
2024-10-20 13:40:22 +00:00
Nicholas Nethercote
84ac80f192
Reformat use
declarations.
...
The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
2024-07-29 08:26:52 +10:00
Nicholas Nethercote
6ce258f657
Remove extern crate rustc_macros
from rustc_middle
.
2024-04-29 11:19:16 +10:00
Michael Goulet
88296bddf8
Remove EvaluatedToErrStackDependent
2024-03-31 20:44:30 -04:00
cui fliter
824d75c22e
remove repetitive words
...
Signed-off-by: cui fliter <imcusg@gmail.com>
2024-02-23 18:26:01 +08:00
Shoyu Vanilla
3856df059e
Dejargnonize subst
2024-02-12 15:46:35 +09:00
Michael Goulet
881b6b5149
Bless tests, add comments
2024-02-06 02:22:58 +00:00
Michael Goulet
a82bae2172
Teach typeck/borrowck/solvers how to deal with async closures
2024-02-06 02:22:58 +00:00
Michael Goulet
322694ed56
Remove unused ErrorReporting variant from overflow handling
2024-01-12 17:00:32 +00:00
Michael Goulet
69f360d00c
Check FnPtr/FnDef built-in fn traits correctly with effects
2023-12-18 20:28:06 +00:00
Michael Goulet
20927d3956
Remove unnecessary constness from ProjectionCandidate
2023-12-16 17:21:20 +00:00
Michael Goulet
96bb542a31
Implement async gen
blocks
2023-12-08 17:23:25 +00:00
Michael Goulet
d732c3b756
EvaluatedToUnknown -> EvaluatedToAmbigStackDependent, EvaluatedToRecur -> EvaluatedToErrStackDependent
2023-12-06 19:59:47 +00:00
Oli Scherer
998a816106
Make gen
blocks implement the Iterator
trait
2023-10-27 13:05:48 +00:00
Oli Scherer
e96ce20b34
s/generator/coroutine/
2023-10-20 21:14:01 +00:00
Oli Scherer
60956837cf
s/Generator/Coroutine/
2023-10-20 21:10:38 +00:00
Nicholas Nethercote
abe2a68acd
Remove more unused Lift
impls.
2023-09-18 09:37:10 +10:00
Deadbeef
f441fa08da
Remove constness from ImplSource::Param
2023-08-14 02:17:30 +00:00
Michael Goulet
a7ed9c1da7
Make everything builtin!
2023-07-25 16:08:58 +00:00
Nicholas Nethercote
671de6d62a
Remove unused TypeFoldable
/TypeVisitable
impls.
2023-04-26 15:19:50 +10:00
Deadbeef
6e63f7be54
attempt to make a minimal example work
2023-01-12 02:28:37 +00:00
lcnr
84e97907c6
add comment
2022-11-25 11:59:08 +01:00
lcnr
31431ccda9
move 2 candidates into builtin candidate
2022-11-25 11:59:08 +01:00
Arpad Borsos
9f36f988ad
Avoid GenFuture
shim when compiling async constructs
...
Previously, async constructs would be lowered to "normal" generators,
with an additional `from_generator` / `GenFuture` shim in between to
convert from `Generator` to `Future`.
The compiler will now special-case these generators internally so that
async constructs will *directly* implement `Future` without the need
to go through the `from_generator` / `GenFuture` shim.
The primary motivation for this change was hiding this implementation
detail in stack traces and debuginfo, but it can in theory also help
the optimizer as there is less abstractions to see through.
2022-11-24 10:04:27 +01:00
Dylan DPC
58d533dfc1
Rollup merge of #102786 - compiler-errors:no-tuple-candidate, r=lcnr
...
Remove tuple candidate, nothing special about it
r? `@lcnr` you mentioned this during the talk you gave i think
2022-10-10 13:43:41 +05:30
Michael Goulet
8b9a1f1f4e
Remove tuple candidate, nothing special about it
2022-10-07 16:19:21 +00:00
Deadbeef
e8a2aee50d
Remove DefId
from some SelectionCandidate
variants
2022-10-07 15:14:22 +00:00
Deadbeef
ee96ae0a32
make projection bounds with const bounds satisfy const
2022-09-18 18:05:30 +00:00
Michael Goulet
d0e4c679ff
Built-in implementation of Tuple trait
2022-08-07 16:31:03 -07:00
Jack Wrenn
bc4a1dea41
Initial (incomplete) implementation of transmutability trait.
...
This initial implementation handles transmutations between types with specified layouts, except when references are involved.
Co-authored-by: Igor null <m1el.2027@gmail.com>
2022-07-27 17:33:56 +00:00
bors
052495d001
Auto merge of #98614 - oli-obk:take_unsound_opaque_types, r=wesleywiser
...
don't succeed `evaluate_obligation` query if new opaque types were registered
fixes #98608
fixes #98604
The root cause of all this is that in type flag computation we entirely ignore nongeneric things like struct fields and the signature of function items. So if a flag had to be set for a struct if it is set for a field, that will only happen if the field is generic, as only the generic parameters are checked.
I now believe we cannot use type flags to handle opaque types. They seem like the wrong tool for this.
Instead, this PR replaces the previous logic by adding a new variant of `EvaluatedToOk`: `EvaluatedToOkModuloOpaqueTypes`, which says that there were some opaque types that got hidden types bound, but that binding may not have been legal (because we don't know if the opaque type was in its defining scope or not).
2022-07-08 17:55:26 +00:00
Oli Scherer
0b863e0024
not knowing about opaque types is worse than not knowing about regions, make sure we don't accidentally mark something as ok-modulo-regions if there are opaque types involved
2022-07-07 08:10:50 +00:00
Alan Egerton
9ffdc2de8c
impl TypeVisitable in type traversal macros
2022-07-05 22:25:33 +01:00
Alan Egerton
e4b9625b87
Add #[derive(TypeVisitable)]
2022-07-05 22:25:15 +01:00
Oli Scherer
84fc551664
Make evaluate_obligation
not succeed unconditionally if it registered new hidden types for opaque types
2022-06-30 14:23:31 +00:00
Michael Goulet
8588f79802
Do not use ParamEnv::and to cache param-env with candidate
2022-03-26 21:11:06 -07:00
lightning1141
85e67b9a59
Fix ice when error reporting recursion errors
...
Fixes : #90319 , #92148 , #93955
2022-03-25 02:53:30 +08:00
Deadbeef
1f3ee7f32e
Rename ~const Drop
to ~const Destruct
2022-03-21 17:04:03 +11:00
Michael Goulet
6ed42a7ca4
Check const Drop impls considering ConstIfConst bounds
2022-01-18 01:44:46 -08:00
Deadbeef
84b1d859c8
Revert "Auto merge of #91491 - spastorino:revert-91354, r=oli-obk"
...
This reverts commit ff2439b7b9
, reversing
changes made to 2a9e0831d6
.
2021-12-12 12:34:46 +08:00
Santiago Pastorino
85b723c4e6
Revert "Auto merge of #91354 - fee1-dead:const_env, r=spastorino"
...
This reverts commit 18bb8c61a9
, reversing
changes made to d9baa36190
.
2021-12-03 10:11:21 -03:00
Oli Scherer
a848c4ba3f
Avoid storing the ImplPolarity and Constness next to a TraitRef and use TraitPredicate instead
2021-11-29 21:19:49 +08:00
Oli Scherer
d161cc2071
Replace ConstnessAnd<TraitRef>
with TraitPredicate
which conveys the same information
2021-11-29 21:19:48 +08:00
Oli Scherer
b16c811f1c
Prefer TraitPredicate over ConstnessAnd<TraitRef>
2021-11-29 21:19:48 +08:00
Santiago Pastorino
85c8fd9c94
Make EvaluationCache consider polarity as cache's key
2021-10-20 12:10:46 -03:00
Santiago Pastorino
8b0bfb0dcb
Consider negative polarity on overlap check
2021-10-20 12:10:45 -03:00
John Kugelman
169113935f
Fix spelling: Cannonical -> Canonical
2021-10-10 00:44:34 -04:00
Tom Farmer
0950d5afe2
Issue 89275 fix and test
...
Issue 89275 fix and test
Fix librustdoc OverflowError usage
rust tidy run
Issue 89275 fix and test
2021-10-05 22:43:06 +01:00
Deadbeef
f8aa73d3dd
Coerce const FnDefs to implement const Fn traits
2021-09-15 11:48:27 +00:00
Deadbeef
a13b13ff46
Const drop selection candidates
2021-09-09 05:21:31 +00:00