You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bare impls on same-crate different-mod imported types were useful and there is no alternative #749
This issue was labelled with: A-typesystem in the Rust repository
The following code used to work, but there is no longer any way to do this sort of thing.
Moving the impl into the mod can't be done because low-level modules need to remain similar to the C API they are wrapping, for example if they are generated; and unlike C it is not possible to reopen a module after it is closed.
Adding a meaningless trait does not work because trait methods cannot be called unless you import the trait.
Please bring back some way to do this (whispers of every crate being able to silently inject a prelude does not sound like a good idea at all).
Activity
eddyb commentedon Jan 27, 2015
See #735 for a likely solution.
petrochenkov commentedon Jan 30, 2018
Fixed long time ago.
I even forgot this limitation on inherent items existed.