Skip to content

Commit

Permalink
rust: alloc: add SPDX License Identifiers
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Ojeda <[email protected]>
  • Loading branch information
ojeda committed Jul 1, 2021
1 parent e7ac457 commit db747ba
Show file tree
Hide file tree
Showing 23 changed files with 46 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rust/alloc/alloc.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Memory allocation APIs

#![stable(feature = "alloc_module", since = "1.28.0")]
Expand Down
2 changes: 2 additions & 0 deletions rust/alloc/borrow.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! A module for working with borrowed data.

#![stable(feature = "rust1", since = "1.0.0")]
Expand Down
2 changes: 2 additions & 0 deletions rust/alloc/boxed.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! A pointer type for heap allocation.
//!
//! [`Box<T>`], casually referred to as a 'box', provides the simplest form of
Expand Down
2 changes: 2 additions & 0 deletions rust/alloc/collections/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Collection types.

#![stable(feature = "rust1", since = "1.0.0")]
Expand Down
2 changes: 2 additions & 0 deletions rust/alloc/fmt.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Utilities for formatting and printing `String`s.
//!
//! This module contains the runtime support for the [`format!`] syntax extension.
Expand Down
2 changes: 2 additions & 0 deletions rust/alloc/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! # The Rust core allocation and collections library
//!
//! This library provides smart pointers and collections for managing
Expand Down
2 changes: 2 additions & 0 deletions rust/alloc/macros.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

/// Creates a [`Vec`] containing the arguments.
///
/// `vec!` allows `Vec`s to be defined with the same syntax as array expressions.
Expand Down
2 changes: 2 additions & 0 deletions rust/alloc/prelude/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! The alloc Prelude
//!
//! The purpose of this module is to alleviate imports of commonly-used
Expand Down
2 changes: 2 additions & 0 deletions rust/alloc/prelude/v1.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! The first version of the prelude of `alloc` crate.
//!
//! See the [module-level documentation](../index.html) for more.
Expand Down
2 changes: 2 additions & 0 deletions rust/alloc/raw_vec.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

#![unstable(feature = "raw_vec_internals", reason = "implementation detail", issue = "none")]
#![doc(hidden)]

Expand Down
2 changes: 2 additions & 0 deletions rust/alloc/rc.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Single-threaded reference-counting pointers. 'Rc' stands for 'Reference
//! Counted'.
//!
Expand Down
2 changes: 2 additions & 0 deletions rust/alloc/slice.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! A dynamically-sized view into a contiguous sequence, `[T]`.
//!
//! *[See also the slice primitive type](slice).*
Expand Down
2 changes: 2 additions & 0 deletions rust/alloc/str.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! Unicode string slices.
//!
//! *[See also the `str` primitive type](str).*
Expand Down
2 changes: 2 additions & 0 deletions rust/alloc/string.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! A UTF-8–encoded, growable string.
//!
//! This module contains the [`String`] type, the [`ToString`] trait for
Expand Down
2 changes: 2 additions & 0 deletions rust/alloc/sync.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

#![stable(feature = "rust1", since = "1.0.0")]

//! Thread-safe reference-counting pointers.
Expand Down
2 changes: 2 additions & 0 deletions rust/alloc/vec/drain.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

use crate::alloc::{Allocator, Global};
use core::fmt;
use core::iter::{FusedIterator, TrustedLen};
Expand Down
2 changes: 2 additions & 0 deletions rust/alloc/vec/drain_filter.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

use crate::alloc::{Allocator, Global};
use core::ptr::{self};
use core::slice::{self};
Expand Down
2 changes: 2 additions & 0 deletions rust/alloc/vec/into_iter.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

use crate::alloc::{Allocator, Global};
use crate::raw_vec::RawVec;
use core::fmt;
Expand Down
2 changes: 2 additions & 0 deletions rust/alloc/vec/is_zero.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

use crate::boxed::Box;

#[rustc_specialization_trait]
Expand Down
2 changes: 2 additions & 0 deletions rust/alloc/vec/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

//! A contiguous growable array type with heap-allocated contents, written
//! `Vec<T>`.
//!
Expand Down
2 changes: 2 additions & 0 deletions rust/alloc/vec/partial_eq.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

use crate::alloc::Allocator;
#[cfg(not(no_global_oom_handling))]
use crate::borrow::Cow;
Expand Down
2 changes: 2 additions & 0 deletions rust/alloc/vec/set_len_on_drop.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

// Set the length of the vec when the `SetLenOnDrop` value goes out of scope.
//
// The idea is: The length field in SetLenOnDrop is a local variable
Expand Down
2 changes: 2 additions & 0 deletions rust/alloc/vec/spec_extend.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT

use crate::alloc::Allocator;
use core::iter::TrustedLen;
use core::ptr::{self};
Expand Down

0 comments on commit db747ba

Please sign in to comment.