]>
Commit | Line | Data |
---|---|---|
dc9dc135 | 1 | // aux-build:test-macros.rs |
3b2f2976 | 2 | |
b7449926 | 3 | #![feature(custom_inner_attributes)] |
3b2f2976 | 4 | |
dc9dc135 XL |
5 | #[macro_use] |
6 | extern crate test_macros; | |
3b2f2976 | 7 | |
dc9dc135 | 8 | #[recollect_attr] |
3b2f2976 XL |
9 | fn test1() { |
10 | let a: i32 = "foo"; | |
11 | //~^ ERROR: mismatched types | |
83c7162d XL |
12 | let b: i32 = "f'oo"; |
13 | //~^ ERROR: mismatched types | |
3b2f2976 XL |
14 | } |
15 | ||
16 | fn test2() { | |
dc9dc135 | 17 | #![recollect_attr] |
3b2f2976 XL |
18 | |
19 | // FIXME: should have a type error here and assert it works but it doesn't | |
20 | } | |
21 | ||
22 | trait A { | |
dc9dc135 | 23 | // FIXME: should have a #[recollect_attr] attribute here and assert that it works |
3b2f2976 XL |
24 | fn foo(&self) { |
25 | let a: i32 = "foo"; | |
26 | //~^ ERROR: mismatched types | |
27 | } | |
28 | } | |
29 | ||
30 | struct B; | |
31 | ||
32 | impl A for B { | |
dc9dc135 | 33 | #[recollect_attr] |
3b2f2976 XL |
34 | fn foo(&self) { |
35 | let a: i32 = "foo"; | |
36 | //~^ ERROR: mismatched types | |
37 | } | |
38 | } | |
39 | ||
dc9dc135 | 40 | #[recollect_attr] |
3b2f2976 XL |
41 | fn main() { |
42 | } |