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>.
This commit is contained in:
parent
32da90b431
commit
810324d1f3
54 changed files with 78 additions and 62 deletions
|
@ -16,7 +16,7 @@ unsafe.
|
|||
This will compile:
|
||||
|
||||
```ignore (ignore auto_trait future compatibility warning)
|
||||
#![feature(optin_builtin_traits)]
|
||||
#![feature(auto_traits)]
|
||||
|
||||
struct Foo;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ or enum type.
|
|||
Erroneous code example:
|
||||
|
||||
```compile_fail,E0321
|
||||
#![feature(optin_builtin_traits)]
|
||||
#![feature(auto_traits)]
|
||||
|
||||
struct Foo;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ Generics have been used on an auto trait.
|
|||
Erroneous code example:
|
||||
|
||||
```compile_fail,E0567
|
||||
#![feature(optin_builtin_traits)]
|
||||
#![feature(auto_traits)]
|
||||
|
||||
auto trait Generic<T> {} // error!
|
||||
# fn main() {}
|
||||
|
@ -16,7 +16,7 @@ parameters.
|
|||
To fix this issue, just remove the generics:
|
||||
|
||||
```
|
||||
#![feature(optin_builtin_traits)]
|
||||
#![feature(auto_traits)]
|
||||
|
||||
auto trait Generic {} // ok!
|
||||
# fn main() {}
|
||||
|
|
|
@ -3,7 +3,7 @@ A super trait has been added to an auto trait.
|
|||
Erroneous code example:
|
||||
|
||||
```compile_fail,E0568
|
||||
#![feature(optin_builtin_traits)]
|
||||
#![feature(auto_traits)]
|
||||
|
||||
auto trait Bound : Copy {} // error!
|
||||
|
||||
|
@ -18,7 +18,7 @@ all the existing types could implement `Bound` because very few of them have the
|
|||
To fix this issue, just remove the super trait:
|
||||
|
||||
```
|
||||
#![feature(optin_builtin_traits)]
|
||||
#![feature(auto_traits)]
|
||||
|
||||
auto trait Bound {} // ok!
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue