If `anagrams_for` returns `~[~str]` then you can't compare it to a `[&str]` (with any sigil), since a `~str` and an `&str` have different representations (and sizes!) so one can't automatically coerce interior `~str`s like one can with them at the top level.

(Also, in general & in the standard libraries, `#[test]`s are not particularly concerned about being optimised for speed/few allocations.)