Skip to content

Commit 72067c7

Browse files
jonathanCoganm-ou-se
authored andcommitted
Replace libstd, libcore, liballoc in docs.
1 parent f6cc345 commit 72067c7

File tree

15 files changed

+35
-36
lines changed

15 files changed

+35
-36
lines changed

library/alloc/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! This library provides smart pointers and collections for managing
44
//! heap-allocated values.
55
//!
6-
//! This library, like libcore, normally doesn’t need to be used directly
6+
//! This library, like core, normally doesn’t need to be used directly
77
//! since its contents are re-exported in the [`std` crate](../std/index.html).
88
//! Crates that use the `#![no_std]` attribute however will typically
99
//! not depend on `std`, so they’d use this crate instead.

library/alloc/src/slice.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ impl [u8] {
653653
///
654654
/// ```error
655655
/// error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predica
656-
/// --> src/liballoc/slice.rs:608:6
656+
/// --> src/alloc/slice.rs:608:6
657657
/// |
658658
/// 608 | impl<T: Clone, V: Borrow<[T]>> Concat for [V] {
659659
/// | ^ unconstrained type parameter

library/core/src/fmt/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ impl Display for Arguments<'_> {
558558
///
559559
/// Derived `Debug` formats are not stable, and so may change with future Rust
560560
/// versions. Additionally, `Debug` implementations of types provided by the
561-
/// standard library (`libstd`, `libcore`, `liballoc`, etc.) are not stable, and
561+
/// standard library (`std`, `core`, `alloc`, etc.) are not stable, and
562562
/// may also change with future Rust versions.
563563
///
564564
/// # Examples

library/core/src/panic.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ pub macro unreachable_2021 {
9090
),
9191
}
9292

93-
/// An internal trait used by libstd to pass data from libstd to `panic_unwind`
94-
/// and other panic runtimes. Not intended to be stabilized any time soon, do
95-
/// not use.
93+
/// An internal trait used by std to pass data from std to `panic_unwind` and
94+
/// other panic runtimes. Not intended to be stabilized any time soon, do not
95+
/// use.
9696
#[unstable(feature = "std_internals", issue = "none")]
9797
#[doc(hidden)]
9898
pub unsafe trait BoxMeUp {
9999
/// Take full ownership of the contents.
100-
/// The return type is actually `Box<dyn Any + Send>`, but we cannot use `Box` in libcore.
100+
/// The return type is actually `Box<dyn Any + Send>`, but we cannot use `Box` in core.
101101
///
102102
/// After this method got called, only some dummy default value is left in `self`.
103103
/// Calling this method twice, or calling `get` after calling this method, is an error.

library/core/src/panicking.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
//! Panic support for libcore
1+
//! Panic support for core
22
//!
33
//! The core library cannot define panicking, but it does *declare* panicking. This
4-
//! means that the functions inside of libcore are allowed to panic, but to be
5-
//! useful an upstream crate must define panicking for libcore to use. The current
4+
//! means that the functions inside of core are allowed to panic, but to be
5+
//! useful an upstream crate must define panicking for core to use. The current
66
//! interface for panicking is:
77
//!
88
//! ```
@@ -13,7 +13,7 @@
1313
//! This definition allows for panicking with any general message, but it does not
1414
//! allow for failing with a `Box<Any>` value. (`PanicInfo` just contains a `&(dyn Any + Send)`,
1515
//! for which we fill in a dummy value in `PanicInfo::internal_constructor`.)
16-
//! The reason for this is that libcore is not allowed to allocate.
16+
//! The reason for this is that core is not allowed to allocate.
1717
//!
1818
//! This module contains a few other panicking functions, but these are just the
1919
//! necessary lang items for the compiler. All panics are funneled through this
@@ -94,7 +94,7 @@ pub fn panic_nounwind(msg: &'static str) -> ! {
9494
// Next we define a bunch of higher-level wrappers that all bottom out in the two core functions
9595
// above.
9696

97-
/// The underlying implementation of libcore's `panic!` macro when no formatting is used.
97+
/// The underlying implementation of core's `panic!` macro when no formatting is used.
9898
// never inline unless panic_immediate_abort to avoid code
9999
// bloat at the call sites as much as possible
100100
#[cfg_attr(not(feature = "panic_immediate_abort"), inline(never), cold)]

library/core/src/prelude/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
//! The libcore prelude
1+
//! The core prelude
22
//!
3-
//! This module is intended for users of libcore which do not link to libstd as
4-
//! well. This module is imported by default when `#![no_std]` is used in the
5-
//! same manner as the standard library's prelude.
3+
//! This module is intended for users of core which do not link to std as well.
4+
//! This module is imported by default when `#![no_std]` is used in the same
5+
//! manner as the standard library's prelude.
66
77
#![stable(feature = "core_prelude", since = "1.4.0")]
88

library/core/src/slice/sort.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! This module contains a sorting algorithm based on Orson Peters' pattern-defeating quicksort,
44
//! published at: <https://github.com/orlp/pdqsort>
55
//!
6-
//! Unstable sorting is compatible with libcore because it doesn't allocate memory, unlike our
6+
//! Unstable sorting is compatible with core because it doesn't allocate memory, unlike our
77
//! stable sorting implementation.
88
99
use crate::cmp;

library/panic_unwind/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ cfg_if::cfg_if! {
8282
}
8383

8484
extern "C" {
85-
/// Handler in libstd called when a panic object is dropped outside of
85+
/// Handler in std called when a panic object is dropped outside of
8686
/// `catch_unwind`.
8787
fn __rust_drop_panic() -> !;
8888

89-
/// Handler in libstd called when a foreign exception is caught.
89+
/// Handler in std called when a foreign exception is caught.
9090
fn __rust_foreign_exception() -> !;
9191
}
9292

library/proc_macro/src/bridge/fxhash.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ use std::ops::BitXor;
1515
/// Type alias for a hashmap using the `fx` hash algorithm.
1616
pub type FxHashMap<K, V> = HashMap<K, V, BuildHasherDefault<FxHasher>>;
1717

18-
/// A speedy hash algorithm for use within rustc. The hashmap in liballoc
19-
/// by default uses SipHash which isn't quite as speedy as we want. In the
20-
/// compiler we're not really worried about DOS attempts, so we use a fast
18+
/// A speedy hash algorithm for use within rustc. The hashmap in alloc by
19+
/// default uses SipHash which isn't quite as speedy as we want. In the compiler
20+
/// we're not really worried about DOS attempts, so we use a fast
2121
/// non-cryptographic hash.
2222
///
2323
/// This is the same as the algorithm used by Firefox -- which is a homespun

library/std/src/backtrace.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
//!
2424
//! ## Platform support
2525
//!
26-
//! Not all platforms that libstd compiles for support capturing backtraces.
27-
//! Some platforms simply do nothing when capturing a backtrace. To check
28-
//! whether the platform supports capturing backtraces you can consult the
29-
//! `BacktraceStatus` enum as a result of `Backtrace::status`.
26+
//! Not all platforms that std compiles for support capturing backtraces. Some
27+
//! platforms simply do nothing when capturing a backtrace. To check whether the
28+
//! platform supports capturing backtraces you can consult the `BacktraceStatus`
29+
//! enum as a result of `Backtrace::status`.
3030
//!
3131
//! Like above with accuracy platform support is done on a best effort basis.
3232
//! Sometimes libraries might not be available at runtime or something may go

library/std/src/panicking.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ pub fn panicking() -> bool {
517517
!panic_count::count_is_zero()
518518
}
519519

520-
/// Entry point of panics from the libcore crate (`panic_impl` lang item).
520+
/// Entry point of panics from the core crate (`panic_impl` lang item).
521521
#[cfg(not(test))]
522522
#[panic_handler]
523523
pub fn begin_panic_handler(info: &PanicInfo<'_>) -> ! {

library/std/src/sys/unix/android.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Android ABI-compatibility module
22
//!
3-
//! The ABI of Android has changed quite a bit over time, and libstd attempts to
4-
//! be both forwards and backwards compatible as much as possible. We want to
3+
//! The ABI of Android has changed quite a bit over time, and std attempts to be
4+
//! both forwards and backwards compatible as much as possible. We want to
55
//! always work with the most recent version of Android, but we also want to
66
//! work with older versions of Android for whenever projects need to.
77
//!

library/std/src/sys/unix/weak.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
//! Support for "weak linkage" to symbols on Unix
22
//!
3-
//! Some I/O operations we do in libstd require newer versions of OSes but we
4-
//! need to maintain binary compatibility with older releases for now. In order
5-
//! to use the new functionality when available we use this module for
6-
//! detection.
3+
//! Some I/O operations we do in std require newer versions of OSes but we need
4+
//! to maintain binary compatibility with older releases for now. In order to
5+
//! use the new functionality when available we use this module for detection.
76
//!
87
//! One option to use here is weak linkage, but that is unfortunately only
98
//! really workable with ELF. Otherwise, use dlsym to get the symbol value at

library/std/src/sys_common/backtrace.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ unsafe fn _print_fmt(fmt: &mut fmt::Formatter<'_>, print_fmt: PrintFmt) -> fmt::
111111
}
112112

113113
/// Fixed frame used to clean the backtrace with `RUST_BACKTRACE=1`. Note that
114-
/// this is only inline(never) when backtraces in libstd are enabled, otherwise
114+
/// this is only inline(never) when backtraces in std are enabled, otherwise
115115
/// it's fine to optimize away.
116116
#[cfg_attr(feature = "backtrace", inline(never))]
117117
pub fn __rust_begin_short_backtrace<F, T>(f: F) -> T
@@ -127,7 +127,7 @@ where
127127
}
128128

129129
/// Fixed frame used to clean the backtrace with `RUST_BACKTRACE=1`. Note that
130-
/// this is only inline(never) when backtraces in libstd are enabled, otherwise
130+
/// this is only inline(never) when backtraces in std are enabled, otherwise
131131
/// it's fine to optimize away.
132132
#[cfg_attr(feature = "backtrace", inline(never))]
133133
pub fn __rust_end_short_backtrace<F, T>(f: F) -> T

library/std/tests/run-time-detect.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! These tests just check that the macros are available in libstd.
1+
//! These tests just check that the macros are available in std.
22
33
#![cfg_attr(
44
any(

0 commit comments

Comments
 (0)