88// option. This file may not be copied, modified, or distributed
99// except according to those terms.
1010
11- #![ feature( core_intrinsics, rustc_attrs ) ]
11+ #![ feature( core_intrinsics) ]
1212#![ allow( warnings) ]
1313
1414use std:: intrinsics;
@@ -18,97 +18,81 @@ struct Foo(i64);
1818type Bar = & ' static Fn ( ) ;
1919type Quux = [ u8 ; 100 ] ;
2020
21- #[ rustc_no_mir] // FIXME #27840 MIR doesn't provide precise spans for calls.
2221unsafe fn test_bool_load ( p : & mut bool , v : bool ) {
2322 intrinsics:: atomic_load ( p) ;
2423 //~^ ERROR `atomic_load` intrinsic: expected basic integer type, found `bool`
2524}
2625
27- #[ rustc_no_mir] // FIXME #27840 MIR doesn't provide precise spans for calls.
2826unsafe fn test_bool_store ( p : & mut bool , v : bool ) {
2927 intrinsics:: atomic_store ( p, v) ;
3028 //~^ ERROR `atomic_store` intrinsic: expected basic integer type, found `bool`
3129}
3230
33- #[ rustc_no_mir] // FIXME #27840 MIR doesn't provide precise spans for calls.
3431unsafe fn test_bool_xchg ( p : & mut bool , v : bool ) {
3532 intrinsics:: atomic_xchg ( p, v) ;
3633 //~^ ERROR `atomic_xchg` intrinsic: expected basic integer type, found `bool`
3734}
3835
39- #[ rustc_no_mir] // FIXME #27840 MIR doesn't provide precise spans for calls.
4036unsafe fn test_bool_cxchg ( p : & mut bool , v : bool ) {
4137 intrinsics:: atomic_cxchg ( p, v, v) ;
4238 //~^ ERROR `atomic_cxchg` intrinsic: expected basic integer type, found `bool`
4339}
4440
45- #[ rustc_no_mir] // FIXME #27840 MIR doesn't provide precise spans for calls.
4641unsafe fn test_Foo_load ( p : & mut Foo , v : Foo ) {
4742 intrinsics:: atomic_load ( p) ;
4843 //~^ ERROR `atomic_load` intrinsic: expected basic integer type, found `Foo`
4944}
5045
51- #[ rustc_no_mir] // FIXME #27840 MIR doesn't provide precise spans for calls.
5246unsafe fn test_Foo_store ( p : & mut Foo , v : Foo ) {
5347 intrinsics:: atomic_store ( p, v) ;
5448 //~^ ERROR `atomic_store` intrinsic: expected basic integer type, found `Foo`
5549}
5650
57- #[ rustc_no_mir] // FIXME #27840 MIR doesn't provide precise spans for calls.
5851unsafe fn test_Foo_xchg ( p : & mut Foo , v : Foo ) {
5952 intrinsics:: atomic_xchg ( p, v) ;
6053 //~^ ERROR `atomic_xchg` intrinsic: expected basic integer type, found `Foo`
6154}
6255
63- #[ rustc_no_mir] // FIXME #27840 MIR doesn't provide precise spans for calls.
6456unsafe fn test_Foo_cxchg ( p : & mut Foo , v : Foo ) {
6557 intrinsics:: atomic_cxchg ( p, v, v) ;
6658 //~^ ERROR `atomic_cxchg` intrinsic: expected basic integer type, found `Foo`
6759}
6860
69- #[ rustc_no_mir] // FIXME #27840 MIR doesn't provide precise spans for calls.
7061unsafe fn test_Bar_load ( p : & mut Bar , v : Bar ) {
7162 intrinsics:: atomic_load ( p) ;
7263 //~^ ERROR expected basic integer type, found `&'static std::ops::Fn() + 'static`
7364}
7465
75- #[ rustc_no_mir] // FIXME #27840 MIR doesn't provide precise spans for calls.
7666unsafe fn test_Bar_store ( p : & mut Bar , v : Bar ) {
7767 intrinsics:: atomic_store ( p, v) ;
7868 //~^ ERROR expected basic integer type, found `&'static std::ops::Fn() + 'static`
7969}
8070
81- #[ rustc_no_mir] // FIXME #27840 MIR doesn't provide precise spans for calls.
8271unsafe fn test_Bar_xchg ( p : & mut Bar , v : Bar ) {
8372 intrinsics:: atomic_xchg ( p, v) ;
8473 //~^ ERROR expected basic integer type, found `&'static std::ops::Fn() + 'static`
8574}
8675
87- #[ rustc_no_mir] // FIXME #27840 MIR doesn't provide precise spans for calls.
8876unsafe fn test_Bar_cxchg ( p : & mut Bar , v : Bar ) {
8977 intrinsics:: atomic_cxchg ( p, v, v) ;
9078 //~^ ERROR expected basic integer type, found `&'static std::ops::Fn() + 'static`
9179}
9280
93- #[ rustc_no_mir] // FIXME #27840 MIR doesn't provide precise spans for calls.
9481unsafe fn test_Quux_load ( p : & mut Quux , v : Quux ) {
9582 intrinsics:: atomic_load ( p) ;
9683 //~^ ERROR `atomic_load` intrinsic: expected basic integer type, found `[u8; 100]`
9784}
9885
99- #[ rustc_no_mir] // FIXME #27840 MIR doesn't provide precise spans for calls.
10086unsafe fn test_Quux_store ( p : & mut Quux , v : Quux ) {
10187 intrinsics:: atomic_store ( p, v) ;
10288 //~^ ERROR `atomic_store` intrinsic: expected basic integer type, found `[u8; 100]`
10389}
10490
105- #[ rustc_no_mir] // FIXME #27840 MIR doesn't provide precise spans for calls.
10691unsafe fn test_Quux_xchg ( p : & mut Quux , v : Quux ) {
10792 intrinsics:: atomic_xchg ( p, v) ;
10893 //~^ ERROR `atomic_xchg` intrinsic: expected basic integer type, found `[u8; 100]`
10994}
11095
111- #[ rustc_no_mir] // FIXME #27840 MIR doesn't provide precise spans for calls.
11296unsafe fn test_Quux_cxchg ( p : & mut Quux , v : Quux ) {
11397 intrinsics:: atomic_cxchg ( p, v, v) ;
11498 //~^ ERROR `atomic_cxchg` intrinsic: expected basic integer type, found `[u8; 100]`
0 commit comments