Skip to content

Commit e637634

Browse files
committed
Add/remove files lost/not removed in some past mis-merge
1 parent 92ccc71 commit e637634

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+1391
-1045
lines changed
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#![unstable(feature = "raw_vec_internals", reason = "unstable const warnings", issue = "none")]
2+
#![cfg_attr(test, allow(dead_code))]
3+
4+
// Note: This module is also included in the alloctests crate using #[path] to
5+
// run the tests. See the comment there for an explanation why this is the case.
26

37
use core::marker::PhantomData;
48
use core::mem::{ManuallyDrop, MaybeUninit, SizedTypeProperties};
@@ -480,7 +484,7 @@ impl<A: Allocator> RawVecInner<A> {
480484

481485
// Allocators currently return a `NonNull<[u8]>` whose length
482486
// matches the size requested. If that ever changes, the capacity
483-
// here should change to `ptr.len() / mem::size_of::<T>()`.
487+
// here should change to `ptr.len() / size_of::<T>()`.
484488
Ok(Self {
485489
ptr: Unique::from(ptr.cast()),
486490
cap: unsafe { Cap::new_unchecked(capacity) },
@@ -627,7 +631,7 @@ impl<A: Allocator> RawVecInner<A> {
627631
unsafe fn set_ptr_and_cap(&mut self, ptr: NonNull<[u8]>, cap: usize) {
628632
// Allocators currently return a `NonNull<[u8]>` whose length matches
629633
// the size requested. If that ever changes, the capacity here should
630-
// change to `ptr.len() / mem::size_of::<T>()`.
634+
// change to `ptr.len() / size_of::<T>()`.
631635
self.ptr = Unique::from(ptr.cast());
632636
self.cap = unsafe { Cap::new_unchecked(cap) };
633637
}

library/alloc/tests/rc.rs

Lines changed: 0 additions & 260 deletions
This file was deleted.

library/alloctests/Cargo.toml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
[package]
2+
name = "alloctests"
3+
version = "0.0.0"
4+
license = "MIT OR Apache-2.0"
5+
repository = "https://github.com/rust-lang/rust.git"
6+
description = "Tests for the Rust Allocation Library"
7+
autotests = false
8+
autobenches = false
9+
edition = "2021"
10+
11+
[lib]
12+
path = "lib.rs"
13+
test = true
14+
bench = true
15+
doc = false
16+
17+
[dev-dependencies]
18+
rand = { version = "0.9.0", default-features = false, features = ["alloc"] }
19+
rand_xorshift = "0.4.0"
20+
21+
[[test]]
22+
name = "alloctests"
23+
path = "tests/lib.rs"
24+
25+
[[test]]
26+
name = "vec_deque_alloc_error"
27+
path = "tests/vec_deque_alloc_error.rs"
28+
29+
[[bench]]
30+
name = "allocbenches"
31+
path = "benches/lib.rs"
32+
test = true
33+
34+
[[bench]]
35+
name = "vec_deque_append_bench"
36+
path = "benches/vec_deque_append.rs"
37+
harness = false
38+
39+
[lints.rust.unexpected_cfgs]
40+
level = "warn"
41+
check-cfg = [
42+
'cfg(bootstrap)',
43+
'cfg(no_global_oom_handling)',
44+
'cfg(no_rc)',
45+
'cfg(no_sync)',
46+
'cfg(randomized_layouts)',
47+
]

0 commit comments

Comments
 (0)