Skip to content

Commit 3cca196

Browse files
committed
Auto merge of rust-lang#138397 - matthiaskrgr:rollup-tbyy9px, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - rust-lang#137314 (change definitely unproductive cycles to error) - rust-lang#137701 (Convert `ShardedHashMap` to use `hashbrown::HashTable`) - rust-lang#138269 (uefi: fs: Implement FileType, FilePermissions and FileAttr) - rust-lang#138331 (Use `RUSTC_LINT_FLAGS` more) - rust-lang#138345 (Some autodiff cleanups) - rust-lang#138387 (intrinsics: remove unnecessary leading underscore from argument names) - rust-lang#138389 (use `expect` instead of `allow`) - rust-lang#138390 (fix incorrect tracing log) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 0998d40 + 41a41cc commit 3cca196

File tree

146 files changed

+847
-828
lines changed

Some content is hidden

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

146 files changed

+847
-828
lines changed

Cargo.lock

+2
Original file line numberDiff line numberDiff line change
@@ -1491,6 +1491,7 @@ version = "0.15.2"
14911491
source = "registry+https://github.com/rust-lang/crates.io-index"
14921492
checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
14931493
dependencies = [
1494+
"allocator-api2",
14941495
"foldhash",
14951496
"serde",
14961497
]
@@ -3492,6 +3493,7 @@ dependencies = [
34923493
"either",
34933494
"elsa",
34943495
"ena",
3496+
"hashbrown 0.15.2",
34953497
"indexmap",
34963498
"jobserver",
34973499
"libc",

compiler/rustc_abi/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#![cfg_attr(feature = "nightly", feature(rustc_attrs))]
66
#![cfg_attr(feature = "nightly", feature(rustdoc_internals))]
77
#![cfg_attr(feature = "nightly", feature(step_trait))]
8-
#![warn(unreachable_pub)]
98
// tidy-alphabetical-end
109

1110
/*! ABI handling for rustc

compiler/rustc_arena/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#![feature(maybe_uninit_slice)]
2424
#![feature(rustc_attrs)]
2525
#![feature(rustdoc_internals)]
26-
#![warn(unreachable_pub)]
2726
// tidy-alphabetical-end
2827

2928
use std::alloc::Layout;

compiler/rustc_ast/src/lib.rs

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

2524
pub mod util {

compiler/rustc_ast_ir/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#![cfg_attr(feature = "nightly", allow(internal_features))]
1010
#![cfg_attr(feature = "nightly", feature(never_type))]
1111
#![cfg_attr(feature = "nightly", feature(rustc_attrs))]
12-
#![warn(unreachable_pub)]
1312
// tidy-alphabetical-end
1413

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

compiler/rustc_ast_lowering/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
#![feature(if_let_guard)]
4040
#![feature(let_chains)]
4141
#![feature(rustdoc_internals)]
42-
#![warn(unreachable_pub)]
4342
// tidy-alphabetical-end
4443

4544
use std::sync::Arc;

compiler/rustc_ast_passes/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#![feature(iter_is_partitioned)]
1111
#![feature(let_chains)]
1212
#![feature(rustdoc_internals)]
13-
#![warn(unreachable_pub)]
1413
// tidy-alphabetical-end
1514

1615
pub mod ast_validation;

compiler/rustc_ast_pretty/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#![doc(rust_logo)]
44
#![feature(box_patterns)]
55
#![feature(rustdoc_internals)]
6-
#![warn(unreachable_pub)]
76
// tidy-alphabetical-end
87

98
mod helpers;

compiler/rustc_attr_data_structures/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#![doc(rust_logo)]
44
#![feature(let_chains)]
55
#![feature(rustdoc_internals)]
6-
#![warn(unreachable_pub)]
76
// tidy-alphabetical-end
87

98
mod attributes;

compiler/rustc_attr_parsing/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@
8080
#![doc(rust_logo)]
8181
#![feature(let_chains)]
8282
#![feature(rustdoc_internals)]
83-
#![warn(unreachable_pub)]
8483
// tidy-alphabetical-end
8584

8685
#[macro_use]

compiler/rustc_baked_icu_data/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
// tidy-alphabetical-start
2424
#![allow(elided_lifetimes_in_paths)]
2525
#![allow(internal_features)]
26+
#![allow(unreachable_pub)] // because this crate is mostly generated code
2627
#![doc(rust_logo)]
2728
#![feature(rustdoc_internals)]
2829
// #![warn(unreachable_pub)] // don't use because this crate is mostly generated code

compiler/rustc_borrowck/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#![feature(rustdoc_internals)]
1414
#![feature(stmt_expr_attributes)]
1515
#![feature(try_blocks)]
16-
#![warn(unreachable_pub)]
1716
// tidy-alphabetical-end
1817

1918
use std::borrow::Cow;

compiler/rustc_builtin_macros/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#![feature(rustdoc_internals)]
1919
#![feature(string_from_utf8_lossy_owned)]
2020
#![feature(try_blocks)]
21-
#![warn(unreachable_pub)]
2221
// tidy-alphabetical-end
2322

2423
extern crate proc_macro;

compiler/rustc_codegen_cranelift/example/mini_core.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -624,25 +624,25 @@ pub mod intrinsics {
624624
#[rustc_intrinsic]
625625
pub fn size_of<T>() -> usize;
626626
#[rustc_intrinsic]
627-
pub unsafe fn size_of_val<T: ?::Sized>(_val: *const T) -> usize;
627+
pub unsafe fn size_of_val<T: ?::Sized>(val: *const T) -> usize;
628628
#[rustc_intrinsic]
629629
pub fn min_align_of<T>() -> usize;
630630
#[rustc_intrinsic]
631-
pub unsafe fn min_align_of_val<T: ?::Sized>(_val: *const T) -> usize;
631+
pub unsafe fn min_align_of_val<T: ?::Sized>(val: *const T) -> usize;
632632
#[rustc_intrinsic]
633-
pub unsafe fn copy<T>(_src: *const T, _dst: *mut T, _count: usize);
633+
pub unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize);
634634
#[rustc_intrinsic]
635-
pub unsafe fn transmute<T, U>(_e: T) -> U;
635+
pub unsafe fn transmute<T, U>(e: T) -> U;
636636
#[rustc_intrinsic]
637-
pub unsafe fn ctlz_nonzero<T>(_x: T) -> u32;
637+
pub unsafe fn ctlz_nonzero<T>(x: T) -> u32;
638638
#[rustc_intrinsic]
639639
pub fn needs_drop<T: ?::Sized>() -> bool;
640640
#[rustc_intrinsic]
641-
pub fn bitreverse<T>(_x: T) -> T;
641+
pub fn bitreverse<T>(x: T) -> T;
642642
#[rustc_intrinsic]
643-
pub fn bswap<T>(_x: T) -> T;
643+
pub fn bswap<T>(x: T) -> T;
644644
#[rustc_intrinsic]
645-
pub unsafe fn write_bytes<T>(_dst: *mut T, _val: u8, _count: usize);
645+
pub unsafe fn write_bytes<T>(dst: *mut T, val: u8, count: usize);
646646
#[rustc_intrinsic]
647647
pub unsafe fn unreachable() -> !;
648648
}

compiler/rustc_codegen_gcc/example/mini_core.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -595,25 +595,25 @@ pub mod intrinsics {
595595
#[rustc_intrinsic]
596596
pub fn size_of<T>() -> usize;
597597
#[rustc_intrinsic]
598-
pub unsafe fn size_of_val<T: ?::Sized>(_val: *const T) -> usize;
598+
pub unsafe fn size_of_val<T: ?::Sized>(val: *const T) -> usize;
599599
#[rustc_intrinsic]
600600
pub fn min_align_of<T>() -> usize;
601601
#[rustc_intrinsic]
602-
pub unsafe fn min_align_of_val<T: ?::Sized>(_val: *const T) -> usize;
602+
pub unsafe fn min_align_of_val<T: ?::Sized>(val: *const T) -> usize;
603603
#[rustc_intrinsic]
604-
pub unsafe fn copy<T>(_src: *const T, _dst: *mut T, _count: usize);
604+
pub unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize);
605605
#[rustc_intrinsic]
606-
pub unsafe fn transmute<T, U>(_e: T) -> U;
606+
pub unsafe fn transmute<T, U>(e: T) -> U;
607607
#[rustc_intrinsic]
608-
pub unsafe fn ctlz_nonzero<T>(_x: T) -> u32;
608+
pub unsafe fn ctlz_nonzero<T>(x: T) -> u32;
609609
#[rustc_intrinsic]
610610
pub fn needs_drop<T: ?::Sized>() -> bool;
611611
#[rustc_intrinsic]
612-
pub fn bitreverse<T>(_x: T) -> T;
612+
pub fn bitreverse<T>(x: T) -> T;
613613
#[rustc_intrinsic]
614-
pub fn bswap<T>(_x: T) -> T;
614+
pub fn bswap<T>(x: T) -> T;
615615
#[rustc_intrinsic]
616-
pub unsafe fn write_bytes<T>(_dst: *mut T, _val: u8, _count: usize);
616+
pub unsafe fn write_bytes<T>(dst: *mut T, val: u8, count: usize);
617617
#[rustc_intrinsic]
618618
pub unsafe fn unreachable() -> !;
619619
}

compiler/rustc_codegen_llvm/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#![feature(rustdoc_internals)]
2020
#![feature(slice_as_array)]
2121
#![feature(try_blocks)]
22-
#![warn(unreachable_pub)]
2322
// tidy-alphabetical-end
2423

2524
use std::any::Any;

compiler/rustc_codegen_ssa/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#![feature(rustdoc_internals)]
1515
#![feature(trait_alias)]
1616
#![feature(try_blocks)]
17-
#![warn(unreachable_pub)]
1817
// tidy-alphabetical-end
1918

2019
//! This crate contains codegen code that is used by all codegen backends (LLVM and others).

compiler/rustc_const_eval/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#![feature(unqualified_local_imports)]
1717
#![feature(yeet_expr)]
1818
#![warn(unqualified_local_imports)]
19-
#![warn(unreachable_pub)]
2019
// tidy-alphabetical-end
2120

2221
pub mod check_consts;

compiler/rustc_data_structures/Cargo.toml

+5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ thin-vec = "0.2.12"
2929
tracing = "0.1"
3030
# tidy-alphabetical-end
3131

32+
[dependencies.hashbrown]
33+
version = "0.15.2"
34+
default-features = false
35+
features = ["nightly"] # for may_dangle
36+
3237
[dependencies.parking_lot]
3338
version = "0.12"
3439

compiler/rustc_data_structures/src/graph/tests.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ use std::cmp::max;
33
use super::*;
44
use crate::fx::FxHashMap;
55

6-
pub struct TestGraph {
6+
pub(super) struct TestGraph {
77
num_nodes: usize,
88
start_node: usize,
99
successors: FxHashMap<usize, Vec<usize>>,
1010
predecessors: FxHashMap<usize, Vec<usize>>,
1111
}
1212

1313
impl TestGraph {
14-
pub fn new(start_node: usize, edges: &[(usize, usize)]) -> Self {
14+
pub(super) fn new(start_node: usize, edges: &[(usize, usize)]) -> Self {
1515
let mut graph = TestGraph {
1616
num_nodes: start_node + 1,
1717
start_node,

compiler/rustc_data_structures/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#![feature(dropck_eyepatch)]
2525
#![feature(extend_one)]
2626
#![feature(file_buffered)]
27-
#![feature(hash_raw_entry)]
2827
#![feature(macro_metavar_expr)]
2928
#![feature(map_try_insert)]
3029
#![feature(min_specialization)]

compiler/rustc_data_structures/src/marker.rs

+2
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ impl_dyn_send!(
7676
[crate::sync::RwLock<T> where T: DynSend]
7777
[crate::tagged_ptr::TaggedRef<'a, P, T> where 'a, P: Sync, T: Send + crate::tagged_ptr::Tag]
7878
[rustc_arena::TypedArena<T> where T: DynSend]
79+
[hashbrown::HashTable<T> where T: DynSend]
7980
[indexmap::IndexSet<V, S> where V: DynSend, S: DynSend]
8081
[indexmap::IndexMap<K, V, S> where K: DynSend, V: DynSend, S: DynSend]
8182
[thin_vec::ThinVec<T> where T: DynSend]
@@ -153,6 +154,7 @@ impl_dyn_sync!(
153154
[crate::tagged_ptr::TaggedRef<'a, P, T> where 'a, P: Sync, T: Sync + crate::tagged_ptr::Tag]
154155
[parking_lot::lock_api::Mutex<R, T> where R: DynSync, T: ?Sized + DynSend]
155156
[parking_lot::lock_api::RwLock<R, T> where R: DynSync, T: ?Sized + DynSend + DynSync]
157+
[hashbrown::HashTable<T> where T: DynSync]
156158
[indexmap::IndexSet<V, S> where V: DynSync, S: DynSync]
157159
[indexmap::IndexMap<K, V, S> where K: DynSync, V: DynSync, S: DynSync]
158160
[smallvec::SmallVec<A> where A: smallvec::Array + DynSync]

compiler/rustc_data_structures/src/obligation_forest/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ pub struct Error<O, E> {
313313

314314
mod helper {
315315
use super::*;
316-
pub type ObligationTreeIdGenerator = impl Iterator<Item = ObligationTreeId>;
316+
pub(super) type ObligationTreeIdGenerator = impl Iterator<Item = ObligationTreeId>;
317317
impl<O: ForestObligation> ObligationForest<O> {
318318
#[cfg_attr(not(bootstrap), define_opaque(ObligationTreeIdGenerator))]
319319
pub fn new() -> ObligationForest<O> {

0 commit comments

Comments
 (0)