Skip to content

Commit 01e8884

Browse files
committed
move strict provenance lints to new feature gate, remove old feature gates
1 parent 18c72d0 commit 01e8884

File tree

89 files changed

+41
-126
lines changed

Some content is hidden

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

89 files changed

+41
-126
lines changed

compiler/rustc_arena/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#![feature(maybe_uninit_slice)]
2424
#![feature(rustc_attrs)]
2525
#![feature(rustdoc_internals)]
26-
#![feature(strict_provenance)]
2726
#![warn(unreachable_pub)]
2827
// tidy-alphabetical-end
2928

compiler/rustc_codegen_ssa/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#![feature(let_chains)]
1111
#![feature(negative_impls)]
1212
#![feature(rustdoc_internals)]
13-
#![feature(strict_provenance)]
1413
#![feature(try_blocks)]
1514
#![warn(unreachable_pub)]
1615
// tidy-alphabetical-end

compiler/rustc_const_eval/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#![feature(never_type)]
1111
#![feature(rustdoc_internals)]
1212
#![feature(slice_ptr_get)]
13-
#![feature(strict_provenance)]
1413
#![feature(trait_alias)]
1514
#![feature(try_blocks)]
1615
#![feature(yeet_expr)]

compiler/rustc_data_structures/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#![feature(ptr_alignment_type)]
3333
#![feature(rustc_attrs)]
3434
#![feature(rustdoc_internals)]
35-
#![feature(strict_provenance)]
3635
#![feature(test)]
3736
#![feature(thread_id_value)]
3837
#![feature(type_alias_impl_trait)]

compiler/rustc_feature/src/unstable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ declare_features! (
596596
/// Allows attributes on expressions and non-item statements.
597597
(unstable, stmt_expr_attributes, "1.6.0", Some(15701)),
598598
/// Allows lints part of the strict provenance effort.
599-
(unstable, strict_provenance, "1.61.0", Some(95228)),
599+
(unstable, strict_provenance_lints, "1.61.0", Some(130351)),
600600
/// Allows string patterns to dereference values to match them.
601601
(unstable, string_deref_patterns, "1.67.0", Some(87121)),
602602
/// Allows the use of `#[target_feature]` on safe functions.

compiler/rustc_lint_defs/src/builtin.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2721,7 +2721,6 @@ declare_lint! {
27212721
/// ### Example
27222722
///
27232723
/// ```rust
2724-
/// #![feature(strict_provenance)]
27252724
/// #![warn(fuzzy_provenance_casts)]
27262725
///
27272726
/// fn main() {
@@ -2755,7 +2754,7 @@ declare_lint! {
27552754
pub FUZZY_PROVENANCE_CASTS,
27562755
Allow,
27572756
"a fuzzy integer to pointer cast is used",
2758-
@feature_gate = strict_provenance;
2757+
@feature_gate = strict_provenance_lints;
27592758
}
27602759

27612760
declare_lint! {
@@ -2765,7 +2764,6 @@ declare_lint! {
27652764
/// ### Example
27662765
///
27672766
/// ```rust
2768-
/// #![feature(strict_provenance)]
27692767
/// #![warn(lossy_provenance_casts)]
27702768
///
27712769
/// fn main() {
@@ -2801,7 +2799,7 @@ declare_lint! {
28012799
pub LOSSY_PROVENANCE_CASTS,
28022800
Allow,
28032801
"a lossy pointer to integer cast is used",
2804-
@feature_gate = strict_provenance;
2802+
@feature_gate = strict_provenance_lints;
28052803
}
28062804

28072805
declare_lint! {

compiler/rustc_middle/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
#![feature(ptr_alignment_type)]
5656
#![feature(rustc_attrs)]
5757
#![feature(rustdoc_internals)]
58-
#![feature(strict_provenance)]
5958
#![feature(trait_upcasting)]
6059
#![feature(trusted_len)]
6160
#![feature(try_blocks)]

compiler/rustc_span/src/symbol.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1857,7 +1857,7 @@ symbols! {
18571857
str_trim,
18581858
str_trim_end,
18591859
str_trim_start,
1860-
strict_provenance,
1860+
strict_provenance_lints,
18611861
string_deref_patterns,
18621862
stringify,
18631863
struct_field_attributes,

library/alloc/benches/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
#![feature(iter_next_chunk)]
55
#![feature(repr_simd)]
66
#![feature(slice_partition_dedup)]
7-
#![feature(strict_provenance)]
7+
#![cfg_attr(bootstrap, feature(strict_provenance))]
8+
#![cfg_attr(not(bootstrap), feature(strict_provenance_lints))]
89
#![feature(test)]
910
#![deny(fuzzy_provenance_casts)]
1011

library/alloc/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@
149149
#![feature(slice_range)]
150150
#![feature(std_internals)]
151151
#![feature(str_internals)]
152-
#![feature(strict_provenance)]
153152
#![feature(trusted_fused)]
154153
#![feature(trusted_len)]
155154
#![feature(trusted_random_access)]
@@ -164,6 +163,8 @@
164163
//
165164
// Language features:
166165
// tidy-alphabetical-start
166+
#![cfg_attr(bootstrap, feature(strict_provenance))]
167+
#![cfg_attr(not(bootstrap), feature(strict_provenance_lints))]
167168
#![cfg_attr(not(test), feature(coroutine_trait))]
168169
#![cfg_attr(test, feature(panic_update_hook))]
169170
#![cfg_attr(test, feature(test))]

0 commit comments

Comments
 (0)