Closed
Description
Crate a
:
#![feature(extern_types)]
extern {
pub type Void;
}
impl Void {
/// Similar to `std::ptr::null_mut`, which requires `T: Sized`.
pub fn null_mut() -> *mut Self {
0 as _
}
}
pub fn foo() {
let _ = Void::null_mut(); // This is fine
}
Crate b
:
extern crate a;
fn main() {
let _ = a::Void::null_mut();
}
error[E0599]: no function or associated item named `null_mut` found for type `a::Void` in the current scope
--> src/main.rs:4:13
|
4 | let _ = a::Void::null_mut();
| ^^^^^^^^^^^^^^^^^ function or associated item not found in `a::Void`