]> git.lizzy.rs Git - rust.git/commit
Add more tests, refactor array lengths/consteval work
authorJade <software@lfcode.ca>
Fri, 14 May 2021 07:59:30 +0000 (00:59 -0700)
committerJade <software@lfcode.ca>
Fri, 14 May 2021 08:39:28 +0000 (01:39 -0700)
commit78d6b88f211cc9faf88815ce7fb1a91546cfce15
tree6b54a10d2eeee6fc03d63015e4b7c9838b4b02b9
parent32c600664e5a599bbe3f0254274211474b89914a
Add more tests, refactor array lengths/consteval work

Fix #2922: add unknown length as a condition for a type having unknown.

Incorporate reviews:

* Extract some of the const evaluation workings into functions
* Add fixmes on the hacks
* Add tests for impls on specific array lengths (these work!!! 😁)
* Add tests for const generics (indeed we don't support it yet)
crates/hir/src/lib.rs
crates/hir_def/src/type_ref.rs
crates/hir_ty/src/consteval.rs [new file with mode: 0644]
crates/hir_ty/src/infer/expr.rs
crates/hir_ty/src/lib.rs
crates/hir_ty/src/tests/simple.rs
crates/hir_ty/src/tests/traits.rs
crates/ide_assists/src/handlers/add_explicit_type.rs