Hi. I'm learning Rust these days and have a (maybe stupid) question:
Where are the primitive types (isize, bool, ...) originally defined, in core or std lib?
In the docs it looks like they are implemented twice, but I think one library uses the implementation of the other. So: Which library should better be used e. g. for associated methods and constants like isize::MAX?
An what means the note "Deprecation planned" by the primitives in std?
Primitive types are compiler built-in types. They aren't defined in the standard library but are part of the language. Methods, associated functions and constants for primitive types are all implemented in core, I believe. std re-exports core, including these impls for primitive types.
I'm not sure I understand what you mean. Do you have a link to where this is stated?
Ah yes, thank you. Well, the ::core::isize and ::std::isize modules are deprecated in favour of the assoicated constants isize::MAX and isize::MIN. So newly developed code should prefer using these.