There are several different arguments pointed out in the following source regarding why it is not possible to implement existing types that are outside the same box,
impl . , " Add on Vec<T> concat,..., ... ... mathy [is]. impl upgrade, ... 2."
, .. " " 3."
. , , , " [] [] , , , " ", " " impl impl, , pull . impl create 4."
, impl , impls . " [ ] 5." "HashTable" 5.
mod foo {
impl Hash for i32 { ... }
fn f(mut table: HashMap<i32, &'static str>) {
table.insert(0, "hello");
::bar::f(&table);
}
}
mod bar {
impl Hash for i32 { ... }
fn f(table: &HashMap<i32, &'static str>) {
assert_eq!(table.get(0), Some("hello"));
}
}