Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 0ac1195

Browse files
committed
Invert diagnostic lints.
That is, change `diagnostic_outside_of_impl` and `untranslatable_diagnostic` from `allow` to `deny`, because more than half of the compiler has be converted to use translated diagnostics. This commit removes more `deny` attributes than it adds `allow` attributes, which proves that this change is warranted.
1 parent 4e3eed4 commit 0ac1195

File tree

107 files changed

+89
-166
lines changed

Some content is hidden

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

107 files changed

+89
-166
lines changed

compiler/rustc_arena/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
#![cfg_attr(test, feature(test))]
2323
#![feature(strict_provenance)]
2424
#![deny(unsafe_op_in_unsafe_fn)]
25-
#![deny(rustc::untranslatable_diagnostic)]
26-
#![deny(rustc::diagnostic_outside_of_impl)]
2725
#![allow(internal_features)]
2826
#![allow(clippy::mut_from_ref)] // Arena allocators are one of the places where this pattern is fine.
2927

compiler/rustc_ast/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
#![feature(min_specialization)]
1919
#![feature(negative_impls)]
2020
#![feature(stmt_expr_attributes)]
21-
#![deny(rustc::untranslatable_diagnostic)]
22-
#![deny(rustc::diagnostic_outside_of_impl)]
2321

2422
#[macro_use]
2523
extern crate rustc_macros;

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@
3535
#![doc(rust_logo)]
3636
#![feature(box_patterns)]
3737
#![feature(let_chains)]
38-
#![deny(rustc::untranslatable_diagnostic)]
39-
#![deny(rustc::diagnostic_outside_of_impl)]
4038

4139
#[macro_use]
4240
extern crate tracing;

compiler/rustc_ast_passes/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
#![feature(if_let_guard)]
1212
#![feature(iter_is_partitioned)]
1313
#![feature(let_chains)]
14-
#![deny(rustc::untranslatable_diagnostic)]
15-
#![deny(rustc::diagnostic_outside_of_impl)]
1614

1715
pub mod ast_validation;
1816
mod errors;

compiler/rustc_ast_pretty/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#![allow(internal_features)]
22
#![feature(rustdoc_internals)]
33
#![doc(rust_logo)]
4-
#![deny(rustc::untranslatable_diagnostic)]
5-
#![deny(rustc::diagnostic_outside_of_impl)]
64
#![feature(box_patterns)]
75

86
mod helpers;

compiler/rustc_attr/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
#![feature(rustdoc_internals)]
99
#![doc(rust_logo)]
1010
#![feature(let_chains)]
11-
#![deny(rustc::untranslatable_diagnostic)]
12-
#![deny(rustc::diagnostic_outside_of_impl)]
1311

1412
#[macro_use]
1513
extern crate rustc_macros;

compiler/rustc_borrowck/src/borrow_set.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![deny(rustc::untranslatable_diagnostic)]
2-
#![deny(rustc::diagnostic_outside_of_impl)]
31
use crate::path_utils::allow_two_phase_borrow;
42
use crate::place_ext::PlaceExt;
53
use crate::BorrowIndex;

compiler/rustc_borrowck/src/borrowck_errors.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#![allow(rustc::diagnostic_outside_of_impl)]
2+
#![allow(rustc::untranslatable_diagnostic)]
3+
14
use rustc_errors::{codes::*, struct_span_code_err, DiagCtxt, DiagnosticBuilder};
25
use rustc_middle::ty::{self, Ty, TyCtxt};
36
use rustc_span::Span;

compiler/rustc_borrowck/src/constraints/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#![deny(rustc::untranslatable_diagnostic)]
2-
#![deny(rustc::diagnostic_outside_of_impl)]
3-
41
use rustc_data_structures::graph::scc::Sccs;
52
use rustc_index::{IndexSlice, IndexVec};
63
use rustc_middle::mir::ConstraintCategory;

compiler/rustc_borrowck/src/consumers.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![deny(rustc::untranslatable_diagnostic)]
2-
#![deny(rustc::diagnostic_outside_of_impl)]
31
//! This file provides API for compiler consumers.
42
53
use rustc_hir::def_id::LocalDefId;

0 commit comments

Comments
 (0)