Skip to content

Commit e674422

Browse files
committedAug 22, 2020
Auto merge of rust-lang#75797 - Dylan-DPC:rollup-lfeytr7, r=Dylan-DPC
Rollup of 12 pull requests Successful merges: - rust-lang#75705 (Move to intra-doc links for /library/core/src/intrinsics.rs) - rust-lang#75711 (Split `astconv.rs` into its own submodule) - rust-lang#75718 (Don't count variants/fields/consts/associated types in doc-coverage doc examples) - rust-lang#75725 (Use intra-doc-links in `alloc`) - rust-lang#75745 (Remove duplication in `fold_item`) - rust-lang#75753 (Another motivation for CFG: return-oriented programming) - rust-lang#75769 (Minor, remove double nesting of a test module) - rust-lang#75771 (Extend normalization in const-eval-query-stack test) - rust-lang#75781 (More inline asm register name fixups for LLVM) - rust-lang#75782 (Convert core/src/str/pattern.rs to Intra-doc links) - rust-lang#75787 (Use intra-doc-links in `core::ops::*`) - rust-lang#75788 (MIR call terminator represents diverging calls too) Failed merges: - rust-lang#75773 (Introduce expect snapshot testing library into rustc) r? @ghost
2 parents de521cb + 2ab6fef commit e674422

Some content is hidden

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

46 files changed

+1857
-2112
lines changed
 

‎library/alloc/src/alloc.rs

-18
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ extern "Rust" {
3636
///
3737
/// Note: while this type is unstable, the functionality it provides can be
3838
/// accessed through the [free functions in `alloc`](index.html#functions).
39-
///
40-
/// [`AllocRef`]: trait.AllocRef.html
4139
#[unstable(feature = "allocator_api", issue = "32838")]
4240
#[derive(Copy, Clone, Default, Debug)]
4341
pub struct Global;
@@ -55,10 +53,6 @@ pub struct Global;
5553
///
5654
/// See [`GlobalAlloc::alloc`].
5755
///
58-
/// [`Global`]: struct.Global.html
59-
/// [`AllocRef`]: trait.AllocRef.html
60-
/// [`GlobalAlloc::alloc`]: trait.GlobalAlloc.html#tymethod.alloc
61-
///
6256
/// # Examples
6357
///
6458
/// ```
@@ -92,10 +86,6 @@ pub unsafe fn alloc(layout: Layout) -> *mut u8 {
9286
/// # Safety
9387
///
9488
/// See [`GlobalAlloc::dealloc`].
95-
///
96-
/// [`Global`]: struct.Global.html
97-
/// [`AllocRef`]: trait.AllocRef.html
98-
/// [`GlobalAlloc::dealloc`]: trait.GlobalAlloc.html#tymethod.dealloc
9989
#[stable(feature = "global_alloc", since = "1.28.0")]
10090
#[inline]
10191
pub unsafe fn dealloc(ptr: *mut u8, layout: Layout) {
@@ -114,10 +104,6 @@ pub unsafe fn dealloc(ptr: *mut u8, layout: Layout) {
114104
/// # Safety
115105
///
116106
/// See [`GlobalAlloc::realloc`].
117-
///
118-
/// [`Global`]: struct.Global.html
119-
/// [`AllocRef`]: trait.AllocRef.html
120-
/// [`GlobalAlloc::realloc`]: trait.GlobalAlloc.html#method.realloc
121107
#[stable(feature = "global_alloc", since = "1.28.0")]
122108
#[inline]
123109
pub unsafe fn realloc(ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8 {
@@ -137,10 +123,6 @@ pub unsafe fn realloc(ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8
137123
///
138124
/// See [`GlobalAlloc::alloc_zeroed`].
139125
///
140-
/// [`Global`]: struct.Global.html
141-
/// [`AllocRef`]: trait.AllocRef.html
142-
/// [`GlobalAlloc::alloc_zeroed`]: trait.GlobalAlloc.html#method.alloc_zeroed
143-
///
144126
/// # Examples
145127
///
146128
/// ```

‎library/alloc/src/boxed.rs

+10-16
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,13 @@
118118
//! described in [rust-lang/unsafe-code-guidelines#198][ucg#198].
119119
//!
120120
//! [ucg#198]: https://github.com/rust-lang/unsafe-code-guidelines/issues/198
121-
//! [dereferencing]: ../../std/ops/trait.Deref.html
122-
//! [`Box`]: struct.Box.html
123-
//! [`Box<T>`]: struct.Box.html
124-
//! [`Box::<T>::from_raw(value)`]: struct.Box.html#method.from_raw
125-
//! [`Box::<T>::into_raw`]: struct.Box.html#method.into_raw
126-
//! [`Global`]: ../alloc/struct.Global.html
127-
//! [`Layout`]: ../alloc/struct.Layout.html
128-
//! [`Layout::for_value(&*value)`]: ../alloc/struct.Layout.html#method.for_value
121+
//! [dereferencing]: core::ops::Deref
122+
//! [`Box<T>`]: Box
123+
//! [`Box::<T>::from_raw(value)`]: Box::from_raw
124+
//! [`Box::<T>::into_raw`]: Box::into_raw
125+
//! [`Global`]: crate::alloc::Global
126+
//! [`Layout`]: crate::alloc::Layout
127+
//! [`Layout::for_value(&*value)`]: crate::alloc::Layout::for_value
129128
130129
#![stable(feature = "rust1", since = "1.0.0")]
131130

@@ -240,7 +239,6 @@ impl<T> Box<T> {
240239
/// Converts a `Box<T>` into a `Box<[T]>`
241240
///
242241
/// This conversion does not allocate on the heap and happens in place.
243-
///
244242
#[unstable(feature = "box_into_boxed_slice", issue = "71582")]
245243
pub fn into_boxed_slice(boxed: Box<T>) -> Box<[T]> {
246244
// *mut T and *mut [T; 1] have the same size and alignment
@@ -386,9 +384,8 @@ impl<T: ?Sized> Box<T> {
386384
/// }
387385
/// ```
388386
///
389-
/// [memory layout]: index.html#memory-layout
390-
/// [`Layout`]: ../alloc/struct.Layout.html
391-
/// [`Box::into_raw`]: struct.Box.html#method.into_raw
387+
/// [memory layout]: self#memory-layout
388+
/// [`Layout`]: crate::Layout
392389
#[stable(feature = "box_raw", since = "1.4.0")]
393390
#[inline]
394391
pub unsafe fn from_raw(raw: *mut T) -> Self {
@@ -433,8 +430,7 @@ impl<T: ?Sized> Box<T> {
433430
/// }
434431
/// ```
435432
///
436-
/// [memory layout]: index.html#memory-layout
437-
/// [`Box::from_raw`]: struct.Box.html#method.from_raw
433+
/// [memory layout]: self#memory-layout
438434
#[stable(feature = "box_raw", since = "1.4.0")]
439435
#[inline]
440436
pub fn into_raw(b: Box<T>) -> *mut T {
@@ -478,8 +474,6 @@ impl<T: ?Sized> Box<T> {
478474
/// to call it as `Box::leak(b)` instead of `b.leak()`. This
479475
/// is so that there is no conflict with a method on the inner type.
480476
///
481-
/// [`Box::from_raw`]: struct.Box.html#method.from_raw
482-
///
483477
/// # Examples
484478
///
485479
/// Simple usage:

0 commit comments

Comments
 (0)
Please sign in to comment.