Skip to content

Commit bf662eb

Browse files
committed
Auto merge of #129632 - matthiaskrgr:rollup-8055gq6, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - #126013 (Add `#[warn(unreachable_pub)]` to a bunch of compiler crates) - #128157 (deduplicate and clarify rules for converting pointers to references) - #129032 (Document & implement the transmutation modeled by `BikeshedIntrinsicFrom`) - #129250 (Do not ICE on non-ADT rcvr type when looking for crate version collision) - #129340 (Remove Duplicate E0381 Label) - #129560 ([rustdoc] Generate source link on impl associated types) - #129622 (Remove a couple of unused feature enables) - #129625 (Rename `ParenthesizedGenericArgs` to `GenericArgsMode`) - #129626 (Remove `ParamMode::ExplicitNamed`) Failed merges: - #128166 (Improved `checked_isqrt` and `isqrt` methods) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 515395a + b3b6baf commit bf662eb

File tree

112 files changed

+1065
-780
lines changed

Some content is hidden

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

112 files changed

+1065
-780
lines changed

compiler/rustc_abi/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#![cfg_attr(feature = "nightly", doc(rust_logo))]
44
#![cfg_attr(feature = "nightly", feature(rustdoc_internals))]
55
#![cfg_attr(feature = "nightly", feature(step_trait))]
6+
#![warn(unreachable_pub)]
67
// tidy-alphabetical-end
78

89
use std::fmt;

compiler/rustc_arena/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#![feature(rustc_attrs)]
2626
#![feature(rustdoc_internals)]
2727
#![feature(strict_provenance)]
28+
#![warn(unreachable_pub)]
2829
// tidy-alphabetical-end
2930

3031
use std::alloc::Layout;

compiler/rustc_arena/src/tests.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl<T> TypedArena<T> {
3232
}
3333

3434
#[test]
35-
pub fn test_unused() {
35+
fn test_unused() {
3636
let arena: TypedArena<Point> = TypedArena::default();
3737
assert!(arena.chunks.borrow().is_empty());
3838
}
@@ -75,7 +75,7 @@ fn test_arena_alloc_nested() {
7575
}
7676

7777
#[test]
78-
pub fn test_copy() {
78+
fn test_copy() {
7979
let arena = TypedArena::default();
8080
#[cfg(not(miri))]
8181
const N: usize = 100000;
@@ -87,13 +87,13 @@ pub fn test_copy() {
8787
}
8888

8989
#[bench]
90-
pub fn bench_copy(b: &mut Bencher) {
90+
fn bench_copy(b: &mut Bencher) {
9191
let arena = TypedArena::default();
9292
b.iter(|| arena.alloc(Point { x: 1, y: 2, z: 3 }))
9393
}
9494

9595
#[bench]
96-
pub fn bench_copy_nonarena(b: &mut Bencher) {
96+
fn bench_copy_nonarena(b: &mut Bencher) {
9797
b.iter(|| {
9898
let _: Box<_> = Box::new(Point { x: 1, y: 2, z: 3 });
9999
})
@@ -106,7 +106,7 @@ struct Noncopy {
106106
}
107107

108108
#[test]
109-
pub fn test_noncopy() {
109+
fn test_noncopy() {
110110
let arena = TypedArena::default();
111111
#[cfg(not(miri))]
112112
const N: usize = 100000;
@@ -118,7 +118,7 @@ pub fn test_noncopy() {
118118
}
119119

120120
#[test]
121-
pub fn test_typed_arena_zero_sized() {
121+
fn test_typed_arena_zero_sized() {
122122
let arena = TypedArena::default();
123123
#[cfg(not(miri))]
124124
const N: usize = 100000;
@@ -130,7 +130,7 @@ pub fn test_typed_arena_zero_sized() {
130130
}
131131

132132
#[test]
133-
pub fn test_typed_arena_clear() {
133+
fn test_typed_arena_clear() {
134134
let mut arena = TypedArena::default();
135135
for _ in 0..10 {
136136
arena.clear();
@@ -145,7 +145,7 @@ pub fn test_typed_arena_clear() {
145145
}
146146

147147
#[bench]
148-
pub fn bench_typed_arena_clear(b: &mut Bencher) {
148+
fn bench_typed_arena_clear(b: &mut Bencher) {
149149
let mut arena = TypedArena::default();
150150
b.iter(|| {
151151
arena.alloc(Point { x: 1, y: 2, z: 3 });
@@ -154,7 +154,7 @@ pub fn bench_typed_arena_clear(b: &mut Bencher) {
154154
}
155155

156156
#[bench]
157-
pub fn bench_typed_arena_clear_100(b: &mut Bencher) {
157+
fn bench_typed_arena_clear_100(b: &mut Bencher) {
158158
let mut arena = TypedArena::default();
159159
b.iter(|| {
160160
for _ in 0..100 {
@@ -230,15 +230,15 @@ fn test_typed_arena_drop_small_count() {
230230
}
231231

232232
#[bench]
233-
pub fn bench_noncopy(b: &mut Bencher) {
233+
fn bench_noncopy(b: &mut Bencher) {
234234
let arena = TypedArena::default();
235235
b.iter(|| {
236236
arena.alloc(Noncopy { string: "hello world".to_string(), array: vec![1, 2, 3, 4, 5] })
237237
})
238238
}
239239

240240
#[bench]
241-
pub fn bench_noncopy_nonarena(b: &mut Bencher) {
241+
fn bench_noncopy_nonarena(b: &mut Bencher) {
242242
b.iter(|| {
243243
let _: Box<_> =
244244
Box::new(Noncopy { string: "hello world".to_string(), array: vec![1, 2, 3, 4, 5] });

compiler/rustc_ast/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#![feature(never_type)]
2020
#![feature(rustdoc_internals)]
2121
#![feature(stmt_expr_attributes)]
22+
#![warn(unreachable_pub)]
2223
// tidy-alphabetical-end
2324

2425
pub mod util {

compiler/rustc_ast_ir/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#![cfg_attr(feature = "nightly", allow(internal_features))]
33
#![cfg_attr(feature = "nightly", feature(never_type))]
44
#![cfg_attr(feature = "nightly", feature(rustc_attrs))]
5+
#![warn(unreachable_pub)]
56
// tidy-alphabetical-end
67

78
#[cfg(feature = "nightly")]

compiler/rustc_ast_lowering/src/delegation.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ use rustc_span::Span;
5151
use rustc_target::spec::abi;
5252
use {rustc_ast as ast, rustc_hir as hir};
5353

54-
use super::{ImplTraitContext, LoweringContext, ParamMode, ParenthesizedGenericArgs};
54+
use super::{GenericArgsMode, ImplTraitContext, LoweringContext, ParamMode};
5555
use crate::{ImplTraitPosition, ResolverAstLoweringExt};
5656

5757
pub(crate) struct DelegationResults<'hir> {
@@ -323,7 +323,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
323323
delegation.path.span,
324324
ast_segment,
325325
ParamMode::Optional,
326-
ParenthesizedGenericArgs::Err,
326+
GenericArgsMode::Err,
327327
ImplTraitContext::Disallowed(ImplTraitPosition::Path),
328328
None,
329329
);

0 commit comments

Comments
 (0)