about summary refs log tree commit diff
path: root/tests/ui/mir/static-by-value-dyn.rs
blob: f1154ef08600ac559ba275ca6ac154e6b7dfe978 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Regression test for #121176
//! KnownPanicsLint used to assert ABI compatibility in the interpreter,
//! which ICEs with unsized statics.
//@ needs-rustc-debug-assertions

use std::fmt::Debug;

static STATIC_1: dyn Debug + Sync = *();
//~^ ERROR the size for values of type `(dyn Debug + Sync + 'static)` cannot be known
//~| ERROR type `()` cannot be dereferenced

fn main() {
    println!("{:?}", &STATIC_1);
}