Ellen
342ec83629
nits
2021-03-02 19:33:28 +00:00
Ellen
f97e075e92
errooaaar~
2021-03-02 15:47:16 +00:00
Ellen
7e368e57f2
the environment round here is awfully empty
...
capitalism
2021-02-15 11:38:20 +00:00
Camelid
253a970c3d
Miscellaneous small diagnostics cleanup
2021-02-03 22:09:37 -08:00
Jack Huey
3aed8b17a8
Rollup merge of #81544 - JulianKnodt:sat_where, r=lcnr
...
Add better diagnostic for unbounded Abst. Const
~~In the case where a generic abst. const requires a trivial where bound: `where TypeWithConst<const_fn(N)>: ,`,
instead of requiring a where bound, just check that only consts are being substituted in to skip over where check.~~
~~This is pretty sketchy, but I think it works. Presumably, if there is checking for type bounds added later, it can first check nested requirements, and see if they're satisfied by the current `ParamEnv`.~~
Changed the diagnostic to add a better example, which is more practical than what was previously proposed.
r? ```@lcnr```
2021-02-02 16:01:39 -05:00
kadmin
65256717f2
Add better diagnostic for missing where clause
...
Previously, it's not clear what exactly should be added in the suggested where clause,
so this adds an example to demonstrate.
2021-02-02 17:01:53 +00:00
Ellen
7f8530f16b
more things are const evaluatable *sparkles*
2021-02-01 20:05:50 +00:00
Ellen
f4261772d8
comments
2021-01-27 14:46:43 +00:00
Ellen
b0625eb712
boop, ur abstract consts are now expanded
2021-01-27 02:46:19 +00:00
Jack Huey
3dea68de1d
Review changes
2021-01-16 18:56:37 -05:00
oli
cccd40f9b5
Keep an unoptimized duplicate of const fn around
...
This allows CTFE to reliably detect UB, as otherwise
optimizations may hide UB.
2021-01-04 21:40:38 +00:00
LeSeulArtichaut
e0f3119103
Introduce TypeVisitor::BreakTy
2020-11-14 20:25:27 +01:00
Bastian Kauschke
439171e094
look at assoc ct, check the type of nodes
2020-11-07 12:39:52 +01:00
LeSeulArtichaut
9433eb83fe
Remove implicit Continue type
2020-10-30 12:27:47 +01:00
LeSeulArtichaut
4fe735b320
TypeVisitor: use ControlFlow in rustc_{infer,lint,trait_selection}
2020-10-30 12:27:34 +01:00
Bastian Kauschke
60bcc58dce
debug log AbstractConst::new
2020-10-26 14:56:58 +01:00
Bastian Kauschke
0e419efb1c
check for object safety violations in constants
2020-10-25 18:33:45 +01:00
Bastian Kauschke
47cb871f14
review
2020-10-23 15:04:12 +02:00
Bastian Kauschke
6ad140ca19
const_eval_checked: deal with unused nodes + div
2020-10-23 12:16:58 +02:00
Bastian Kauschke
8160bfa39c
query_name_of_opt_const_arg -> query_name_opt_const_arg
2020-10-05 08:49:21 +02:00
Bastian Kauschke
536674fb69
cleanup WithOptConstParam queries
2020-10-04 23:22:08 +02:00
Bastian Kauschke
a4783debe0
const evaluatable: improve TooGeneric handling
2020-09-28 20:18:06 +02:00
Bastian Kauschke
2f893e458a
review
2020-09-21 23:25:52 +02:00
Bastian Kauschke
30cbc97296
words
2020-09-19 22:27:52 +02:00
Bastian Kauschke
d4039c55c9
wip emit errors during AbstractConst building
2020-09-19 22:17:52 +02:00
Bastian Kauschke
b7641209d7
add const-evaluatable_checked check back in
2020-09-18 17:36:11 +02:00
Bastian Kauschke
09e6254496
review, small cleanup
2020-09-18 17:11:34 +02:00
Bastian Kauschke
1b275d08ad
document const_evaluatable
2020-09-18 17:11:34 +02:00
Bastian Kauschke
7fff155d2a
remove allow(warnings)
2020-09-18 17:11:34 +02:00
Bastian Kauschke
30ff1ef3d0
support const_evaluatable_checked across crate boundaries
2020-09-18 17:11:34 +02:00
Bastian Kauschke
c7d16df1d8
add function calls
2020-09-18 17:11:34 +02:00
Bastian Kauschke
d1294e0ce2
allow unary operations and ignore StorageLive/Dead stmts
2020-09-18 17:11:34 +02:00
Bastian Kauschke
5a277822a5
use newtype_index for abstract_const::NodeId
2020-09-18 17:11:34 +02:00
Bastian Kauschke
f24d532749
refactor AbstractConstBuilder
2020-09-18 17:11:34 +02:00
Bastian Kauschke
c3a772f55f
use abstract consts when unifying ConstKind::Unevaluated
2020-09-18 17:11:34 +02:00
Bastian Kauschke
d327fa112b
initial working state
2020-09-18 16:25:25 +02:00
Bastian Kauschke
300b0acb85
fix tidy, small cleanup
2020-09-10 09:48:02 +02:00
Bastian Kauschke
8667f93040
implement const_evaluatable_checked feature MVP
2020-09-10 08:52:02 +02:00
Bastian Kauschke
1dd00e60b9
add tracking issue, fix rebase
2020-09-08 16:39:12 +02:00