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 1
1
// vim: tw=80
2
2
//! Attributes are applied to the mock object, too.
3
3
#![ deny( warnings) ]
4
+ #![ allow( unexpected_cfgs) ] // multics is deliberately always false
4
5
5
6
use mockall:: * ;
6
7
Original file line number Diff line number Diff line change 1
1
// vim: tw=80
2
2
//! #[concretize] can be used inside of #[cfg_attr()]`
3
3
#![ deny( warnings) ]
4
+ #![ allow( unexpected_cfgs) ] // multics is deliberately always false
4
5
5
6
use std:: path:: { Path , PathBuf } ;
6
7
7
8
use mockall:: { automock, concretize} ;
8
9
9
10
#[ automock]
10
11
trait Foo {
11
- #[ cfg_attr( not( target_os = "ia64-unknown- multics" ) , concretize) ]
12
+ #[ cfg_attr( not( target_os = "multics" ) , concretize) ]
12
13
fn foo < P : AsRef < Path > > ( & self , p : P ) ;
13
14
}
14
15
Original file line number Diff line number Diff line change @@ -47,6 +47,6 @@ fn static_mut() {
47
47
. withf ( |x| * x == 5 )
48
48
. returning ( |x| { * x = 42 ; } ) ;
49
49
// 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) ) ; }
51
51
assert_eq ! ( x, 42 ) ;
52
52
}
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