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:
Tobin C. Harding 2024-10-30 15:54:29 +11:00
parent 77a8f076b8
commit dfb76c1e15
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
2 changed files with 2 additions and 0 deletions

View File

@ -252,6 +252,7 @@ macro_rules! define_extension_trait {
fn $fn:ident$(<$($gen:ident: $gent:path),*>)?($($params:tt)*) $( -> $ret:ty )? $body:block 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 { $(#[$($trait_attrs)*])* $trait_vis trait $trait_name: sealed::Sealed {
$( $(
$crate::internal_macros::only_doc_attrs! { $crate::internal_macros::only_doc_attrs! {

View File

@ -27,6 +27,7 @@
#![cfg_attr(all(not(feature = "std"), not(test)), no_std)] #![cfg_attr(all(not(feature = "std"), not(test)), no_std)]
// Experimental features we need. // Experimental features we need.
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![cfg_attr(docsrs, feature(doc_notable_trait))]
#![cfg_attr(bench, feature(test))] #![cfg_attr(bench, feature(test))]
// Coding conventions. // Coding conventions.
#![warn(missing_docs)] #![warn(missing_docs)]