Add NOTE test annotations
This commit is contained in:
parent
e533ed91be
commit
ecb7b01a08
10 changed files with 14 additions and 5 deletions
|
@ -17,6 +17,7 @@ macro_rules! foo {
|
||||||
fn main() {
|
fn main() {
|
||||||
let a = 1i32;
|
let a = 1i32;
|
||||||
foo!(a);
|
foo!(a);
|
||||||
|
//~^ NOTE in this expansion of foo!
|
||||||
|
|
||||||
foo!(1i32.foo());
|
foo!(1i32.foo());
|
||||||
//~^ ERROR no method named `foo` found for type `i32` in the current scope
|
//~^ ERROR no method named `foo` found for type `i32` in the current scope
|
||||||
|
|
|
@ -35,4 +35,6 @@ macro_rules! check_ptr_exist {
|
||||||
fn main() {
|
fn main() {
|
||||||
let item = stuff::Item::new();
|
let item = stuff::Item::new();
|
||||||
println!("{}", check_ptr_exist!(item, name));
|
println!("{}", check_ptr_exist!(item, name));
|
||||||
|
//~^ NOTE in this expansion of check_ptr_exist!
|
||||||
|
//~^^ NOTE in this expansion of check_ptr_exist!
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,9 +26,8 @@ impl HasInfo {
|
||||||
|
|
||||||
fn get_other(&mut self) -> usize {
|
fn get_other(&mut self) -> usize {
|
||||||
self.get_size(width!(self))
|
self.get_size(width!(self))
|
||||||
|
//~^ NOTE in this expansion of width!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {}
|
||||||
println!("hello?");
|
|
||||||
}
|
|
||||||
|
|
|
@ -17,4 +17,5 @@ macro_rules! not_an_lvalue {
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
not_an_lvalue!(99);
|
not_an_lvalue!(99);
|
||||||
|
//~^ NOTE in this expansion of not_an_lvalue!
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,9 +15,9 @@ macro_rules! some_macro {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fn some_function() {
|
fn some_function() {}
|
||||||
}
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
some_macro!(some_function);
|
some_macro!(some_function);
|
||||||
|
//~^ in this expansion of some_macro!
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,4 +19,5 @@ fn main() {
|
||||||
let mut value_a = 0;
|
let mut value_a = 0;
|
||||||
let mut value_b = 0;
|
let mut value_b = 0;
|
||||||
macro_panic!(value_a, value_b);
|
macro_panic!(value_a, value_b);
|
||||||
|
//~^ in this expansion of macro_panic!
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,6 +37,8 @@ macro_rules! cast {
|
||||||
fn main() {
|
fn main() {
|
||||||
let hello = ['H', 'e', 'y'];
|
let hello = ['H', 'e', 'y'];
|
||||||
write!(hello);
|
write!(hello);
|
||||||
|
//~^ NOTE in this expansion of write!
|
||||||
|
|
||||||
cast!(2);
|
cast!(2);
|
||||||
|
//~^ NOTE in this expansion of cast!
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
// this error is dispayed in `<std macros>`
|
// this error is dispayed in `<std macros>`
|
||||||
// error-pattern:cannot apply unary operator `!` to type `&'static str`
|
// error-pattern:cannot apply unary operator `!` to type `&'static str`
|
||||||
|
// error-pattern:in this expansion of assert!
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
assert!("foo");
|
assert!("foo");
|
||||||
|
|
|
@ -18,4 +18,5 @@ macro_rules! foo {
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
foo!(0u8);
|
foo!(0u8);
|
||||||
|
//~^ NOTE in this expansion of foo!
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,7 @@ struct Foo {
|
||||||
fn wrap<T>(context: &T) -> ()
|
fn wrap<T>(context: &T) -> ()
|
||||||
{
|
{
|
||||||
log!(context, "entered wrapper");
|
log!(context, "entered wrapper");
|
||||||
|
//~^ in this expansion of log!
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue