core and alloc doctests support doctest merging

This commit is contained in:
Jynn Nelson
2026-02-24 20:44:38 -05:00
parent acba81e689
commit 505d07da28
5 changed files with 5 additions and 5 deletions

View File

@@ -63,7 +63,7 @@
#![doc(
html_playground_url = "https://play.rust-lang.org/",
issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/",
test(no_crate_inject, attr(allow(unused_variables), deny(warnings)))
test(no_crate_inject, attr(allow(unused_variables, duplicate_features), deny(warnings)))
)]
#![doc(auto_cfg(hide(no_global_oom_handling, no_rc, no_sync, target_has_atomic = "ptr")))]
#![doc(rust_logo)]

View File

@@ -19,7 +19,7 @@ use crate::{cmp, ptr};
///
/// # Example
///
/// ```
/// ```standalone_crate
/// use std::alloc::{GlobalAlloc, Layout};
/// use std::cell::UnsafeCell;
/// use std::ptr::null_mut;

View File

@@ -514,7 +514,7 @@ pub const fn black_box<T>(dummy: T) -> T {
/// macro_rules! make_error {
/// ($($args:expr),*) => {
/// core::hint::must_use({
/// let error = $crate::make_error(core::format_args!($($args),*));
/// let error = make_error(core::format_args!($($args),*));
/// error
/// })
/// };

View File

@@ -48,7 +48,7 @@
html_playground_url = "https://play.rust-lang.org/",
issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/",
test(no_crate_inject, attr(deny(warnings))),
test(attr(allow(dead_code, deprecated, unused_variables, unused_mut)))
test(attr(allow(dead_code, deprecated, unused_variables, unused_mut, duplicate_features)))
)]
#![doc(rust_logo)]
#![doc(auto_cfg(hide(

View File

@@ -584,7 +584,7 @@ impl<T> const From<legacy::RangeFrom<T>> for RangeFrom<T> {
///
/// The `..=last` syntax is a `RangeToInclusive`:
///
/// ```
/// ```standalone_crate
/// #![feature(new_range)]
/// assert_eq!((..=5), std::range::RangeToInclusive { last: 5 });
/// ```