Skip to content

Commit db747ba

Browse files
committed
rust: alloc: add SPDX License Identifiers
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent e7ac457 commit db747ba

23 files changed

+46
-0
lines changed

Diff for: rust/alloc/alloc.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
//! Memory allocation APIs
24
35
#![stable(feature = "alloc_module", since = "1.28.0")]

Diff for: rust/alloc/borrow.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
//! A module for working with borrowed data.
24
35
#![stable(feature = "rust1", since = "1.0.0")]

Diff for: rust/alloc/boxed.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
//! A pointer type for heap allocation.
24
//!
35
//! [`Box<T>`], casually referred to as a 'box', provides the simplest form of

Diff for: rust/alloc/collections/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
//! Collection types.
24
35
#![stable(feature = "rust1", since = "1.0.0")]

Diff for: rust/alloc/fmt.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
//! Utilities for formatting and printing `String`s.
24
//!
35
//! This module contains the runtime support for the [`format!`] syntax extension.

Diff for: rust/alloc/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
//! # The Rust core allocation and collections library
24
//!
35
//! This library provides smart pointers and collections for managing

Diff for: rust/alloc/macros.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
/// Creates a [`Vec`] containing the arguments.
24
///
35
/// `vec!` allows `Vec`s to be defined with the same syntax as array expressions.

Diff for: rust/alloc/prelude/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
//! The alloc Prelude
24
//!
35
//! The purpose of this module is to alleviate imports of commonly-used

Diff for: rust/alloc/prelude/v1.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
//! The first version of the prelude of `alloc` crate.
24
//!
35
//! See the [module-level documentation](../index.html) for more.

Diff for: rust/alloc/raw_vec.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
#![unstable(feature = "raw_vec_internals", reason = "implementation detail", issue = "none")]
24
#![doc(hidden)]
35

Diff for: rust/alloc/rc.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
//! Single-threaded reference-counting pointers. 'Rc' stands for 'Reference
24
//! Counted'.
35
//!

Diff for: rust/alloc/slice.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
//! A dynamically-sized view into a contiguous sequence, `[T]`.
24
//!
35
//! *[See also the slice primitive type](slice).*

Diff for: rust/alloc/str.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
//! Unicode string slices.
24
//!
35
//! *[See also the `str` primitive type](str).*

Diff for: rust/alloc/string.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
//! A UTF-8–encoded, growable string.
24
//!
35
//! This module contains the [`String`] type, the [`ToString`] trait for

Diff for: rust/alloc/sync.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
#![stable(feature = "rust1", since = "1.0.0")]
24

35
//! Thread-safe reference-counting pointers.

Diff for: rust/alloc/vec/drain.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
use crate::alloc::{Allocator, Global};
24
use core::fmt;
35
use core::iter::{FusedIterator, TrustedLen};

Diff for: rust/alloc/vec/drain_filter.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
use crate::alloc::{Allocator, Global};
24
use core::ptr::{self};
35
use core::slice::{self};

Diff for: rust/alloc/vec/into_iter.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
use crate::alloc::{Allocator, Global};
24
use crate::raw_vec::RawVec;
35
use core::fmt;

Diff for: rust/alloc/vec/is_zero.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
use crate::boxed::Box;
24

35
#[rustc_specialization_trait]

Diff for: rust/alloc/vec/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
//! A contiguous growable array type with heap-allocated contents, written
24
//! `Vec<T>`.
35
//!

Diff for: rust/alloc/vec/partial_eq.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
use crate::alloc::Allocator;
24
#[cfg(not(no_global_oom_handling))]
35
use crate::borrow::Cow;

Diff for: rust/alloc/vec/set_len_on_drop.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
// Set the length of the vec when the `SetLenOnDrop` value goes out of scope.
24
//
35
// The idea is: The length field in SetLenOnDrop is a local variable

Diff for: rust/alloc/vec/spec_extend.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
13
use crate::alloc::Allocator;
24
use core::iter::TrustedLen;
35
use core::ptr::{self};

0 commit comments

Comments
 (0)