This isn't necessary, and should be avoided if possible: one should define `anagrams_for<'a>(word: &str, inputs: &[&'a str]) -> ~[&'a str]`, since you're just using the same strings.

(This would resolve the concerns about `~str` in the tests too.)