const-table 0.1.0

Associate struct-typed constants with enum variants
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
error[E0308]: mismatched types
  --> $DIR/type-mismatch.rs:17:14
   |
17 |     Uranus = (8.686e+25, 2.5559e7),
   |              ^^^^^^^^^^^^^^^^^^^^^ expected struct `PlanetInfo`, found tuple
   |
   = note: expected struct `PlanetInfo`
               found tuple `({float}, {float})`

error[E0308]: mismatched types
  --> $DIR/type-mismatch.rs:18:17
   |
18 |     Neptune = p("1.024e+26", 2.4746e7),
   |                 ^^^^^^^^^^^ expected `f32`, found `&str`