mozilla/rust — pull request #8739 by fhahn (2013-08-24 21:38:58+00:00)
Title: Add script and tests for using keywords as identifiers

This is a pull request for #2275

I've created a small python script to generate test files for a list of keywords (as break do else enum extern false fn for if impl let loop match mod mut priv pub ref return self static struct super true trait type unsafe use while), but I'm not really sure where to put it. I've added the created files as well.

I did not use

fn main() {
let $KW = "foo"; //~ error
println($KW); //~ error
}

as template, because for return, self, ref, loop, mut and break this does not raise an error in the ```println``` line, only in the ```let``` line.