Rollup merge of #55077 - ollie27:rustdoc_dyn_trait, r=QuietMisdreavus

rustdoc: Use dyn keyword when rendering dynamic traits

The dyn keyword has been stable for a while now so rustdoc should start using it.

r? @QuietMisdreavus
This commit is contained in:
kennytm 2018-10-18 10:47:24 +08:00
commit ed68f1a5aa
No known key found for this signature in database
GPG key ID: FEF6C8051D0E013C
4 changed files with 7 additions and 4 deletions

View file

@ -52,7 +52,7 @@ pub fn f(_: &(ToString + 'static)) {}
impl Bar {
// @has assoc_consts/struct.Bar.html '//*[@id="associatedconstant.F"]' \
// "const F: fn(_: &(ToString + 'static))"
// "const F: fn(_: &(dyn ToString + 'static))"
pub const F: fn(_: &(ToString + 'static)) = f;
}

View file

@ -15,8 +15,8 @@
extern crate rustdoc_trait_object_impl;
// @has issue_32881/trait.Bar.html
// @has - '//code' "impl<'a> Bar"
// @has - '//code' "impl<'a> Debug for Bar"
// @has - '//code' "impl<'a> dyn Bar"
// @has - '//code' "impl<'a> Debug for dyn Bar"
pub use rustdoc_trait_object_impl::Bar;

View file

@ -11,5 +11,5 @@
#![crate_name = "foo"]
// @has foo/fn.foo.html
// @has - '//*[@class="rust fn"]' "_: &(ToString + 'static)"
// @has - '//*[@class="rust fn"]' "_: &(dyn ToString + 'static)"
pub fn foo(_: &(ToString + 'static)) {}