mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
ace436743f
Without it non-WF types could pass typeck and then later fail in MIR/const eval
16 lines
547 B
Rust
16 lines
547 B
Rust
// See issue #84108 -- this is a test to ensure we do not ICE
|
|
// on this invalid code.
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
static FOO: (dyn AsRef<OsStr>, u8) = ("hello", 42);
|
|
//~^ ERROR cannot find type `OsStr` in this scope
|
|
|
|
const BAR: (&Path, [u8], usize) = ("hello", [], 42);
|
|
//~^ ERROR cannot find type `Path` in this scope
|
|
|
|
static BAZ: ([u8], usize) = ([], 0);
|
|
//~^ ERROR the size for values of type `[u8]` cannot be known at compilation time
|
|
//~| ERROR the size for values of type `[u8]` cannot be known at compilation time
|
|
//~| ERROR mismatched types
|