Skip to content

Commit

Permalink
Auto merge of #126793 - saethlin:mono-rawvec, r=scottmcm
Browse files Browse the repository at this point in the history
Apply "polymorphization at home" to RawVec

The idea here is to move all the logic in RawVec into functions with explicit size and alignment parameters. This should eliminate all the fussing about how tweaking RawVec code produces large swings in compile times.

This uncovered rust-lang/rust-clippy#12979, so I've modified the relevant test in a way that tries to preserve the spirit of the test without tripping the ICE.
  • Loading branch information
bors committed Aug 12, 2024
2 parents aad0563 + 74a9685 commit 65e5058
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions tests/pass/tree_borrows/vec_unique.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// FIXME: This test is broken since https://github.com/rust-lang/rust/pull/126793,
// possibly related to the additional struct between Vec and Unique.
//@revisions: default uniq
// We disable the GC for this test because it would change what is printed.
//@compile-flags: -Zmiri-tree-borrows -Zmiri-provenance-gc=0
Expand Down
8 changes: 5 additions & 3 deletions tests/pass/tree_borrows/vec_unique.uniq.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
Warning: this tree is indicative only. Some tags may have been hidden.
0.. 2
| Act | └─┬──<TAG=root of the allocation>
|-----| └─┬──<TAG=base.as_ptr(), base.as_ptr()>
|-----| └─┬──<TAG=raw_parts.0>
|-----| └────<TAG=reconstructed.as_ptr(), reconstructed.as_ptr()>
|-----| ├────<TAG=base.as_ptr()>
|-----| ├────<TAG=base.as_ptr()>
|-----| └─┬──<TAG=raw_parts.0>
|-----| ├────<TAG=reconstructed.as_ptr()>
|-----| └────<TAG=reconstructed.as_ptr()>
──────────────────────────────────────────────────

0 comments on commit 65e5058

Please # to comment.