Skip to content

Commit bbe9a9c

Browse files
committed
Auto merge of #126319 - workingjubilee:rollup-lendnud, r=workingjubilee
Rollup of 16 pull requests Successful merges: - #123374 (DOC: Add FFI example for slice::from_raw_parts()) - #124514 (Recommend to never display zero disambiguators when demangling v0 symbols) - #125978 (Cleanup: HIR ty lowering: Consolidate the places that do assoc item probing & access checking) - #125980 (Nvptx remove direct passmode) - #126187 (For E0277 suggest adding `Result` return type for function when using QuestionMark `?` in the body.) - #126210 (docs(core): make more const_ptr doctests assert instead of printing) - #126249 (Simplify `[T; N]::try_map` signature) - #126256 (Add {{target}} substitution to compiletest) - #126263 (Make issue-122805.rs big endian compatible) - #126281 (set_env: State the conclusion upfront) - #126286 (Make `storage-live.rs` robust against rustc internal changes.) - #126287 (Update a cranelift patch file for formatting changes.) - #126301 (Use `tidy` to sort crate attributes for all compiler crates.) - #126305 (Make PathBuf less Ok with adding UTF-16 then `into_string`) - #126310 (Migrate run make prefer rlib) - #126314 (fix RELEASES: we do not support upcasting to auto traits) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 02c7a59 + 0a52849 commit bbe9a9c

File tree

96 files changed

+753
-246
lines changed

Some content is hidden

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

96 files changed

+753
-246
lines changed

RELEASES.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ Language
147147
- [Split `refining_impl_trait` lint into `_reachable`, `_internal` variants](https://github.com/rust-lang/rust/pull/121720/)
148148
- [Remove unnecessary type inference when using associated types inside of higher ranked `where`-bounds](https://github.com/rust-lang/rust/pull/119849)
149149
- [Weaken eager detection of cyclic types during type inference](https://github.com/rust-lang/rust/pull/119989)
150-
- [`trait Trait: Auto {}`: allow upcasting from `dyn Trait` to `dyn Auto`](https://github.com/rust-lang/rust/pull/119338)
150+
- [`trait Trait: Auto {}`: allow upcasting from `dyn Trait` to `dyn Trait + Auto`](https://github.com/rust-lang/rust/pull/119338)
151151

152152
<a id="1.78.0-Compiler"></a>
153153

compiler/rustc_abi/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
#![cfg_attr(feature = "nightly", feature(step_trait))]
1+
// tidy-alphabetical-start
22
#![cfg_attr(feature = "nightly", allow(internal_features))]
33
#![cfg_attr(feature = "nightly", doc(rust_logo))]
44
#![cfg_attr(feature = "nightly", feature(rustdoc_internals))]
5+
#![cfg_attr(feature = "nightly", feature(step_trait))]
6+
// tidy-alphabetical-end
57

68
use std::fmt;
79
use std::num::{NonZeroUsize, ParseIntError};

compiler/rustc_arena/src/lib.rs

+9-7
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,25 @@
77
//!
88
//! This crate implements several kinds of arena.
99
10+
// tidy-alphabetical-start
11+
#![allow(clippy::mut_from_ref)] // Arena allocators are one place where this pattern is fine.
12+
#![allow(internal_features)]
13+
#![cfg_attr(test, feature(test))]
14+
#![deny(unsafe_op_in_unsafe_fn)]
1015
#![doc(
1116
html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/",
1217
test(no_crate_inject, attr(deny(warnings)))
1318
)]
1419
#![doc(rust_logo)]
15-
#![feature(rustdoc_internals)]
1620
#![feature(core_intrinsics)]
21+
#![feature(decl_macro)]
1722
#![feature(dropck_eyepatch)]
18-
#![feature(new_uninit)]
1923
#![feature(maybe_uninit_slice)]
20-
#![feature(decl_macro)]
24+
#![feature(new_uninit)]
2125
#![feature(rustc_attrs)]
22-
#![cfg_attr(test, feature(test))]
26+
#![feature(rustdoc_internals)]
2327
#![feature(strict_provenance)]
24-
#![deny(unsafe_op_in_unsafe_fn)]
25-
#![allow(internal_features)]
26-
#![allow(clippy::mut_from_ref)] // Arena allocators are one of the places where this pattern is fine.
28+
// tidy-alphabetical-end
2729

2830
use smallvec::SmallVec;
2931

compiler/rustc_ast/src/lib.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,22 @@
44
//!
55
//! This API is completely unstable and subject to change.
66
7+
// tidy-alphabetical-start
8+
#![allow(internal_features)]
79
#![doc(
810
html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/",
911
test(attr(deny(warnings)))
1012
)]
1113
#![doc(rust_logo)]
12-
#![allow(internal_features)]
13-
#![feature(rustdoc_internals)]
1414
#![feature(associated_type_defaults)]
1515
#![feature(box_patterns)]
1616
#![feature(if_let_guard)]
1717
#![feature(let_chains)]
18-
#![feature(never_type)]
1918
#![feature(negative_impls)]
19+
#![feature(never_type)]
20+
#![feature(rustdoc_internals)]
2021
#![feature(stmt_expr_attributes)]
22+
// tidy-alphabetical-end
2123

2224
pub mod util {
2325
pub mod case;

compiler/rustc_ast_ir/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
// tidy-alphabetical-start
2+
#![cfg_attr(feature = "nightly", allow(internal_features))]
13
#![cfg_attr(feature = "nightly", feature(never_type))]
24
#![cfg_attr(feature = "nightly", feature(rustc_attrs))]
3-
#![cfg_attr(feature = "nightly", allow(internal_features))]
5+
// tidy-alphabetical-end
46

57
#[cfg(feature = "nightly")]
68
use rustc_macros::{Decodable, Encodable, HashStable_NoContext};

compiler/rustc_ast_lowering/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@
3030
//! get confused if the spans from leaf AST nodes occur in multiple places
3131
//! in the HIR, especially for multiple identifiers.
3232
33+
// tidy-alphabetical-start
3334
#![allow(internal_features)]
34-
#![feature(rustdoc_internals)]
3535
#![doc(rust_logo)]
3636
#![feature(assert_matches)]
3737
#![feature(box_patterns)]
3838
#![feature(let_chains)]
39+
#![feature(rustdoc_internals)]
40+
// tidy-alphabetical-end
3941

4042
use crate::errors::{AssocTyParentheses, AssocTyParenthesesSub, MisplacedImplTrait};
4143
use rustc_ast::node_id::NodeMap;

compiler/rustc_ast_passes/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
//!
55
//! The crate also contains other misc AST visitors, e.g. `node_count` and `show_span`.
66
7+
// tidy-alphabetical-start
78
#![allow(internal_features)]
89
#![doc(rust_logo)]
9-
#![feature(rustdoc_internals)]
1010
#![feature(box_patterns)]
1111
#![feature(if_let_guard)]
1212
#![feature(iter_is_partitioned)]
1313
#![feature(let_chains)]
14+
#![feature(rustdoc_internals)]
15+
// tidy-alphabetical-end
1416

1517
pub mod ast_validation;
1618
mod errors;

compiler/rustc_ast_pretty/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
// tidy-alphabetical-start
12
#![allow(internal_features)]
2-
#![feature(rustdoc_internals)]
33
#![doc(rust_logo)]
44
#![feature(box_patterns)]
5+
#![feature(rustdoc_internals)]
6+
// tidy-alphabetical-end
57

68
mod helpers;
79
pub mod pp;

compiler/rustc_attr/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
//! The goal is to move the definition of `MetaItem` and things that don't need to be in `syntax`
55
//! to this crate.
66
7+
// tidy-alphabetical-start
78
#![allow(internal_features)]
8-
#![feature(rustdoc_internals)]
99
#![doc(rust_logo)]
1010
#![feature(let_chains)]
11+
#![feature(rustdoc_internals)]
12+
// tidy-alphabetical-end
1113

1214
mod builtin;
1315
mod session_diagnostics;

compiler/rustc_baked_icu_data/src/lib.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@
2020
//! --cldr-tag latest --icuexport-tag latest -o src/data
2121
//! ```
2222
23+
// tidy-alphabetical-start
24+
#![allow(elided_lifetimes_in_paths)]
2325
#![allow(internal_features)]
24-
#![feature(rustdoc_internals)]
2526
#![doc(rust_logo)]
26-
#![allow(elided_lifetimes_in_paths)]
27+
#![feature(rustdoc_internals)]
28+
// tidy-alphabetical-end
2729

2830
mod data {
2931
include!("data/mod.rs");

compiler/rustc_borrowck/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! This query borrow-checks the MIR to (further) ensure it is not broken.
22
3+
// tidy-alphabetical-start
34
#![allow(internal_features)]
4-
#![feature(rustdoc_internals)]
55
#![doc(rust_logo)]
66
#![feature(assert_matches)]
77
#![feature(box_patterns)]
@@ -10,8 +10,10 @@
1010
#![feature(min_specialization)]
1111
#![feature(never_type)]
1212
#![feature(rustc_attrs)]
13+
#![feature(rustdoc_internals)]
1314
#![feature(stmt_expr_attributes)]
1415
#![feature(try_blocks)]
16+
// tidy-alphabetical-end
1517

1618
#[macro_use]
1719
extern crate tracing;

compiler/rustc_builtin_macros/src/lib.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
//! This crate contains implementations of built-in macros and other code generating facilities
22
//! injecting code into the crate before it is lowered to HIR.
33
4+
// tidy-alphabetical-start
45
#![allow(internal_features)]
56
#![allow(rustc::diagnostic_outside_of_impl)]
67
#![allow(rustc::untranslatable_diagnostic)]
7-
#![feature(rustdoc_internals)]
8-
#![doc(rust_logo)]
98
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
9+
#![doc(rust_logo)]
1010
#![feature(assert_matches)]
1111
#![feature(box_patterns)]
1212
#![feature(decl_macro)]
@@ -15,7 +15,9 @@
1515
#![feature(lint_reasons)]
1616
#![feature(proc_macro_internals)]
1717
#![feature(proc_macro_quote)]
18+
#![feature(rustdoc_internals)]
1819
#![feature(try_blocks)]
20+
// tidy-alphabetical-end
1921

2022
extern crate proc_macro;
2123

compiler/rustc_codegen_cranelift/patches/0029-stdlib-rawdylib-processprng.patch

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ diff --git a/library/std/src/sys/pal/windows/c.rs b/library/std/src/sys/pal/wind
1212
index ad8e01bfa9b..9ca8e4c16ce 100644
1313
--- a/library/std/src/sys/pal/windows/c.rs
1414
+++ b/library/std/src/sys/pal/windows/c.rs
15-
@@ -323,7 +323,7 @@ pub unsafe fn NtWriteFile(
15+
@@ -312,7 +312,7 @@ pub unsafe fn NtWriteFile(
1616

1717
// Use raw-dylib to import ProcessPrng as we can't rely on there being an import library.
1818
cfg_if::cfg_if! {
@@ -26,8 +26,8 @@ index e427546222a..f2fe42a4d51 100644
2626
--- a/library/std/src/sys/pal/windows/rand.rs
2727
+++ b/library/std/src/sys/pal/windows/rand.rs
2828
@@ -2,7 +2,7 @@
29-
use core::mem;
30-
use core::ptr;
29+
30+
use crate::sys::c;
3131

3232
-#[cfg(not(target_vendor = "win7"))]
3333
+#[cfg(any())]

compiler/rustc_codegen_cranelift/src/lib.rs

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1+
// tidy-alphabetical-start
2+
#![allow(rustc::diagnostic_outside_of_impl)]
3+
#![allow(rustc::untranslatable_diagnostic)]
14
#![cfg_attr(doc, allow(internal_features))]
2-
#![cfg_attr(doc, feature(rustdoc_internals))]
35
#![cfg_attr(doc, doc(rust_logo))]
6+
#![cfg_attr(doc, feature(rustdoc_internals))]
7+
// Note: please avoid adding other feature gates where possible
48
#![feature(rustc_private)]
59
// Note: please avoid adding other feature gates where possible
6-
#![allow(rustc::diagnostic_outside_of_impl)]
7-
#![allow(rustc::untranslatable_diagnostic)]
810
#![warn(rust_2018_idioms)]
9-
#![warn(unused_lifetimes)]
1011
#![warn(unreachable_pub)]
12+
#![warn(unused_lifetimes)]
13+
// tidy-alphabetical-end
1114

1215
extern crate jobserver;
1316
#[macro_use]

compiler/rustc_codegen_llvm/src/lib.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@
44
//!
55
//! This API is completely unstable and subject to change.
66
7+
// tidy-alphabetical-start
78
#![allow(internal_features)]
8-
#![feature(rustdoc_internals)]
9-
#![doc(rust_logo)]
109
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
10+
#![doc(rust_logo)]
1111
#![feature(exact_size_is_empty)]
1212
#![feature(extern_types)]
1313
#![feature(hash_raw_entry)]
14+
#![feature(impl_trait_in_assoc_type)]
1415
#![feature(iter_intersperse)]
1516
#![feature(let_chains)]
16-
#![feature(impl_trait_in_assoc_type)]
17+
#![feature(rustdoc_internals)]
18+
// tidy-alphabetical-end
1719

1820
use back::owned_target_machine::OwnedTargetMachine;
1921
use back::write::{create_informational_target_machine, create_target_machine};

compiler/rustc_codegen_ssa/src/lib.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
2-
#![doc(rust_logo)]
3-
#![feature(rustdoc_internals)]
1+
// tidy-alphabetical-start
42
#![allow(internal_features)]
53
#![allow(rustc::diagnostic_outside_of_impl)]
64
#![allow(rustc::untranslatable_diagnostic)]
5+
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
6+
#![doc(rust_logo)]
77
#![feature(box_patterns)]
88
#![feature(if_let_guard)]
99
#![feature(let_chains)]
1010
#![feature(negative_impls)]
11+
#![feature(rustdoc_internals)]
1112
#![feature(strict_provenance)]
1213
#![feature(try_blocks)]
14+
// tidy-alphabetical-end
1315

1416
//! This crate contains codegen code that is used by all codegen backends (LLVM and others).
1517
//! The backend-agnostic functions of this crate use functions defined in various traits that

compiler/rustc_const_eval/src/lib.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1+
// tidy-alphabetical-start
12
#![allow(internal_features)]
23
#![allow(rustc::diagnostic_outside_of_impl)]
3-
#![feature(rustdoc_internals)]
44
#![doc(rust_logo)]
55
#![feature(assert_matches)]
66
#![feature(box_patterns)]
77
#![feature(decl_macro)]
8+
#![feature(if_let_guard)]
89
#![feature(let_chains)]
10+
#![feature(never_type)]
11+
#![feature(rustdoc_internals)]
912
#![feature(slice_ptr_get)]
1013
#![feature(strict_provenance)]
11-
#![feature(never_type)]
1214
#![feature(trait_alias)]
1315
#![feature(try_blocks)]
1416
#![feature(yeet_expr)]
15-
#![feature(if_let_guard)]
17+
// tidy-alphabetical-end
1618

1719
pub mod check_consts;
1820
pub mod const_eval;

compiler/rustc_driver/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
// This crate is intentionally empty and a re-export of `rustc_driver_impl` to allow the code in
22
// `rustc_driver_impl` to be compiled in parallel with other crates.
33

4+
// tidy-alphabetical-start
45
#![allow(internal_features)]
5-
#![feature(rustdoc_internals)]
66
#![doc(rust_logo)]
7+
#![feature(rustdoc_internals)]
8+
// tidy-alphabetical-end
79

810
pub use rustc_driver_impl::*;

compiler/rustc_driver_impl/src/lib.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@
44
//!
55
//! This API is completely unstable and subject to change.
66
7+
// tidy-alphabetical-start
8+
#![allow(internal_features)]
79
#![allow(rustc::untranslatable_diagnostic)] // FIXME: make this translatable
810
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
911
#![doc(rust_logo)]
10-
#![feature(rustdoc_internals)]
11-
#![allow(internal_features)]
1212
#![feature(decl_macro)]
1313
#![feature(let_chains)]
1414
#![feature(panic_backtrace_config)]
1515
#![feature(panic_update_hook)]
1616
#![feature(result_flattening)]
17+
#![feature(rustdoc_internals)]
18+
// tidy-alphabetical-end
1719

1820
use rustc_ast as ast;
1921
use rustc_codegen_ssa::{traits::CodegenBackend, CodegenErrors, CodegenResults};

compiler/rustc_error_codes/src/lib.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
//! This library is used to gather all error codes into one place, to make
22
//! their maintenance easier.
33
4+
// tidy-alphabetical-start
45
#![allow(internal_features)]
5-
#![feature(rustdoc_internals)]
6-
#![doc(rust_logo)]
76
#![deny(rustdoc::invalid_codeblock_attributes)]
7+
#![doc(rust_logo)]
8+
#![feature(rustdoc_internals)]
9+
// tidy-alphabetical-end
810

911
// This higher-order macro defines the error codes that are in use. It is used
1012
// in the `rustc_errors` crate. Removed error codes are listed in the comment

compiler/rustc_error_messages/src/lib.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
// tidy-alphabetical-start
2+
#![allow(internal_features)]
13
#![doc(rust_logo)]
2-
#![feature(rustdoc_internals)]
34
#![feature(rustc_attrs)]
5+
#![feature(rustdoc_internals)]
46
#![feature(type_alias_impl_trait)]
5-
#![allow(internal_features)]
7+
// tidy-alphabetical-end
68

79
use fluent_bundle::FluentResource;
810
use fluent_syntax::parser::ParserError;

compiler/rustc_feature/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
//! even if it is stabilized or removed, *do not remove it*. Instead, move the
1212
//! symbol to the `accepted` or `removed` modules respectively.
1313
14+
// tidy-alphabetical-start
1415
#![allow(internal_features)]
15-
#![feature(rustdoc_internals)]
1616
#![doc(rust_logo)]
17+
#![feature(rustdoc_internals)]
18+
// tidy-alphabetical-end
1719

1820
mod accepted;
1921
mod builtin_attrs;

0 commit comments

Comments
 (0)