diff --git a/tests/ui/type-inference/issue-113283-alllocator-trait-eq.rs b/tests/ui/type-inference/issue-113283-alllocator-trait-eq.rs new file mode 100644 index 00000000000..5d0e456d9dd --- /dev/null +++ b/tests/ui/type-inference/issue-113283-alllocator-trait-eq.rs @@ -0,0 +1,18 @@ +// run-pass +// Verify that PartialEq implementations do not break type inference when +// accepting types with different allocators + +use std::rc::Rc; +use std::sync::Arc; + + +fn main() { + let boxed: Vec> = vec![]; + assert_eq!(boxed, vec![]); + + let rc: Vec> = vec![]; + assert_eq!(rc, vec![]); + + let arc: Vec> = vec![]; + assert_eq!(arc, vec![]); +}