Skip to content

Commit e1f9b53

Browse files
committed
Check that statics are sized. Closes #26
1 parent 9b9f96c commit e1f9b53

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/compile-fail/static_is_sized.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#[macro_use]
2+
extern crate lazy_static;
3+
4+
lazy_static! {
5+
pub static ref FOO: str = panic!();
6+
}
7+
//^ ERROR `str` does not have a constant size known at compile-time
8+
9+
fn main() {
10+
}

0 commit comments

Comments
 (0)