rust/compiler/rustc_hir/src
Yuki Okushi 270d2e0c2e
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
2020-10-29 12:08:40 +09:00
..
arena.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
def.rs add tests for self with const params 2020-10-23 22:10:44 +02:00
definitions.rs Remove unused code from rustc_hir 2020-10-14 04:14:32 +02:00
hir_id.rs Remove unused code from rustc_hir 2020-10-14 04:14:32 +02:00
hir.rs Rollup merge of #78326 - Aaron1011:fix/min-stmt-lints, r=petrochenkov 2020-10-25 18:43:49 +09:00
intravisit.rs Lower inline const down to MIR 2020-10-16 15:21:18 -03:00
itemlikevisit.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
lang_items.rs Fix const core::panic!(non_literal_str). 2020-10-22 18:41:35 +02:00
lib.rs [WIP] give better errors for broken intra doc links 2020-09-05 13:48:19 -04:00
pat_util.rs Remove unused code from rustc_hir 2020-10-14 04:14:32 +02:00
stable_hash_impls.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
target.rs Prevent #[doc(alias = "...")] at crate level 2020-10-03 21:33:47 +02:00
weak_lang_items.rs hir: replace lazy_static by SyncLazy from std 2020-09-01 22:06:47 +01:00