Skip to content

Commit 7237473

Browse files
committed
---
yaml --- r: 64635 b: refs/heads/snap-stage3 c: b128ceb h: refs/heads/master i: 64633: d1097cc 64631: dceb77a v: v3
1 parent 3ebefbd commit 7237473

File tree

3 files changed

+5
-30
lines changed

3 files changed

+5
-30
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 6f4e2b2147bbe91218c5836109011af4fc66e38c
4+
refs/heads/snap-stage3: b128ceb16127ec9c817595aaa64c025b9e5ed12e
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/compiletest/runtest.rs

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ use util::logv;
2222

2323
use std::io;
2424
use std::os;
25-
use std::str;
2625
use std::uint;
2726
use std::vec;
2827

@@ -356,30 +355,6 @@ fn check_expected_errors(expected_errors: ~[errors::ExpectedError],
356355
fmt!("%s:%u:", testfile.to_str(), ee.line)
357356
}).collect::<~[~str]>();
358357

359-
fn to_lower( s : &str ) -> ~str {
360-
let i = s.iter();
361-
let c : ~[char] = i.transform( |c| {
362-
if c.is_ascii() {
363-
c.to_ascii().to_lower().to_char()
364-
} else {
365-
c
366-
}
367-
} ).collect();
368-
str::from_chars( c )
369-
}
370-
371-
#[cfg(target_os = "win32")]
372-
fn prefix_matches( line : &str, prefix : &str ) -> bool {
373-
to_lower(line).starts_with( to_lower(prefix) )
374-
}
375-
376-
#[cfg(target_os = "linux")]
377-
#[cfg(target_os = "macos")]
378-
#[cfg(target_os = "freebsd")]
379-
fn prefix_matches( line : &str, prefix : &str ) -> bool {
380-
line.starts_with( prefix )
381-
}
382-
383358
// Scan and extract our error/warning messages,
384359
// which look like:
385360
// filename:line1:col1: line2:col2: *error:* msg
@@ -392,7 +367,7 @@ fn check_expected_errors(expected_errors: ~[errors::ExpectedError],
392367
if !found_flags[i] {
393368
debug!("prefix=%s ee.kind=%s ee.msg=%s line=%s",
394369
prefixes[i], ee.kind, ee.msg, line);
395-
if (prefix_matches(line, prefixes[i]) &&
370+
if (line.starts_with(prefixes[i]) &&
396371
line.contains(ee.kind) &&
397372
line.contains(ee.msg)) {
398373
found_flags[i] = true;

branches/snap-stage3/src/etc/tidy.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ def do_license_check(name, contents):
4949
report_err("FIXME without issue number")
5050
if line.find("TODO") != -1:
5151
report_err("TODO is deprecated; use FIXME")
52-
idx = line.find("// NOTE")
53-
if idx != -1:
54-
report_warn("NOTE" + line[idx + len("// NOTE"):])
52+
match = re.match(r'^.*//\s*(NOTE.*)$', line)
53+
if match:
54+
report_warn(match.group(1))
5555
if (line.find('\t') != -1 and
5656
fileinput.filename().find("Makefile") == -1):
5757
report_err("tab character")

0 commit comments

Comments
 (0)