diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-10-29 12:08:40 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-29 12:08:40 +0900 |
| commit | 270d2e0c2ebc1a80a651e48dd90df564810fbece (patch) | |
| tree | 0bbef9d7c0030ff54b0230efa94c7078e355325c /src/test/codegen/src-hash-algorithm | |
| parent | 2008d1bb0b185286d376d8e1f1093fa9ec070156 (diff) | |
| parent | 83ecbb4a294abca245f8c515e298464e9425b9a2 (diff) | |
| download | rust-270d2e0c2ebc1a80a651e48dd90df564810fbece.tar.gz rust-270d2e0c2ebc1a80a651e48dd90df564810fbece.zip | |
Rollup merge of #78224 - lcnr:repeat-expr, r=varkor
min_const_generics: allow ty param in repeat expr
implements https://rust-lang.zulipchat.com/#narrow/stream/260443-project-const-generics/topic/repeat.20expressions
Even with `min_const_generics` active, now keeps resulting in future compat warnings instead of hard errors.
Const parameters, for example `[0; N + 1]`, still result in hard errors during resolve.
```rust
#![allow(dead_code)]
fn foo<T>() {
[0; std::mem::size_of::<*mut T>()];
}
struct Foo<T>(T);
impl<T> Foo<T> {
const ASSOC: usize = 4;
fn test() {
[0; Self::ASSOC];
}
}
```
r? @varkor cc @petrochenkov
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions
