2025-05-31 00:30:37 +05:00
|
|
|
//! Check that a bare string literal is typed as a `&'static str` and is usable.
|
|
|
|
|
|
2019-07-27 00:54:25 +03:00
|
|
|
//@ run-pass
|
|
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {
|
2013-03-14 11:22:51 -07:00
|
|
|
let x: &'static str = "foo";
|
2014-01-09 21:06:55 +11:00
|
|
|
println!("{}", x);
|
2012-08-03 11:51:47 -07:00
|
|
|
}
|