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