diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-03-24 09:42:09 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-24 09:42:09 +0000 |
| commit | f3d1a53fa6ba7695df179c4b02491628e2b951aa (patch) | |
| tree | 38ac0d6259d2c5b4546a276788527056a1d7f1fd /src/test/codegen/src-hash-algorithm | |
| parent | b8e1d09b90fa2d7a0b4668c83ecf6f8dff8e62d8 (diff) | |
| parent | bf4a1e48427bf53f624e04a4f6a15f8ea16d1c99 (diff) | |
| download | rust-f3d1a53fa6ba7695df179c4b02491628e2b951aa.tar.gz rust-f3d1a53fa6ba7695df179c4b02491628e2b951aa.zip | |
Merge #11772
11772: Support constants in const eval r=HKalbasi a=HKalbasi
This PR enables evaluating things like this:
```rust
const X: usize = 2;
const Y: usize = 3 + X; // = 5
```
My target was nalgebra's `U5`, `U22`, ... which are defined as `type U5 = Const<{ SomeType5::SOME_ASSOC_CONST }>` but I didn't find out how to find the `ConstId` of the implementation of the trait, not the trait itself (possibly related to #4558 ? We can find associated type alias, so maybe this is doable already) So it doesn't help for nalgebra currently, but it is useful anyway.
Co-authored-by: hkalbasi <hamidrezakalbasi@protonmail.com>
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions
