Previously we would only generate a list of synthetic implementations for two well known traits – Send and Sync. With this patch all the auto traits known to rustc are considered. This includes such traits like Unpin and user’s own traits. Sadly the implementation still iterates through the list of crate items and checks them against the traits, which for non-std crates containing their own auto-traits will still not include types defined in std/core. It is an improvement nontheless.
13 lines
307 B
Rust
13 lines
307 B
Rust
#![crate_name = "foo"]
|
|
|
|
#![feature(optin_builtin_traits)]
|
|
|
|
pub struct Foo;
|
|
|
|
// @has foo/struct.Foo.html
|
|
// @!has - 'Auto Trait Implementations'
|
|
impl !Send for Foo {}
|
|
impl !Sync for Foo {}
|
|
impl !std::marker::Unpin for Foo {}
|
|
impl !std::panic::RefUnwindSafe for Foo {}
|
|
impl !std::panic::UnwindSafe for Foo {}
|