Skip to content

Commit f48d7cf

Browse files
---
yaml --- r: 234229 b: refs/heads/beta c: 31fa44b h: refs/heads/master i: 234227: 89cad49 v: v3
1 parent 0eb6eee commit f48d7cf

File tree

7 files changed

+22
-23
lines changed

7 files changed

+22
-23
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 49d8b0dcbef738b70f08b6648bb7c358b491f47c
26+
refs/heads/beta: 31fa44b18e6e8bd42630d6495823ade6a5adaeba
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 370fe2786109360f7c35b8ba552b83b773dd71d6
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/libsyntax/diagnostic.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -732,21 +732,17 @@ impl EmitterWriter {
732732
sp_opt = try!(cm.with_expn_info(sp.expn_id, |expn_info| -> io::Result<_> {
733733
match expn_info {
734734
Some(ei) => {
735-
let ss = ei.callee.span.map_or(String::new(),
736-
|span| cm.span_to_string(span));
737735
let (pre, post) = match ei.callee.format {
738736
codemap::MacroAttribute(..) => ("#[", "]"),
739737
codemap::MacroBang(..) => ("", "!"),
740738
codemap::CompilerExpansion(..) => ("", ""),
741739
};
742-
try!(self.print_diagnostic(&ss, Note,
743-
&format!("in expansion of {}{}{}",
740+
try!(self.print_diagnostic(&cm.span_to_string(ei.call_site), Note,
741+
&format!("in this expansion of {}{}{}",
744742
pre,
745743
ei.callee.name(),
746744
post),
747745
None));
748-
let ss = cm.span_to_string(ei.call_site);
749-
try!(self.print_diagnostic(&ss, Note, "expansion site", None));
750746
Ok(Some(ei.call_site))
751747
}
752748
None => Ok(None)

branches/beta/src/test/compile-fail/for-expn-2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// Test that we get an expansion stack for `for` loops.
1212

13-
// error-pattern:in expansion of for loop expansion
13+
// error-pattern:in this expansion of for loop expansion
1414

1515
fn main() {
1616
for t in &foo {

branches/beta/src/test/compile-fail/macro-backtrace-invalid-internals.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@
1010

1111
// Macros in statement vs expression position handle backtraces differently.
1212

13-
macro_rules! fake_method_stmt { //~ NOTE in expansion of
13+
macro_rules! fake_method_stmt {
1414
() => {
1515
1.fake() //~ ERROR no method named `fake` found
1616
}
1717
}
1818

19-
macro_rules! fake_field_stmt { //~ NOTE in expansion of
19+
macro_rules! fake_field_stmt {
2020
() => {
2121
1.fake //~ ERROR no field with that name
2222
}
2323
}
2424

25-
macro_rules! fake_anon_field_stmt { //~ NOTE in expansion of
25+
macro_rules! fake_anon_field_stmt {
2626
() => {
2727
(1).0 //~ ERROR type was not a tuple
2828
}
2929
}
3030

31-
macro_rules! fake_method_expr { //~ NOTE in expansion of
31+
macro_rules! fake_method_expr {
3232
() => {
3333
1.fake() //~ ERROR no method named `fake` found
3434
}
@@ -47,11 +47,13 @@ macro_rules! fake_anon_field_expr {
4747
}
4848

4949
fn main() {
50-
fake_method_stmt!(); //~ NOTE expansion site
51-
fake_field_stmt!(); //~ NOTE expansion site
52-
fake_anon_field_stmt!(); //~ NOTE expansion site
50+
fake_method_stmt!(); //~ NOTE in this expansion of
51+
fake_field_stmt!(); //~ NOTE in this expansion of
52+
fake_anon_field_stmt!(); //~ NOTE in this expansion of
5353

54-
let _ = fake_method_expr!(); //~ NOTE expansion site
54+
let _ = fake_method_expr!(); //~ NOTE in this expansion of
5555
let _ = fake_field_expr!(); //~ ERROR no field with that name
56+
//~^ NOTE in this expansion of
5657
let _ = fake_anon_field_expr!(); //~ ERROR type was not a tuple
58+
//~^ NOTE in this expansion of
5759
}

branches/beta/src/test/compile-fail/macro-backtrace-nested.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ macro_rules! call_nested_expr {
1919
() => (nested_expr!())
2020
}
2121

22-
macro_rules! call_nested_expr_sum { //~ NOTE in expansion of
22+
macro_rules! call_nested_expr_sum {
2323
() => { 1 + nested_expr!(); } //~ ERROR unresolved name
2424
}
2525

2626
fn main() {
2727
1 + call_nested_expr!(); //~ ERROR unresolved name
28-
call_nested_expr_sum!(); //~ NOTE expansion site
28+
call_nested_expr_sum!(); //~ NOTE in this expansion of
2929
}

branches/beta/src/test/compile-fail/macro-backtrace-println.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@
1616

1717
fn print(_args: std::fmt::Arguments) {}
1818

19-
macro_rules! myprint { //~ NOTE in expansion of
20-
($($arg:tt)*) => (print(format_args!($($arg)*)));
19+
macro_rules! myprint {
20+
($($arg:tt)*) => (print(format_args!($($arg)*))); //~ NOTE in this expansion of
2121
}
2222

23-
macro_rules! myprintln { //~ NOTE in expansion of
23+
macro_rules! myprintln {
2424
($fmt:expr) => (myprint!(concat!($fmt, "\n"))); //~ ERROR invalid reference to argument `0`
25+
//~^ NOTE in this expansion of
2526
}
2627

2728
fn main() {
28-
myprintln!("{}"); //~ NOTE expansion site
29+
myprintln!("{}"); //~ NOTE in this expansion of
2930
}

branches/beta/src/test/compile-fail/method-macro-backtrace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// forbid-output: in expansion of
11+
// forbid-output: in this expansion of
1212

1313
macro_rules! make_method {
1414
($name:ident) => ( fn $name(&self) { } )

0 commit comments

Comments
 (0)