Skip to content

Commit 810324d

Browse files
committed
Rename optin_builtin_traits to auto_traits
They were originally called "opt-in, built-in traits" (OIBITs), but people realized that the name was too confusing and a mouthful, and so they were renamed to just "auto traits". The feature flag's name wasn't updated, though, so that's what this PR does. There are some other spots in the compiler that still refer to OIBITs, but I don't think changing those now is worth it since they are internal and not particularly relevant to this PR. Also see <https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/opt-in.2C.20built-in.20traits.20(auto.20traits).20feature.20name>.
1 parent 32da90b commit 810324d

File tree

54 files changed

+78
-62
lines changed

Some content is hidden

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

54 files changed

+78
-62
lines changed

compiler/rustc_ast_passes/src/feature_gate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
370370
ast::ItemKind::Trait(ast::IsAuto::Yes, ..) => {
371371
gate_feature_post!(
372372
&self,
373-
optin_builtin_traits,
373+
auto_traits,
374374
i.span,
375375
"auto traits are experimental and possibly buggy"
376376
);

compiler/rustc_codegen_cranelift/example/mini_core.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![feature(
22
no_core, lang_items, intrinsics, unboxed_closures, type_ascription, extern_types,
3-
untagged_unions, decl_macro, rustc_attrs, transparent_unions, optin_builtin_traits,
3+
untagged_unions, decl_macro, rustc_attrs, transparent_unions, auto_traits,
44
thread_local,
55
)]
66
#![no_core]

compiler/rustc_data_structures/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
#![feature(fn_traits)]
1616
#![feature(int_bits_const)]
1717
#![feature(min_specialization)]
18-
#![feature(optin_builtin_traits)]
18+
#![cfg_attr(bootstrap, feature(optin_builtin_traits))]
19+
#![cfg_attr(not(bootstrap), feature(auto_traits))]
1920
#![feature(nll)]
2021
#![feature(allow_internal_unstable)]
2122
#![feature(hash_raw_entry)]

compiler/rustc_error_codes/src/error_codes/E0198.md

Lines changed: 1 addition & 1 deletion

compiler/rustc_error_codes/src/error_codes/E0321.md

Lines changed: 1 addition & 1 deletion

compiler/rustc_error_codes/src/error_codes/E0567.md

Lines changed: 2 additions & 2 deletions

compiler/rustc_error_codes/src/error_codes/E0568.md

Lines changed: 2 additions & 2 deletions

compiler/rustc_feature/src/active.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,6 @@ declare_features! (
149149
/// Allows using the `#[linkage = ".."]` attribute.
150150
(active, linkage, "1.0.0", Some(29603), None),
151151

152-
/// Allows features specific to OIBIT (auto traits).
153-
(active, optin_builtin_traits, "1.0.0", Some(13231), None),
154-
155152
/// Allows using `box` in patterns (RFC 469).
156153
(active, box_patterns, "1.0.0", Some(29641), None),
157154

@@ -215,6 +212,10 @@ declare_features! (
215212
/// purpose as `#[allow_internal_unstable]`.
216213
(active, rustc_allow_const_fn_unstable, "1.49.0", Some(69399), None),
217214

215+
/// Allows features specific to auto traits.
216+
/// Renamed from `optin_builtin_traits`.
217+
(active, auto_traits, "1.50.0", Some(13231), None),
218+
218219
// no-tracking-issue-end
219220

220221
// -------------------------------------------------------------------------

compiler/rustc_feature/src/removed.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ declare_features! (
7171
/// Allows using custom attributes (RFC 572).
7272
(removed, custom_attribute, "1.0.0", Some(29642), None,
7373
Some("removed in favor of `#![register_tool]` and `#![register_attr]`")),
74+
/// Allows features specific to OIBIT (now called auto traits).
75+
/// Renamed to `auto_traits`.
76+
(removed, optin_builtin_traits, "1.0.0", Some(13231), None,
77+
Some("renamed to `auto_traits`")),
7478
(removed, pushpop_unsafe, "1.2.0", None, None, None),
7579
(removed, needs_allocator, "1.4.0", Some(27389), None,
7680
Some("subsumed by `#![feature(allocator_internals)]`")),
@@ -113,7 +117,6 @@ declare_features! (
113117
Some("removed in favor of `#![feature(marker_trait_attr)]`")),
114118
/// Allows `#[no_debug]`.
115119
(removed, no_debug, "1.43.0", Some(29721), None, Some("removed due to lack of demand")),
116-
117120
/// Allows comparing raw pointers during const eval.
118121
(removed, const_compare_raw_pointers, "1.46.0", Some(53020), None,
119122
Some("cannot be allowed in const eval in any meaningful way")),

compiler/rustc_span/src/symbol.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ symbols! {
285285
attr_literals,
286286
attributes,
287287
augmented_assignments,
288+
auto_traits,
288289
automatically_derived,
289290
avx512_target_feature,
290291
await_macro,

0 commit comments

Comments
 (0)