Use doc(notable_trait)
There is an unstable feature that puts up a little 'i' in a circle next to any function that returns a type that implements an notable trait. For us this means we can make the extension traits more discoverable. ref: https://doc.rust-lang.org/unstable-book/language-features/doc-notable-trait.html Close: #3232
This commit is contained in:
parent
77a8f076b8
commit
dfb76c1e15
|
@ -252,6 +252,7 @@ macro_rules! define_extension_trait {
|
|||
fn $fn:ident$(<$($gen:ident: $gent:path),*>)?($($params:tt)*) $( -> $ret:ty )? $body:block
|
||||
)*
|
||||
}) => {
|
||||
#[cfg_attr(docsrs, doc(notable_trait))]
|
||||
$(#[$($trait_attrs)*])* $trait_vis trait $trait_name: sealed::Sealed {
|
||||
$(
|
||||
$crate::internal_macros::only_doc_attrs! {
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#![cfg_attr(all(not(feature = "std"), not(test)), no_std)]
|
||||
// Experimental features we need.
|
||||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||
#![cfg_attr(docsrs, feature(doc_notable_trait))]
|
||||
#![cfg_attr(bench, feature(test))]
|
||||
// Coding conventions.
|
||||
#![warn(missing_docs)]
|
||||
|
|
Loading…
Reference in New Issue