It's trying to return a reference to str, which is a stack allocated object, your options are to Box it, or used a Boxed type like string, or deal with lifetimes (which people tend to avoid at every step). 

The simplest way to solve this is to just return a String rather than a & str:

fn fizzbuzz(n: usize) -> String {
    match (n % 3, n % 5) {
        (0, 0) => "fizzbuzz".to_string(),
        (0, _) => "fizz".to_string(),
        (_, 0) => "buzz".to_string(),
        _ => n.to_string()
    }
}
spam lang_mismatch quality