Oli Scherer
430c0d1d95
Do not ICE on ty::Error as an error must already have been reported
2021-03-19 11:46:27 +00:00
Oli Scherer
b729cc9d61
Pull out ConstValue relating into its own function
2021-03-12 12:23:50 +00:00
Oli Scherer
5e8a89b2e5
Reduce the duplication in the relation logic for constants
2021-03-12 12:23:11 +00:00
Oli Scherer
4d917faa99
Reduce destructuring and re-interning where possible
2021-03-12 12:22:33 +00:00
Oli Scherer
019dba0ceb
Resolve a FIXME around type equality checks in Relate for constants
2021-03-12 12:21:55 +00:00
Dylan DPC
49bf48a33d
Rollup merge of #81309 - lcnr:lazy-norm-err-msgh, r=nikomatsakis
...
always eagerly eval consts in Relate
r? ```@nikomatsakis``` cc ```@varkor```
2021-03-10 17:55:37 +01:00
Matthias Krüger
f7b834831f
remove useless ?s (clippy::needless_question_marks)
...
Example code:
```
fn opts() -> Option<String> {
let s: Option<String> = Some(String::new());
Some(s?) // this can just be "s"
}
```
2021-02-17 23:23:57 +01:00
Bastian Kauschke
5fe84c8958
always eagerly eval consts in Relate
2021-01-23 22:10:09 +01:00
bors
0c11b93f5a
Auto merge of #79635 - lcnr:const-eval-idk, r=oli-obk
...
const_evaluatable_checked: fix occurs check
fixes #79615
this is kind of a hack because we use `TypeRelation` for both the `Generalizer` and the `ConstInferUnifier` but i am not sure if there is a useful way to disentangle this without unnecessarily duplicating some code.
The error in the added test is kind of unavoidable until we erase the unused substs of `ConstKind::Unevaluated`. We talked a bit about this in the cg lazy norm meeting (https://rust-lang.zulipchat.com/#narrow/stream/260443-project-const-generics/topic/lazy_normalization_consts )
2020-12-20 00:50:46 +00:00
Jack Huey
01c2520081
Add explanation for skip_binder in relate
2020-12-14 12:47:11 -05:00
Jack Huey
ed80815bf2
Move binder for dyn to each list item
2020-12-11 15:02:46 -05:00
Bastian Kauschke
806c7281ec
add comment to `visit_ct_substs`
2020-12-02 16:41:01 +01:00
Bastian Kauschke
71d7550350
const_evaluatable_checked: fix occurs check
2020-12-02 15:31:27 +01:00
varkor
ac1454001c
Suggest expressions that look like const generic arguments should be enclosed in brackets
...
Co-Authored-By: Esteban Kuber <github@kuber.com.ar>
2020-10-26 21:54:45 +00:00
Bastian Kauschke
c3a772f55f
use abstract consts when unifying ConstKind::Unevaluated
2020-09-18 17:11:34 +02:00
LeSeulArtichaut
3e14b684dd
Change ty.kind to a method
2020-09-04 17:47:51 +02:00
mark
9e5f7d5631
mv compiler to compiler/
2020-08-30 18:45:07 +03:00