Merge remote-tracking branch 'origin/master'

This commit is contained in:
nora 2022-06-18 10:31:18 +02:00
commit 012e5a0977
2 changed files with 16 additions and 6 deletions

View file

@ -49,11 +49,9 @@ pub fn my_macro(input: TokenStream) -> TokenStream {
let name = input.ident;
let generics1 = input.generics.params.iter().map(|p| match p {
GenericParam::Type(ty) => {
if ty.bounds.is_empty() {
quote!(#ty: 'static)
} else {
quote!(#ty + 'static)
}
let name = &ty.ident;
let bounds = ty.bounds.iter();
quote!(#name: #(#bounds +)* 'static)
}
other => other.to_token_stream(),
});

View file

@ -85,7 +85,7 @@ impl InternalAccursedUnutterableTypeId {
#[cfg(not(debug_assertions))]
impl InternalAccursedUnutterableTypeId {
pub fn new(n: u64) -> Self {
pub fn __internal_new(n: u64) -> Self {
Self(n)
}
fn inner(self) -> u64 {
@ -136,6 +136,18 @@ mod __doctest {
/// ```
mod complex {}
/// ```
/// use accursed_unutterable_type_id::AccursedUnutterablyTypeIdentified;
///
/// trait Sussy {}
///
/// #[derive(AccursedUnutterablyTypeIdentified)]
/// struct Uwu<T: Sussy, const N: usize> {
/// _x: [T; N],
/// }
/// ```
mod type_bounds {}
/// ```
/// use accursed_unutterable_type_id::AccursedUnutterablyTypeIdentified;
///