mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-11 01:17:39 +00:00
16 lines
626 B
Rust
16 lines
626 B
Rust
![]() |
// Regression test for #121443
|
||
|
// Checks that no ICE occurs upon encountering
|
||
|
// a tuple with unsized element that is not
|
||
|
// the last element
|
||
|
|
||
|
type Fn = dyn FnOnce() -> u8;
|
||
|
|
||
|
const TEST: Fn = some_fn;
|
||
|
//~^ ERROR cannot find value `some_fn` in this scope
|
||
|
//~| ERROR the size for values of type `(dyn FnOnce() -> u8 + 'static)` cannot be known at compilation time
|
||
|
const TEST2: (Fn, u8) = (TEST, 0);
|
||
|
//~^ ERROR the size for values of type `(dyn FnOnce() -> u8 + 'static)` cannot be known at compilation time
|
||
|
//~| ERROR the size for values of type `(dyn FnOnce() -> u8 + 'static)` cannot be known at compilation time
|
||
|
|
||
|
fn main() {}
|