diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-11-30 16:56:53 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-30 16:56:53 +0100 |
| commit | c85f63561e1224cec657bcf1a51d78e762f628e5 (patch) | |
| tree | a63e7c6c4771453357959ba49d3d466e978319af /src/rustllvm/PassWrapper.cpp | |
| parent | 472bee260e9a748721691dd6e5e7c0e4ca71aae0 (diff) | |
| parent | 584ede5f3034af8b1b64518385e201de4942637c (diff) | |
| download | rust-c85f63561e1224cec657bcf1a51d78e762f628e5.tar.gz rust-c85f63561e1224cec657bcf1a51d78e762f628e5.zip | |
Rollup merge of #66883 - eddyb:we-cant-have-nice-things, r=oli-obk
rustc_typeck: gate AnonConst's generics on feature(const_generics).
This PR employs the fix for #43408 when `#![feature(const_generics)]` is enabled, making the feature-gate the opt-in for all the possible breakage this may incur.
For example, if this PR lands, this will cause a cycle error (due to #60471):
```rust
#![feature(const_generics)]
fn foo<T: Into<[u8; 4]>>() {}
```
And so will anything with type-level const expressions, in its bounds.
Surprisingly, `impl`s don't seem to be affected (if they were, even libcore wouldn't compile).
One thing I'm worried about is not knowing how much unstable code out there, using const-generics, will be broken. But types like `Foo<{N+1}>` never really worked, and do after this PR, just not in bounds - so ironically, it's type-level const expressions that don't depend on generics, which will break (in bounds).
Also, if we do this, we'll have effectively blocked stabilization of const generics on #60471.
r? @oli-obk cc @varkor @yodaldevoid @nikomatsakis
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
