2019-05-21 22:09:58 +00:00
|
|
|
// aux-build:test-macros.rs
|
2017-07-11 15:29:08 +00:00
|
|
|
|
2018-09-09 22:54:51 +00:00
|
|
|
#![feature(custom_inner_attributes)]
|
|
|
|
|
2019-05-21 22:09:58 +00:00
|
|
|
#[macro_use]
|
|
|
|
extern crate test_macros;
|
2017-07-11 15:29:08 +00:00
|
|
|
|
2019-05-21 22:09:58 +00:00
|
|
|
#[recollect_attr]
|
2017-07-12 16:50:05 +00:00
|
|
|
fn test1() {
|
2017-07-11 15:29:08 +00:00
|
|
|
let a: i32 = "foo";
|
|
|
|
//~^ ERROR: mismatched types
|
2018-04-19 02:36:48 +00:00
|
|
|
let b: i32 = "f'oo";
|
|
|
|
//~^ ERROR: mismatched types
|
2017-07-11 15:29:08 +00:00
|
|
|
}
|
|
|
|
|
2017-07-12 16:50:05 +00:00
|
|
|
fn test2() {
|
2019-05-21 22:09:58 +00:00
|
|
|
#![recollect_attr]
|
2017-07-12 16:50:05 +00:00
|
|
|
|
|
|
|
// FIXME: should have a type error here and assert it works but it doesn't
|
|
|
|
}
|
|
|
|
|
|
|
|
trait A {
|
2019-05-21 22:09:58 +00:00
|
|
|
// FIXME: should have a #[recollect_attr] attribute here and assert that it works
|
2017-07-12 16:50:05 +00:00
|
|
|
fn foo(&self) {
|
|
|
|
let a: i32 = "foo";
|
|
|
|
//~^ ERROR: mismatched types
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
struct B;
|
|
|
|
|
|
|
|
impl A for B {
|
2019-05-21 22:09:58 +00:00
|
|
|
#[recollect_attr]
|
2017-07-12 16:50:05 +00:00
|
|
|
fn foo(&self) {
|
|
|
|
let a: i32 = "foo";
|
|
|
|
//~^ ERROR: mismatched types
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-05-21 22:09:58 +00:00
|
|
|
#[recollect_attr]
|
2017-07-11 15:29:08 +00:00
|
|
|
fn main() {
|
|
|
|
}
|