Skip to content

Commit

Permalink
Check that statics are sized. Closes #26
Browse files Browse the repository at this point in the history
  • Loading branch information
Kimundi committed Nov 13, 2017
1 parent 9b9f96c commit e1f9b53
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/compile-fail/static_is_sized.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#[macro_use]
extern crate lazy_static;

lazy_static! {
pub static ref FOO: str = panic!();
}
//^ ERROR `str` does not have a constant size known at compile-time

fn main() {
}

0 comments on commit e1f9b53

Please sign in to comment.