File tree Expand file tree Collapse file tree 4 files changed +11
-2
lines changed Expand file tree Collapse file tree 4 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 11// vim: tw=80
22//! Attributes are applied to the mock object, too.
33#![ deny( warnings) ]
4+ #![ allow( unexpected_cfgs) ] // multics is deliberately always false
45
56use mockall:: * ;
67
Original file line number Diff line number Diff line change 11// vim: tw=80
22//! #[concretize] can be used inside of #[cfg_attr()]`
33#![ deny( warnings) ]
4+ #![ allow( unexpected_cfgs) ] // multics is deliberately always false
45
56use std:: path:: { Path , PathBuf } ;
67
78use mockall:: { automock, concretize} ;
89
910#[ automock]
1011trait Foo {
11- #[ cfg_attr( not( target_os = "ia64-unknown- multics" ) , concretize) ]
12+ #[ cfg_attr( not( target_os = "multics" ) , concretize) ]
1213 fn foo < P : AsRef < Path > > ( & self , p : P ) ;
1314}
1415
Original file line number Diff line number Diff line change @@ -47,6 +47,6 @@ fn static_mut() {
4747 . withf ( |x| * x == 5 )
4848 . returning ( |x| { * x = 42 ; } ) ;
4949 // Safe because mock leaves scope before x
50- unsafe { mock. bar ( mem:: transmute :: < & mut u32 , & mut u32 > ( & mut x) ) ; }
50+ unsafe { mock. bar ( mem:: transmute :: < & mut u32 , & ' static mut u32 > ( & mut x) ) ; }
5151 assert_eq ! ( x, 42 ) ;
5252}
Original file line number Diff line number Diff line change 1+ fn main ( ) {
2+ // Avoid unnecessary re-building.
3+ println ! ( "cargo:rerun-if-changed=build.rs" ) ;
4+
5+ // Quiet rustc's helpful lint. reprocheck is defined in CI.
6+ println ! ( "cargo::rustc-check-cfg=cfg(reprocheck)" ) ;
7+ }
You can’t perform that action at this time.
0 commit comments