Skip to content

Commit

Permalink
Add NOTE test annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
fhahn committed Jan 27, 2016
1 parent e533ed9 commit ecb7b01
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/test/compile-fail/issue-25385.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ macro_rules! foo {
fn main() {
let a = 1i32;
foo!(a);
//~^ NOTE in this expansion of foo!

foo!(1i32.foo());
//~^ ERROR no method named `foo` found for type `i32` in the current scope
Expand Down
2 changes: 2 additions & 0 deletions src/test/compile-fail/issue-25386.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ macro_rules! check_ptr_exist {
fn main() {
let item = stuff::Item::new();
println!("{}", check_ptr_exist!(item, name));
//~^ NOTE in this expansion of check_ptr_exist!
//~^^ NOTE in this expansion of check_ptr_exist!
}
5 changes: 2 additions & 3 deletions src/test/compile-fail/issue-25793.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ impl HasInfo {

fn get_other(&mut self) -> usize {
self.get_size(width!(self))
//~^ NOTE in this expansion of width!
}
}

fn main() {
println!("hello?");
}
fn main() {}
1 change: 1 addition & 0 deletions src/test/compile-fail/issue-26093.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ macro_rules! not_an_lvalue {

fn main() {
not_an_lvalue!(99);
//~^ NOTE in this expansion of not_an_lvalue!
}
4 changes: 2 additions & 2 deletions src/test/compile-fail/issue-26094.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ macro_rules! some_macro {
})
}

fn some_function() {
}
fn some_function() {}

fn main() {
some_macro!(some_function);
//~^ in this expansion of some_macro!
}
1 change: 1 addition & 0 deletions src/test/compile-fail/issue-26237.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ fn main() {
let mut value_a = 0;
let mut value_b = 0;
macro_panic!(value_a, value_b);
//~^ in this expansion of macro_panic!
}
2 changes: 2 additions & 0 deletions src/test/compile-fail/issue-26480.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ macro_rules! cast {
fn main() {
let hello = ['H', 'e', 'y'];
write!(hello);
//~^ NOTE in this expansion of write!

cast!(2);
//~^ NOTE in this expansion of cast!
}
1 change: 1 addition & 0 deletions src/test/compile-fail/issue-28308.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

// this error is dispayed in `<std macros>`
// error-pattern:cannot apply unary operator `!` to type `&'static str`
// error-pattern:in this expansion of assert!

fn main() {
assert!("foo");
Expand Down
1 change: 1 addition & 0 deletions src/test/compile-fail/issue-29084.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ macro_rules! foo {

fn main() {
foo!(0u8);
//~^ NOTE in this expansion of foo!
}
1 change: 1 addition & 0 deletions src/test/compile-fail/issue-31011.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ struct Foo {
fn wrap<T>(context: &T) -> ()
{
log!(context, "entered wrapper");
//~^ in this expansion of log!
}

fn main() {
Expand Down

0 comments on commit ecb7b01

Please sign in to comment.