Add a bunch of tests for closed issues

Closes #3907
Closes #5493
Closes #4464
Closes #4759
Closes #5666
Closes #5884
Closes #5926
Closes #6318
Closes #6557
Closes #6898
Closes #6919
Closes #7222
Fix a typo in the ifmt dox
Add even more tests

Closes #8248
Closes #8249
Closes #8398
Closes #8401
auto merge of #8485 : alexcrichton/rust/add-tests, r=catamorphism

Closes #3907
Closes #5493
Closes #4464
Closes #4759
Closes #5666
Closes #5884
Closes #5926
Closes #6318
Closes #6557
Closes #6898
Closes #6919
Closes #7222