Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix CodeMap issue in expand_include_str()
- Loading branch information
1 parent
fda71f2
commit ad3a179
Showing
5 changed files
with
46 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
// xfail-android: FIXME(#10381) | ||
|
||
// compile-flags:-Z extra-debug-info | ||
// debugger:rbreak zzz | ||
// debugger:run | ||
// debugger:finish | ||
// debugger:print string1 | ||
// check:$1 = [...]"some text to include in another file as string 1", length = 48} | ||
// debugger:print string2 | ||
// check:$2 = [...]"some text to include in another file as string 2", length = 48} | ||
// debugger:print string3 | ||
// check:$3 = [...]"some text to include in another file as string 3", length = 48} | ||
// debugger:continue | ||
|
||
#[allow(unused_variable)]; | ||
|
||
// This test case makes sure that debug info does not ICE when include_str is | ||
// used multiple times (see issue #11322). | ||
|
||
fn main() { | ||
let string1 = include_str!("text-to-include-1.txt"); | ||
let string2 = include_str!("text-to-include-2.txt"); | ||
let string3 = include_str!("text-to-include-3.txt"); | ||
zzz(); | ||
} | ||
|
||
fn zzz() {()} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
some text to include in another file as string 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
some text to include in another file as string 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
some text to include in another file as string 3 |
ad3a179
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from alexcrichton
at michaelwoerister@ad3a179
ad3a179
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging michaelwoerister/rust/issue11322 = ad3a179 into auto
ad3a179
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
michaelwoerister/rust/issue11322 = ad3a179 merged ok, testing candidate = 97005c0
ad3a179
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/3448
success: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-c/builds/1290
success: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-t/builds/1294
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/3450
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/2551
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/2556
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/3466
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/2554
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/2560
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/3468
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/2554
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/2559
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/2628
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/3456
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/2558
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/2562
success: http://buildbot.rust-lang.org/builders/auto-bsd-64-opt/builds/3229
ad3a179
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = 97005c0