rust/tests/ui/const-generics/late-bound-vars/in_closure.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
1.3 KiB
Rust
Raw Normal View History

2023-05-05 15:42:51 -05:00
// failure-status: 101
// known-bug: unknown
// error-pattern:internal compiler error
// normalize-stderr-test "internal compiler error.*" -> ""
// normalize-stderr-test "DefId\([^)]*\)" -> "..."
// normalize-stderr-test "\nerror: internal compiler error.*\n\n" -> ""
// normalize-stderr-test "note:.*unexpectedly panicked.*\n\n" -> ""
// normalize-stderr-test "note: we would appreciate a bug report.*\n\n" -> ""
// normalize-stderr-test "note: compiler flags.*\n\n" -> ""
// normalize-stderr-test "note: rustc.*running on.*\n\n" -> ""
// normalize-stderr-test "thread.*panicked.*:\n.*\n" -> ""
2023-05-05 15:42:51 -05:00
// normalize-stderr-test "stack backtrace:\n" -> ""
// normalize-stderr-test "\s\d{1,}: .*\n" -> ""
// normalize-stderr-test "\s at .*\n" -> ""
// normalize-stderr-test ".*note: Some details.*\n" -> ""
2023-07-30 02:49:57 -05:00
// normalize-stderr-test "\n[ ]*\n" -> ""
2023-05-05 15:42:51 -05:00
// normalize-stderr-test "compiler/.*: projection" -> "projection"
// normalize-stderr-test ".*omitted \d{1,} frame.*\n" -> ""
2023-07-30 02:49:57 -05:00
// normalize-stderr-test "error: [\s\n]*query stack during panic:\n" -> ""
// this should run-pass
2023-05-05 15:42:51 -05:00
#![feature(generic_const_exprs)]
#![allow(incomplete_features)]
const fn inner<'a>() -> usize where &'a (): Sized {
3
}
fn test<'a>() {
let _ = || {
let _: [u8; inner::<'a>()];
let _ = [0; inner::<'a>()];
};
}
fn main() {
test();
}