From 82dc99ba7aca7880acc0e823f31e9ba5da518e88 Mon Sep 17 00:00:00 2001 From: Camelid Date: Tue, 24 Nov 2020 15:44:04 -0800 Subject: [PATCH] Use the name "auto traits" everywhere in the compiler Goodbye, OIBIT! --- compiler/rustc_middle/src/mir/mod.rs | 2 +- compiler/rustc_middle/src/traits/mod.rs | 2 +- compiler/rustc_mir_build/src/build/expr/as_rvalue.rs | 2 +- .../rustdoc/auxiliary/rustdoc-impl-parts-crosscrate.rs | 2 +- src/test/rustdoc/impl-parts-crosscrate.rs | 6 +++--- src/test/rustdoc/impl-parts.rs | 10 +++++----- .../ui/{phantom-oibit.rs => phantom-auto-trait.rs} | 4 ++-- ...{phantom-oibit.stderr => phantom-auto-trait.stderr} | 4 ++-- ...traits-inductive-overflow-supertrait-auto-trait.rs} | 4 ++-- ...ts-inductive-overflow-supertrait-auto-trait.stderr} | 4 ++-- 10 files changed, 20 insertions(+), 20 deletions(-) rename src/test/ui/{phantom-oibit.rs => phantom-auto-trait.rs} (73%) rename src/test/ui/{phantom-oibit.stderr => phantom-auto-trait.stderr} (94%) rename src/test/ui/traits/{traits-inductive-overflow-supertrait-oibit.rs => traits-inductive-overflow-supertrait-auto-trait.rs} (65%) rename src/test/ui/traits/{traits-inductive-overflow-supertrait-oibit.stderr => traits-inductive-overflow-supertrait-auto-trait.stderr} (85%) diff --git a/compiler/rustc_middle/src/mir/mod.rs b/compiler/rustc_middle/src/mir/mod.rs index 9289d4708de..814f91b0431 100644 --- a/compiler/rustc_middle/src/mir/mod.rs +++ b/compiler/rustc_middle/src/mir/mod.rs @@ -811,7 +811,7 @@ pub struct LocalDecl<'tcx> { /// after typeck. /// /// This should be sound because the drop flags are fully algebraic, and - /// therefore don't affect the OIBIT or outlives properties of the + /// therefore don't affect the auto-trait or outlives properties of the /// generator. pub internal: bool, diff --git a/compiler/rustc_middle/src/traits/mod.rs b/compiler/rustc_middle/src/traits/mod.rs index 4deb7225dcb..0764e273a4a 100644 --- a/compiler/rustc_middle/src/traits/mod.rs +++ b/compiler/rustc_middle/src/traits/mod.rs @@ -70,7 +70,7 @@ pub enum Reveal { /// be observable directly by the user, `Reveal::All` /// should not be used by checks which may expose /// type equality or type contents to the user. - /// There are some exceptions, e.g., around OIBITS and + /// There are some exceptions, e.g., around auto traits and /// transmute-checking, which expose some details, but /// not the whole concrete type of the `impl Trait`. All, diff --git a/compiler/rustc_mir_build/src/build/expr/as_rvalue.rs b/compiler/rustc_mir_build/src/build/expr/as_rvalue.rs index b6728c6b2ce..7c34b996055 100644 --- a/compiler/rustc_mir_build/src/build/expr/as_rvalue.rs +++ b/compiler/rustc_mir_build/src/build/expr/as_rvalue.rs @@ -96,7 +96,7 @@ fn expr_as_rvalue( ExprKind::Box { value } => { let value = this.hir.mirror(value); // The `Box` temporary created here is not a part of the HIR, - // and therefore is not considered during generator OIBIT + // and therefore is not considered during generator auto-trait // determination. See the comment about `box` at `yield_in_scope`. let result = this.local_decls.push(LocalDecl::new(expr.ty, expr_span).internal()); this.cfg.push( diff --git a/src/test/rustdoc/auxiliary/rustdoc-impl-parts-crosscrate.rs b/src/test/rustdoc/auxiliary/rustdoc-impl-parts-crosscrate.rs index 46adf2e6bc0..135987fc00d 100644 --- a/src/test/rustdoc/auxiliary/rustdoc-impl-parts-crosscrate.rs +++ b/src/test/rustdoc/auxiliary/rustdoc-impl-parts-crosscrate.rs @@ -1,3 +1,3 @@ #![feature(auto_traits)] -pub auto trait AnOibit {} +pub auto trait AnAutoTrait {} diff --git a/src/test/rustdoc/impl-parts-crosscrate.rs b/src/test/rustdoc/impl-parts-crosscrate.rs index a68db9c70ad..6c5e79d5aa3 100644 --- a/src/test/rustdoc/impl-parts-crosscrate.rs +++ b/src/test/rustdoc/impl-parts-crosscrate.rs @@ -12,9 +12,9 @@ pub struct Bar { t: T } // full impl string. Instead, just make sure something from each part // is mentioned. -// @has implementors/rustdoc_impl_parts_crosscrate/trait.AnOibit.js Bar +// @has implementors/rustdoc_impl_parts_crosscrate/trait.AnAutoTrait.js Bar // @has - Send -// @has - !AnOibit +// @has - !AnAutoTrait // @has - Copy -impl !rustdoc_impl_parts_crosscrate::AnOibit for Bar +impl !rustdoc_impl_parts_crosscrate::AnAutoTrait for Bar where T: Copy {} diff --git a/src/test/rustdoc/impl-parts.rs b/src/test/rustdoc/impl-parts.rs index 5e9e84a554b..90110babea7 100644 --- a/src/test/rustdoc/impl-parts.rs +++ b/src/test/rustdoc/impl-parts.rs @@ -1,12 +1,12 @@ #![feature(negative_impls)] #![feature(auto_traits)] -pub auto trait AnOibit {} +pub auto trait AnAutoTrait {} pub struct Foo { field: T } // @has impl_parts/struct.Foo.html '//*[@class="impl"]//code' \ -// "impl !AnOibit for Foo where T: Sync," -// @has impl_parts/trait.AnOibit.html '//*[@class="item-list"]//code' \ -// "impl !AnOibit for Foo where T: Sync," -impl !AnOibit for Foo where T: Sync {} +// "impl !AnAutoTrait for Foo where T: Sync," +// @has impl_parts/trait.AnAutoTrait.html '//*[@class="item-list"]//code' \ +// "impl !AnAutoTrait for Foo where T: Sync," +impl !AnAutoTrait for Foo where T: Sync {} diff --git a/src/test/ui/phantom-oibit.rs b/src/test/ui/phantom-auto-trait.rs similarity index 73% rename from src/test/ui/phantom-oibit.rs rename to src/test/ui/phantom-auto-trait.rs index 14d6f951fa6..0172ca335c3 100644 --- a/src/test/ui/phantom-oibit.rs +++ b/src/test/ui/phantom-auto-trait.rs @@ -1,5 +1,5 @@ -// Ensure that OIBIT checks `T` when it encounters a `PhantomData` field, instead of checking -// the `PhantomData` type itself (which almost always implements an auto trait) +// Ensure that auto trait checks `T` when it encounters a `PhantomData` field, instead of +// checking the `PhantomData` type itself (which almost always implements an auto trait). #![feature(auto_traits)] diff --git a/src/test/ui/phantom-oibit.stderr b/src/test/ui/phantom-auto-trait.stderr similarity index 94% rename from src/test/ui/phantom-oibit.stderr rename to src/test/ui/phantom-auto-trait.stderr index 8a02f23da94..779919f9d64 100644 --- a/src/test/ui/phantom-oibit.stderr +++ b/src/test/ui/phantom-auto-trait.stderr @@ -1,5 +1,5 @@ error[E0277]: `T` cannot be shared between threads safely - --> $DIR/phantom-oibit.rs:21:12 + --> $DIR/phantom-auto-trait.rs:21:12 | LL | fn is_zen(_: T) {} | --- required by this bound in `is_zen` @@ -16,7 +16,7 @@ LL | fn not_sync(x: Guard) { | ^^^^^^ error[E0277]: `T` cannot be shared between threads safely - --> $DIR/phantom-oibit.rs:26:12 + --> $DIR/phantom-auto-trait.rs:26:12 | LL | fn is_zen(_: T) {} | --- required by this bound in `is_zen` diff --git a/src/test/ui/traits/traits-inductive-overflow-supertrait-oibit.rs b/src/test/ui/traits/traits-inductive-overflow-supertrait-auto-trait.rs similarity index 65% rename from src/test/ui/traits/traits-inductive-overflow-supertrait-oibit.rs rename to src/test/ui/traits/traits-inductive-overflow-supertrait-auto-trait.rs index 21f299505cc..5fea47a1be8 100644 --- a/src/test/ui/traits/traits-inductive-overflow-supertrait-oibit.rs +++ b/src/test/ui/traits/traits-inductive-overflow-supertrait-auto-trait.rs @@ -1,5 +1,5 @@ -// OIBIT-based version of #29859, supertrait version. Test that using -// a simple OIBIT `..` impl alone still doesn't allow arbitrary bounds +// Auto-trait-based version of #29859, supertrait version. Test that using +// a simple auto trait `..` impl alone still doesn't allow arbitrary bounds // to be synthesized. #![feature(auto_traits)] diff --git a/src/test/ui/traits/traits-inductive-overflow-supertrait-oibit.stderr b/src/test/ui/traits/traits-inductive-overflow-supertrait-auto-trait.stderr similarity index 85% rename from src/test/ui/traits/traits-inductive-overflow-supertrait-oibit.stderr rename to src/test/ui/traits/traits-inductive-overflow-supertrait-auto-trait.stderr index c11234ee48a..140ffa4b079 100644 --- a/src/test/ui/traits/traits-inductive-overflow-supertrait-oibit.stderr +++ b/src/test/ui/traits/traits-inductive-overflow-supertrait-auto-trait.stderr @@ -1,5 +1,5 @@ error[E0568]: auto traits cannot have super traits - --> $DIR/traits-inductive-overflow-supertrait-oibit.rs:8:19 + --> $DIR/traits-inductive-overflow-supertrait-auto-trait.rs:8:19 | LL | auto trait Magic: Copy {} | ----- ^^^^ help: remove the super traits @@ -7,7 +7,7 @@ LL | auto trait Magic: Copy {} | auto trait cannot have super traits error[E0277]: the trait bound `NoClone: Copy` is not satisfied - --> $DIR/traits-inductive-overflow-supertrait-oibit.rs:16:23 + --> $DIR/traits-inductive-overflow-supertrait-auto-trait.rs:16:23 | LL | fn copy(x: T) -> (T, T) { (x, x) } | ----- required by this bound in `copy` -- GitLab