Skip to content

Commit 2a752c2

Browse files
committed
Add tidy-alphabetical-start/end around feature lists and, in some cases, allow/warn/deny lists
1 parent cbb48a5 commit 2a752c2

File tree

79 files changed

+527
-356
lines changed

Some content is hidden

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

79 files changed

+527
-356
lines changed

compiler/rustc_arena/src/lib.rs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,23 @@
1111
html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/",
1212
test(no_crate_inject, attr(deny(warnings)))
1313
)]
14+
// tidy-alphabetical-start
15+
#![deny(rustc::diagnostic_outside_of_impl)]
16+
#![deny(rustc::untranslatable_diagnostic)]
17+
#![deny(unsafe_op_in_unsafe_fn)]
18+
#![feature(decl_macro)]
1419
#![feature(dropck_eyepatch)]
15-
#![feature(new_uninit)]
1620
#![feature(maybe_uninit_slice)]
1721
#![feature(min_specialization)]
18-
#![feature(decl_macro)]
22+
#![feature(new_uninit)]
1923
#![feature(pointer_byte_offsets)]
2024
#![feature(rustc_attrs)]
21-
#![cfg_attr(test, feature(test))]
2225
#![feature(strict_provenance)]
23-
#![deny(unsafe_op_in_unsafe_fn)]
24-
#![deny(rustc::untranslatable_diagnostic)]
25-
#![deny(rustc::diagnostic_outside_of_impl)]
26+
// tidy-alphabetical-end
2627
#![cfg_attr(not(bootstrap), allow(internal_features))]
27-
#![allow(clippy::mut_from_ref)] // Arena allocators are one of the places where this pattern is fine.
28+
#![cfg_attr(test, feature(test))]
29+
// Arena allocators are one of the places where this pattern is fine.
30+
#![allow(clippy::mut_from_ref)]
2831

2932
use smallvec::SmallVec;
3033

compiler/rustc_ast/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/",
99
test(attr(deny(warnings)))
1010
)]
11+
// tidy-alphabetical-start
12+
#![deny(rustc::diagnostic_outside_of_impl)]
13+
#![deny(rustc::untranslatable_diagnostic)]
1114
#![feature(associated_type_bounds)]
1215
#![feature(box_patterns)]
1316
#![feature(const_trait_impl)]
@@ -16,9 +19,8 @@
1619
#![feature(min_specialization)]
1720
#![feature(negative_impls)]
1821
#![feature(stmt_expr_attributes)]
22+
// tidy-alphabetical-end
1923
#![recursion_limit = "256"]
20-
#![deny(rustc::untranslatable_diagnostic)]
21-
#![deny(rustc::diagnostic_outside_of_impl)]
2224

2325
#[macro_use]
2426
extern crate rustc_macros;

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 4 additions & 2 deletions
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
34+
#![deny(rustc::diagnostic_outside_of_impl)]
35+
#![deny(rustc::untranslatable_diagnostic)]
3336
#![feature(box_patterns)]
3437
#![feature(let_chains)]
3538
#![feature(never_type)]
39+
// tidy-alphabetical-end
3640
#![recursion_limit = "256"]
37-
#![deny(rustc::untranslatable_diagnostic)]
38-
#![deny(rustc::diagnostic_outside_of_impl)]
3941

4042
#[macro_use]
4143
extern crate tracing;

compiler/rustc_ast_passes/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
//!
55
//! The crate also contains other misc AST visitors, e.g. `node_count` and `show_span`.
66
7+
// tidy-alphabetical-start
78
#![feature(box_patterns)]
89
#![feature(if_let_guard)]
910
#![feature(iter_is_partitioned)]
1011
#![feature(let_chains)]
12+
// tidy-alphabetical-end
1113
#![recursion_limit = "256"]
1214
#![deny(rustc::untranslatable_diagnostic)]
1315
#![deny(rustc::diagnostic_outside_of_impl)]

compiler/rustc_ast_pretty/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
#![deny(rustc::untranslatable_diagnostic)]
1+
// tidy-alphabetical-start
22
#![deny(rustc::diagnostic_outside_of_impl)]
3+
#![deny(rustc::untranslatable_diagnostic)]
34
#![feature(associated_type_bounds)]
45
#![feature(box_patterns)]
56
#![feature(with_negative_coherence)]
7+
// tidy-alphabetical-end
68
#![recursion_limit = "256"]
79

810
mod helpers;

compiler/rustc_attr/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
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-
#![feature(let_chains)]
8-
#![deny(rustc::untranslatable_diagnostic)]
7+
// tidy-alphabetical-start
98
#![deny(rustc::diagnostic_outside_of_impl)]
9+
#![deny(rustc::untranslatable_diagnostic)]
10+
#![feature(let_chains)]
11+
// tidy-alphabetical-end
1012

1113
#[macro_use]
1214
extern crate rustc_macros;

compiler/rustc_borrowck/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
//! This query borrow-checks the MIR to (further) ensure it is not broken.
22
3+
// tidy-alphabetical-start
34
#![feature(associated_type_bounds)]
45
#![feature(box_patterns)]
6+
#![feature(lazy_cell)]
57
#![feature(let_chains)]
68
#![feature(min_specialization)]
79
#![feature(never_type)]
8-
#![feature(lazy_cell)]
910
#![feature(rustc_attrs)]
1011
#![feature(stmt_expr_attributes)]
1112
#![feature(trusted_step)]
1213
#![feature(try_blocks)]
14+
// tidy-alphabetical-end
1315
#![recursion_limit = "256"]
1416
#![cfg_attr(not(bootstrap), allow(internal_features))]
1517

compiler/rustc_builtin_macros/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
//! injecting code into the crate before it is lowered to HIR.
33
44
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
5+
// tidy-alphabetical-start
56
#![feature(array_windows)]
67
#![feature(box_patterns)]
78
#![feature(decl_macro)]
@@ -11,6 +12,7 @@
1112
#![feature(lint_reasons)]
1213
#![feature(proc_macro_internals)]
1314
#![feature(proc_macro_quote)]
15+
// tidy-alphabetical-end
1416
#![recursion_limit = "256"]
1517

1618
extern crate proc_macro;

compiler/rustc_codegen_cranelift/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
#![feature(rustc_private)]
21
// Note: please avoid adding other feature gates where possible
2+
#![feature(rustc_private)]
3+
// tidy-alphabetical-start
34
#![warn(rust_2018_idioms)]
4-
#![warn(unused_lifetimes)]
55
#![warn(unreachable_pub)]
6+
#![warn(unused_lifetimes)]
7+
// tidy-alphabetical-end
68

79
extern crate jobserver;
810
#[macro_use]

compiler/rustc_codegen_gcc/src/lib.rs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,22 @@
66
* TODO(antoyo): remove the patches.
77
*/
88

9-
#![feature(
10-
rustc_private,
11-
decl_macro,
12-
associated_type_bounds,
13-
never_type,
14-
trusted_len,
15-
hash_raw_entry
16-
)]
9+
// tidy-alphabetical-start
1710
#![allow(broken_intra_doc_links)]
18-
#![recursion_limit="256"]
11+
#![deny(rustc::diagnostic_outside_of_impl)]
12+
#![deny(rustc::untranslatable_diagnostic)]
1913
#![warn(rust_2018_idioms)]
2014
#![warn(unused_lifetimes)]
21-
#![deny(rustc::untranslatable_diagnostic)]
22-
#![deny(rustc::diagnostic_outside_of_impl)]
15+
// tidy-alphabetical-end
16+
// tidy-alphabetical-start
17+
#![feature(associated_type_bounds)]
18+
#![feature(decl_macro)]
19+
#![feature(hash_raw_entry)]
20+
#![feature(never_type)]
21+
#![feature(rustc_private)]
22+
#![feature(trusted_len)]
23+
// tidy-alphabetical-end
24+
#![recursion_limit="256"]
2325

2426
extern crate rustc_apfloat;
2527
extern crate rustc_ast;

0 commit comments

Comments
 (0)