Closed
Description
According to the text in src/ch19-01-unsafe-rust.md, "we must annotate the variable’s type, which is &'static str
", but the example shown in listings/ch19-advanced-features/listing-19-09/src/main.rs is:
static HELLO_WORLD: &str = "Hello, world!";
fn main() {
println!("name is: {}", HELLO_WORLD);
}
which does not declare HELLO_WORLD
as &'static str
. This could be confusing to other newbies (besides myself :-) ).