Rust tidy: disallow assignment = in the beginning of line

This commit is contained in:
Jure Podgoršek 2017-01-06 20:48:23 +01:00
parent 6d4ccab2b7
commit adcedd8314
3 changed files with 6 additions and 0 deletions

View file

@ -59,4 +59,7 @@ impl test {
// Should not be triggered
macro_rules! test_macro ( ( $( $fun:ident = $flag:ident ; )* ) => ());
let var
= "val";
}

View file

@ -125,6 +125,7 @@ class CheckTidiness(unittest.TestCase):
self.assertEqual('extra space after (', errors.next()[2])
self.assertEqual('extra space after (', errors.next()[2])
self.assertEqual('extra space after test_fun', errors.next()[2])
self.assertEqual('no = in the beginning of line', errors.next()[2])
self.assertNoMoreErrors(errors)
feature_errors = tidy.collect_errors_for_files(iterFile('lib.rs'), [], [tidy.check_rust], print_text=False)