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