Skip to content

Commit 21a330e

Browse files
committed
move strict provenance lints to new feature gate, remove old feature gates
1 parent c3e928d commit 21a330e

File tree

89 files changed

+38
-127
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

+38
-127
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
@@ -11,7 +11,6 @@
1111
#![feature(let_chains)]
1212
#![feature(negative_impls)]
1313
#![feature(rustdoc_internals)]
14-
#![feature(strict_provenance)]
1514
#![feature(trait_alias)]
1615
#![feature(try_blocks)]
1716
#![warn(unreachable_pub)]

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(unqualified_local_imports)]

compiler/rustc_data_structures/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
#![feature(ptr_alignment_type)]
3434
#![feature(rustc_attrs)]
3535
#![feature(rustdoc_internals)]
36-
#![feature(strict_provenance)]
3736
#![feature(test)]
3837
#![feature(thread_id_value)]
3938
#![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
@@ -598,7 +598,7 @@ declare_features! (
598598
/// Allows attributes on expressions and non-item statements.
599599
(unstable, stmt_expr_attributes, "1.6.0", Some(15701)),
600600
/// Allows lints part of the strict provenance effort.
601-
(unstable, strict_provenance, "1.61.0", Some(95228)),
601+
(unstable, strict_provenance_lints, "1.61.0", Some(130351)),
602602
/// Allows string patterns to dereference values to match them.
603603
(unstable, string_deref_patterns, "1.67.0", Some(87121)),
604604
/// 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
@@ -2667,7 +2667,6 @@ declare_lint! {
26672667
/// ### Example
26682668
///
26692669
/// ```rust
2670-
/// #![feature(strict_provenance)]
26712670
/// #![warn(fuzzy_provenance_casts)]
26722671
///
26732672
/// fn main() {
@@ -2701,7 +2700,7 @@ declare_lint! {
27012700
pub FUZZY_PROVENANCE_CASTS,
27022701
Allow,
27032702
"a fuzzy integer to pointer cast is used",
2704-
@feature_gate = strict_provenance;
2703+
@feature_gate = strict_provenance_lints;
27052704
}
27062705

27072706
declare_lint! {
@@ -2711,7 +2710,6 @@ declare_lint! {
27112710
/// ### Example
27122711
///
27132712
/// ```rust
2714-
/// #![feature(strict_provenance)]
27152713
/// #![warn(lossy_provenance_casts)]
27162714
///
27172715
/// fn main() {
@@ -2747,7 +2745,7 @@ declare_lint! {
27472745
pub LOSSY_PROVENANCE_CASTS,
27482746
Allow,
27492747
"a lossy pointer to integer cast is used",
2750-
@feature_gate = strict_provenance;
2748+
@feature_gate = strict_provenance_lints;
27512749
}
27522750

27532751
declare_lint! {

compiler/rustc_middle/src/lib.rs

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

compiler/rustc_span/src/symbol.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1913,7 +1913,7 @@ symbols! {
19131913
str_trim,
19141914
str_trim_end,
19151915
str_trim_start,
1916-
strict_provenance,
1916+
strict_provenance_lints,
19171917
string_as_mut_str,
19181918
string_as_str,
19191919
string_deref_patterns,

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
@@ -147,7 +147,6 @@
147147
#![feature(slice_range)]
148148
#![feature(std_internals)]
149149
#![feature(str_internals)]
150-
#![feature(strict_provenance)]
151150
#![feature(trusted_fused)]
152151
#![feature(trusted_len)]
153152
#![feature(trusted_random_access)]
@@ -162,6 +161,8 @@
162161
//
163162
// Language features:
164163
// tidy-alphabetical-start
164+
#![cfg_attr(bootstrap, feature(strict_provenance))]
165+
#![cfg_attr(not(bootstrap), feature(strict_provenance_lints))]
165166
#![cfg_attr(not(test), feature(coroutine_trait))]
166167
#![cfg_attr(test, feature(panic_update_hook))]
167168
#![cfg_attr(test, feature(test))]

0 commit comments

Comments
 (0)