Michael Goulet
a82bae2172
Teach typeck/borrowck/solvers how to deal with async closures
2024-02-06 02:22:58 +00:00
Oli Scherer
1c9e621308
No need to check min_length
2024-01-23 16:35:27 +00:00
Oli Scherer
271821fbc3
Switch to using ImmTy instead of OpTy, as we don't use the MPlace variant at all
2024-01-23 16:35:27 +00:00
Oli Scherer
c5e371da19
Inline Index conversion into project method
2024-01-23 16:35:26 +00:00
Oli Scherer
6a01dc9ad7
Remove unnecessary optional layout being passed along
2024-01-23 16:35:26 +00:00
Oli Scherer
d03eb339aa
Implement ConstantIndex handling and use that instead using our own ProjectionElem variant
2024-01-23 16:35:26 +00:00
Oli Scherer
2d99ea0be2
Remove ConstPropMachine and re-use the DummyMachine instead
2024-01-23 16:35:26 +00:00
Oli Scherer
3419273f1f
Avoid some packing/unpacking of the AssertLint enum
2024-01-23 16:35:23 +00:00
Oli Scherer
6ecb2aa580
We're not really using the ConstPropMachine anymore
2024-01-23 16:34:43 +00:00
Oli Scherer
89e6a67310
Const prop doesn't need a stack anymore
2024-01-23 16:34:43 +00:00
Oli Scherer
0294a0de09
Remove location threading
2024-01-23 16:34:42 +00:00
Oli Scherer
e904a640ac
Stop using eval_rvalue_into_place in const prop
2024-01-23 16:34:42 +00:00
Oli Scherer
ac48ad517b
partially inline eval_rvalue_into_place for const prop lint
2024-01-23 16:34:42 +00:00
Oli Scherer
fbd10a3cc5
Allow passing a layout to the eval_* methods
2024-01-23 16:34:42 +00:00
Nicholas Nethercote
e164cf30f8
Rename TyCtxt::emit_spanned_lint as TyCtxt::emit_node_span_lint.
2024-01-23 08:09:05 +11:00
Martin Nordholts
6d8fb57d1a
rustc_mir_transform: Enforce rustc::potential_query_instability lint
...
Stop allowing `rustc::potential_query_instability` on all of
rustc_mir_transform and instead allow it on a case-by-case basis if it
is safe to do so. In this particular crate, all instances were safe to
allow.
2024-01-06 19:09:04 +01:00
bohan
f23befe6c1
merge DefKind::Coroutine into DefKind::Closure
2023-11-26 21:05:08 +08:00
Nilstrieb
21a870515b
Fix clippy::needless_borrow in the compiler
...
`x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`.
Then I had to remove a few unnecessary parens and muts that were exposed
now.
2023-11-21 20:13:40 +01: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
Michael Goulet
b2d2184ede
Format all the let chains in compiler
2023-10-13 08:59:36 +00:00
Camille GILLOT
b1bef90d4f
Rename lint pass.
2023-10-01 14:00:07 +00:00
Camille GILLOT
7e1ecff56e
Do not check for impossible predicates in const-prop lint.
2023-10-01 14:00:07 +00:00
Camille GILLOT
fd51cc6bc9
Use DefKind to check for generator.
2023-10-01 14:00:07 +00:00
bors
0fd7ce99b0
Auto merge of #116010 - RalfJung:more-typed-immediates, r=oli-obk
...
interpret: more consistently use ImmTy in operators and casts
The diff in src/tools/miri/src/shims/x86/sse2.rs should hopefully suffice to explain why this is nicer. :)
2023-09-21 14:02:55 +00:00
Ralf Jung
c94410c145
rename mir::Constant -> mir::ConstOperand, mir::ConstKind -> mir::Const
2023-09-21 08:12:30 +02:00
Ralf Jung
da08a3f40c
interpret: more consistently use ImmTy in operators and casts
2023-09-20 21:57:54 +02:00
Camille GILLOT
5d18a0edb4
Do not clone MIR for const-prop lint.
2023-09-17 09:00:51 +00:00
bohan
967410c640
fix: return ealry when has tainted in mir-lint
2023-09-08 09:30:23 +08:00
Ralf Jung
fa5f13775a
interpret: make MemPlace, Place, Operand types private to the interpreter
2023-09-04 17:53:38 +02:00
Ralf Jung
a09df43d9f
move marking-locals-live out of push_stack_frame, so it happens with argument passing
...
this entirely avoids even creating unsized locals in Immediate::Uninitialized state
2023-08-30 13:46:54 +02:00
Ralf Jung
beeb2b13cc
miri/diagnostics: don't forget to print_backtrace when ICEing on unexpected errors
...
then also use the new helper in a few other places
2023-08-27 15:42:25 +02:00
Ralf Jung
4c53783f3c
when terminating during unwinding, show the reason why
2023-08-24 13:28:26 +02:00
Ralf Jung
818ec8e23a
give some unwind-related terminators a more clear name
2023-08-20 15:52:38 +02:00
Ralf Jung
77ff1b83cd
interpret: make read functions generic over operand type
2023-07-25 22:33:59 +02:00
Mahdi Dibaiee
e55583c4b8
refactor(rustc_middle): Substs -> GenericArg
2023-07-14 13:27:35 +01:00
Deadbeef
f6c2bc5c24
fix diagnostic message
2023-06-01 14:45:19 +00:00
Deadbeef
f964b46451
improve debug message by eagerly translating
2023-06-01 14:45:19 +00:00
Deadbeef
4f83717cf7
Use translatable diagnostics in rustc_const_eval
2023-06-01 14:45:18 +00:00
Maybe Waffle
fb0f74a8c9
Use Option::is_some_and and Result::is_ok_and in the compiler
2023-05-24 14:20:41 +00:00
clubby789
d5bc581f5d
Migrate mir_transform to translatable diagnostics
2023-05-02 16:24:18 +01:00
Boxy
842419712a
rename needs_subst to has_param
2023-04-27 08:35:19 +01:00
Matthias Krüger
543f8bc38c
fix clippy::toplevel_ref_arg and ::manual_map
2023-04-16 13:28:13 +02:00
bors
f8ed97ecc1
Auto merge of #110031 - compiler-errors:generic-elaboration, r=b-naber
...
Make elaboration generic over input
Combines all the `elaborate_*` family of functions into just one, which is an iterator over the same type that you pass in (e.g. elaborating `Predicate` gives `Predicate`s, elaborating `Obligation`s gives `Obligation`s, etc.)
2023-04-09 00:18:10 +00:00
Michael Goulet
758bedc104
Make elaborator generic
2023-04-06 23:30:22 +00:00
Gary Guo
e3f2edc75b
Rename Abort terminator to Terminate
...
Unify terminology used in unwind action and terminator, and reflect
the fact that a nounwind panic is triggered instead of an immediate
abort is triggered for this terminator.
2023-04-06 09:34:16 +01:00
Camille GILLOT
98255cc242
Comment logic around worklist.
2023-04-05 19:34:38 +00:00
Camille GILLOT
7d47a910eb
Only visit reachable blocks in ConstProp lint.
2023-04-05 19:34:38 +00:00
Camille GILLOT
f8cfafcceb
Extract check_assertion.
2023-04-05 19:34:38 +00:00
Camille GILLOT
b833fcae90
Manipulate Location instead of SourceInfo.
2023-04-05 19:34:36 +00:00