diff options
| author | bors <bors@rust-lang.org> | 2020-05-03 12:05:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-05-03 12:05:46 +0000 |
| commit | e5f35df2c6944b843b08369c4b2ff3bdb0beb2d2 (patch) | |
| tree | 8e125542a16e6d045f8e1dc01af69b818c7af889 /library/std/src/sys/unix/stack_overflow.rs | |
| parent | d626e4dadc37d7027d65f087da0ad1ddb460959f (diff) | |
| parent | 926c7a298d413166a11e0b5069e038c26de25df5 (diff) | |
| download | rust-e5f35df2c6944b843b08369c4b2ff3bdb0beb2d2.tar.gz rust-e5f35df2c6944b843b08369c4b2ff3bdb0beb2d2.zip | |
Auto merge of #70825 - eddyb:enum-discr-correct-generics-parent, r=nikomatsakis
typeck: always expose explicit enum discriminant `AnonConst`s' parent in `generics_of`. This is similar to #70452 but for explicit `enum` discriminant constant expressions. However, unlike #70452, this PR should have no effect on stable code, as while it alleviates #43408 errors, there is no way to actually compile an `enum` with generic parameters *and* explicit discriminants, without `#![feature(arbitrary_enum_discriminant)]`, as explicit discriminant expression don't count as uses of parameters (if they did, they would count as invariant uses). <hr/> There's also 2 other commits here, both related to #70453: * "ty: use `delay_span_bug` in `ty::AdtDef::eval_explicit_discr`." - hides the ICEs demonstrated on #70453, when there are other errors (which the next commit adds) * "typeck/wfcheck: require that explicit enum discriminants const-evaluate succesfully." - closes #70453 by picking alternative "2", i.e. erroring when a discriminant doesn't fully const-evaluate from the perspective of the `enum` definition In the future, it might be possible to allow `enum` discriminants to actually depend on parameters, but that will likely require #68436 + some way to restrict the values so no two variants can end up with overlapping discriminants. As this PR would close #70453, it shouldn't be merged until a decision is reached there. r? @nikomatsakis
Diffstat (limited to 'library/std/src/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
