about summary refs log tree commit diff
path: root/src/tools/compiletest
diff options
context:
space:
mode:
authorSam <slancia@cisco.com>2018-01-03 15:03:00 +0000
committerSam <slancia@cisco.com>2018-01-03 15:03:00 +0000
commit28dd4d974e1d3ebcaef43fd58b5f263653b97271 (patch)
tree6971a45f437f7ac8bd690028ba07826b54259210 /src/tools/compiletest
parentb9cf26c38acf60fb1d7d88d914a22824b82ed829 (diff)
downloadrust-28dd4d974e1d3ebcaef43fd58b5f263653b97271.tar.gz
rust-28dd4d974e1d3ebcaef43fd58b5f263653b97271.zip
Restore working debuginfo tests by trimming comments from non-header directive lines
Diffstat (limited to 'src/tools/compiletest')
-rw-r--r--src/tools/compiletest/src/runtest.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index aceb472ca63..43a868a531f 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -901,6 +901,13 @@ impl<'test> TestCx<'test> {
         for line in reader.lines() {
             match line {
                 Ok(line) => {
+                    let line =
+                        if line.starts_with("//") {
+                            line[2..].trim_left()
+                        } else {
+                            line.as_str()
+                        };
+
                     if line.contains("#break") {
                         breakpoint_lines.push(counter);
                     }