File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
src/test/ui/const-generics/generic_const_exprs Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ fn bug < ' a > ( )
2+ where
3+ [ ( ) ; { //~ ERROR mismatched types
4+ let _: & ' a ( ) ; //~ ERROR a non-static lifetime is not allowed in a `const`
5+ } ] :
6+ { }
7+
8+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ error[E0658]: a non-static lifetime is not allowed in a `const`
2+ --> $DIR/issue-74713.rs:4:17
3+ |
4+ LL | let _: &'a ();
5+ | ^^
6+ |
7+ = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
8+ = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
9+
10+ error[E0308]: mismatched types
11+ --> $DIR/issue-74713.rs:3:10
12+ |
13+ LL | [(); {
14+ | __________^
15+ LL | | let _: &'a ();
16+ LL | | }]:
17+ | |_____^ expected `usize`, found `()`
18+
19+ error: aborting due to 2 previous errors
20+
21+ Some errors have detailed explanations: E0308, E0658.
22+ For more information about an error, try `rustc --explain E0308`.
You can’t perform that action at this time.
0 commit comments