File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ impl Error {
142
142
}
143
143
144
144
/// Returns a string representing the error, if one exists.
145
- #[ cfg( not( testlib) ) ]
145
+ #[ cfg( not( any ( test , testlib) ) ) ]
146
146
pub fn name ( & self ) -> Option < & ' static CStr > {
147
147
// SAFETY: Just an FFI call, there are no extra safety requirements.
148
148
let ptr = unsafe { bindings:: errname ( -self . 0 ) } ;
@@ -159,7 +159,7 @@ impl Error {
159
159
/// When `testlib` is configured, this always returns `None` to avoid the dependency on a
160
160
/// kernel function so that tests that use this (e.g., by calling [`Result::unwrap`]) can still
161
161
/// run in userspace.
162
- #[ cfg( testlib) ]
162
+ #[ cfg( any ( test , testlib) ) ]
163
163
pub fn name ( & self ) -> Option < & ' static CStr > {
164
164
None
165
165
}
You can’t perform that action at this time.
0 commit comments