Skip to content

Commit 22d0440

Browse files
committed
Add comments
1 parent ae5687e commit 22d0440

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

library/alloc/src/collections/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
//! Collection types.
22
3+
// Note: This module is also included in the alloctests crate using #[path] to
4+
// run the tests. See the comment there for an explanation why this is the case.
5+
36
#![stable(feature = "rust1", since = "1.0.0")]
47

58
#[cfg(not(no_global_oom_handling))]

library/alloc/src/raw_vec/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#![unstable(feature = "raw_vec_internals", reason = "unstable const warnings", issue = "none")]
22
#![cfg_attr(test, allow(dead_code))]
33

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.
6+
47
use core::marker::PhantomData;
58
use core::mem::{ManuallyDrop, MaybeUninit, SizedTypeProperties};
69
use core::ptr::{self, NonNull, Unique};

library/alloctests/lib.rs

+3
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ extern crate test;
6767
mod testing;
6868
use realalloc::*;
6969

70+
// We are directly including collections and raw_vec here as both use non-public
71+
// methods and fields in tests and as such need to have the types to test in the
72+
// same crate as the tests themself.
7073
#[path = "../alloc/src/collections/mod.rs"]
7174
mod collections;
7275

0 commit comments

Comments
 (0)