Skip to content

Commit d958260

Browse files
committed
Auto merge of rust-lang#129595 - matthiaskrgr:rollup-4udn7nn, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - rust-lang#129288 (Use subtyping for `UnsafeFnPointer` coercion, too) - rust-lang#129405 (Fixing span manipulation and indentation of the suggestion introduced by rust-lang#126187) - rust-lang#129518 (gitignore: ignore ICE reports regardless of directory) - rust-lang#129519 (Remove redundant flags from `lower_ty_common` that can be inferred from the HIR) - rust-lang#129525 (rustdoc: clean up tuple <-> primitive conversion docs) - rust-lang#129526 (Use `FxHasher` on new solver unconditionally) - rust-lang#129544 (Removes dead code from the compiler) - rust-lang#129553 (add back test for stable-const-can-only-call-stable-const) - rust-lang#129590 (Avoid taking reference of &TyKind) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 4d22c1c + cd554e2 commit d958260

File tree

2 files changed

+22
-15
lines changed

2 files changed

+22
-15
lines changed

Diff for: alloc/tests/boxed.rs

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ fn box_deref_lval() {
5959
assert_eq!(x.get(), 1000);
6060
}
6161

62+
#[allow(unused)]
6263
pub struct ConstAllocator;
6364

6465
unsafe impl Allocator for ConstAllocator {

Diff for: core/src/tuple.rs

+21-15
Original file line numberDiff line numberDiff line change
@@ -122,23 +122,29 @@ macro_rules! tuple_impls {
122122
}
123123
}
124124

125-
#[stable(feature = "array_tuple_conv", since = "1.71.0")]
126-
impl<T> From<[T; ${count($T)}]> for ($(${ignore($T)} T,)+) {
127-
#[inline]
128-
#[allow(non_snake_case)]
129-
fn from(array: [T; ${count($T)}]) -> Self {
130-
let [$($T,)+] = array;
131-
($($T,)+)
125+
maybe_tuple_doc! {
126+
$($T)+ @
127+
#[stable(feature = "array_tuple_conv", since = "1.71.0")]
128+
impl<T> From<[T; ${count($T)}]> for ($(${ignore($T)} T,)+) {
129+
#[inline]
130+
#[allow(non_snake_case)]
131+
fn from(array: [T; ${count($T)}]) -> Self {
132+
let [$($T,)+] = array;
133+
($($T,)+)
134+
}
132135
}
133136
}
134137

135-
#[stable(feature = "array_tuple_conv", since = "1.71.0")]
136-
impl<T> From<($(${ignore($T)} T,)+)> for [T; ${count($T)}] {
137-
#[inline]
138-
#[allow(non_snake_case)]
139-
fn from(tuple: ($(${ignore($T)} T,)+)) -> Self {
140-
let ($($T,)+) = tuple;
141-
[$($T,)+]
138+
maybe_tuple_doc! {
139+
$($T)+ @
140+
#[stable(feature = "array_tuple_conv", since = "1.71.0")]
141+
impl<T> From<($(${ignore($T)} T,)+)> for [T; ${count($T)}] {
142+
#[inline]
143+
#[allow(non_snake_case)]
144+
fn from(tuple: ($(${ignore($T)} T,)+)) -> Self {
145+
let ($($T,)+) = tuple;
146+
[$($T,)+]
147+
}
142148
}
143149
}
144150
}
@@ -148,7 +154,7 @@ macro_rules! tuple_impls {
148154
// Otherwise, it hides the docs entirely.
149155
macro_rules! maybe_tuple_doc {
150156
($a:ident @ #[$meta:meta] $item:item) => {
151-
#[doc(fake_variadic)]
157+
#[cfg_attr(not(bootstrap), doc(fake_variadic))]
152158
#[doc = "This trait is implemented for tuples up to twelve items long."]
153159
#[$meta]
154160
$item

0 commit comments

Comments
 (0)