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