-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #113318 - tgross35:113283-allocator-trait-eq, r=m-ou-se
Revert "alloc: Allow comparing Boxs over different allocators", add regression test Temporary fix for #113283 Adds a test to fix the regression introduced in 001b081 and revert that commit. The test fails without the revert.
- Loading branch information
Showing
2 changed files
with
27 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
tests/ui/type-inference/issue-113283-alllocator-trait-eq.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<Box<i32>> = vec![]; | ||
assert_eq!(boxed, vec![]); | ||
|
||
let rc: Vec<Rc<i32>> = vec![]; | ||
assert_eq!(rc, vec![]); | ||
|
||
let arc: Vec<Arc<i32>> = vec![]; | ||
assert_eq!(arc, vec![]); | ||
} |