This works here:
static TARGET: &'static str = "a string";
fn main () {
println!("{}", TARGET == "a string");
println!("{}", TARGET == ~"a string");
let other = ~"a string";
println!("{}", TARGET == other);
}
It prints:
true
true
true