Skip to content

Commit c9a124b

Browse files
authored
Rollup merge of rust-lang#100723 - 5225225:the-easy-ones, r=compiler-errors
Add the diagnostic translation lints to crates that don't emit them Some of these have a note saying that they should build on a stable compiler, does that mean they shouldn't get these lints? Or can we cfg them out on those?
2 parents 5a90fc7 + 09ea9f0 commit c9a124b

File tree

25 files changed

+52
-0
lines changed

25 files changed

+52
-0
lines changed

compiler/rustc_apfloat/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
3434
#![no_std]
3535
#![forbid(unsafe_code)]
36+
#![deny(rustc::untranslatable_diagnostic)]
37+
#![deny(rustc::diagnostic_outside_of_impl)]
3638

3739
#[macro_use]
3840
extern crate alloc;

compiler/rustc_arena/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
#![feature(rustc_attrs)]
2020
#![cfg_attr(test, feature(test))]
2121
#![feature(strict_provenance)]
22+
#![deny(rustc::untranslatable_diagnostic)]
23+
#![deny(rustc::diagnostic_outside_of_impl)]
2224

2325
use smallvec::SmallVec;
2426

compiler/rustc_ast/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
#![feature(slice_internals)]
2020
#![feature(stmt_expr_attributes)]
2121
#![recursion_limit = "256"]
22+
#![deny(rustc::untranslatable_diagnostic)]
23+
#![deny(rustc::diagnostic_outside_of_impl)]
2224

2325
#[macro_use]
2426
extern crate rustc_macros;

compiler/rustc_ast_pretty/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
13
#![feature(associated_type_bounds)]
24
#![feature(box_patterns)]
35
#![feature(with_negative_coherence)]

compiler/rustc_data_structures/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
#![feature(vec_into_raw_parts)]
2929
#![allow(rustc::default_hash_types)]
3030
#![allow(rustc::potential_query_instability)]
31+
#![deny(rustc::untranslatable_diagnostic)]
32+
#![deny(rustc::diagnostic_outside_of_impl)]
3133

3234
#[macro_use]
3335
extern crate tracing;

compiler/rustc_error_codes/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#![deny(rustdoc::invalid_codeblock_attributes)]
2+
#![deny(rustc::untranslatable_diagnostic)]
3+
#![deny(rustc::diagnostic_outside_of_impl)]
24
//! This library is used to gather all error codes into one place,
35
//! the goal being to make their maintenance easier.
46

compiler/rustc_error_messages/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#![feature(once_cell)]
22
#![feature(rustc_attrs)]
33
#![feature(type_alias_impl_trait)]
4+
#![deny(rustc::untranslatable_diagnostic)]
5+
#![deny(rustc::diagnostic_outside_of_impl)]
46

57
use fluent_bundle::FluentResource;
68
use fluent_syntax::parser::ParserError;

compiler/rustc_feature/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
//! symbol to the `accepted` or `removed` modules respectively.
1313
1414
#![feature(once_cell)]
15+
#![deny(rustc::untranslatable_diagnostic)]
16+
#![deny(rustc::diagnostic_outside_of_impl)]
1517

1618
mod accepted;
1719
mod active;

compiler/rustc_fs_util/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#![deny(rustc::untranslatable_diagnostic)]
2+
#![deny(rustc::diagnostic_outside_of_impl)]
3+
14
use std::ffi::CString;
25
use std::fs;
36
use std::io;

compiler/rustc_graphviz/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,8 @@
273273
html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/",
274274
test(attr(allow(unused_variables), deny(warnings)))
275275
)]
276+
#![deny(rustc::untranslatable_diagnostic)]
277+
#![deny(rustc::diagnostic_outside_of_impl)]
276278

277279
use LabelText::*;
278280

0 commit comments

Comments
 (0)