/src/test/rustdoc/auto-traits.rs

https://gitlab.com/jianglu/rust · Rust · 23 lines · 5 code · 6 blank · 12 comment · 0 complexity · 3a7fd880a96994e1c233508e8d0975ac MD5 · raw file

  1. // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
  2. // file at the top-level directory of this distribution and at
  3. // http://rust-lang.org/COPYRIGHT.
  4. //
  5. // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
  6. // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
  7. // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
  8. // option. This file may not be copied, modified, or distributed
  9. // except according to those terms.
  10. // aux-build:auto-traits.rs
  11. #![feature(optin_builtin_traits)]
  12. #![crate_name = "foo"]
  13. extern crate auto_traits;
  14. // @has 'foo/trait.Foo.html' '//pre' 'pub unsafe auto trait Foo'
  15. pub unsafe auto trait Foo {}
  16. // @has 'foo/trait.Bar.html' '//pre' 'pub unsafe auto trait Bar'
  17. pub use auto_traits::Bar;