Skip to content

Commit 166c28b

Browse files
authored
Unrolled build for rust-lang#137214
Rollup merge of rust-lang#137214 - cyrgani:clippy_diagnostic_items, r=compiler-errors add last std diagnostic items for clippy Part of rust-lang/rust-clippy#5393. Add diagnostic item attributes to the items in `std` and `core` where clippy currently uses hardcoded paths (https://github.com/rust-lang/rust-clippy/blob/master/clippy_utils/src/paths.rs).
2 parents 3b022d8 + a72402a commit 166c28b

File tree

5 files changed

+14
-0
lines changed

5 files changed

+14
-0
lines changed

Diff for: compiler/rustc_span/src/symbol.rs

+7
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ symbols! {
192192
Capture,
193193
Cell,
194194
Center,
195+
Child,
195196
Cleanup,
196197
Clone,
197198
CoercePointee,
@@ -336,6 +337,7 @@ symbols! {
336337
SliceIter,
337338
Some,
338339
SpanCtxt,
340+
Stdin,
339341
String,
340342
StructuralPartialEq,
341343
SubdiagMessage,
@@ -599,6 +601,9 @@ symbols! {
599601
cfi,
600602
cfi_encoding,
601603
char,
604+
char_is_ascii,
605+
child_id,
606+
child_kill,
602607
client,
603608
clippy,
604609
clobber_abi,
@@ -1468,6 +1473,7 @@ symbols! {
14681473
panic_2015,
14691474
panic_2021,
14701475
panic_abort,
1476+
panic_any,
14711477
panic_bounds_check,
14721478
panic_cannot_unwind,
14731479
panic_const_add_overflow,
@@ -1573,6 +1579,7 @@ symbols! {
15731579
proc_macro_mod,
15741580
proc_macro_non_items,
15751581
proc_macro_path_invoc,
1582+
process_abort,
15761583
process_exit,
15771584
profiler_builtins,
15781585
profiler_runtime,

Diff for: library/core/src/char/methods.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1168,6 +1168,7 @@ impl char {
11681168
#[must_use]
11691169
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
11701170
#[rustc_const_stable(feature = "const_char_is_ascii", since = "1.32.0")]
1171+
#[cfg_attr(not(test), rustc_diagnostic_item = "char_is_ascii")]
11711172
#[inline]
11721173
pub const fn is_ascii(&self) -> bool {
11731174
*self as u32 <= 0x7F

Diff for: library/std/src/io/stdio.rs

+1
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ fn handle_ebadf_lazy<T>(r: io::Result<T>, default: impl FnOnce() -> T) -> io::Re
239239
/// }
240240
/// ```
241241
#[stable(feature = "rust1", since = "1.0.0")]
242+
#[cfg_attr(not(test), rustc_diagnostic_item = "Stdin")]
242243
pub struct Stdin {
243244
inner: &'static Mutex<BufReader<StdinRaw>>,
244245
}

Diff for: library/std/src/panic.rs

+1
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ pub use crate::panicking::{set_hook, take_hook};
255255
#[stable(feature = "panic_any", since = "1.51.0")]
256256
#[inline]
257257
#[track_caller]
258+
#[cfg_attr(not(test), rustc_diagnostic_item = "panic_any")]
258259
pub fn panic_any<M: 'static + Any + Send>(msg: M) -> ! {
259260
crate::panicking::begin_panic(msg);
260261
}

Diff for: library/std/src/process.rs

+4
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ use crate::{fmt, fs, str};
217217
///
218218
/// [`wait`]: Child::wait
219219
#[stable(feature = "process", since = "1.0.0")]
220+
#[cfg_attr(not(test), rustc_diagnostic_item = "Child")]
220221
pub struct Child {
221222
pub(crate) handle: imp::Process,
222223

@@ -2115,6 +2116,7 @@ impl Child {
21152116
/// [`ErrorKind`]: io::ErrorKind
21162117
/// [`InvalidInput`]: io::ErrorKind::InvalidInput
21172118
#[stable(feature = "process", since = "1.0.0")]
2119+
#[cfg_attr(not(test), rustc_diagnostic_item = "child_kill")]
21182120
pub fn kill(&mut self) -> io::Result<()> {
21192121
self.handle.kill()
21202122
}
@@ -2135,6 +2137,7 @@ impl Child {
21352137
/// ```
21362138
#[must_use]
21372139
#[stable(feature = "process_id", since = "1.3.0")]
2140+
#[cfg_attr(not(test), rustc_diagnostic_item = "child_id")]
21382141
pub fn id(&self) -> u32 {
21392142
self.handle.id()
21402143
}
@@ -2375,6 +2378,7 @@ pub fn exit(code: i32) -> ! {
23752378
/// [panic hook]: crate::panic::set_hook
23762379
#[stable(feature = "process_abort", since = "1.17.0")]
23772380
#[cold]
2381+
#[cfg_attr(not(test), rustc_diagnostic_item = "process_abort")]
23782382
pub fn abort() -> ! {
23792383
crate::sys::abort_internal();
23802384
}

0 commit comments

Comments
 (0)