do not link non existant functions in the base library
This commit is contained in:
		
							parent
							
								
									284c005e4e
								
							
						
					
					
						commit
						c702d832f4
					
				
					 3 changed files with 5 additions and 155 deletions
				
			
		| 
						 | 
				
			
			@ -62,6 +62,8 @@ macro_rules! derive_command_into_packet {
 | 
			
		|||
                #[doc = "Tries to turn a [`" $command_type "`] into a [Packet]."]
 | 
			
		||||
                ///
 | 
			
		||||
                /// Returns: NULL or a [Packet] containing the command.
 | 
			
		||||
                ///
 | 
			
		||||
                /// [Packet]: [`servicepoint::Packet`]
 | 
			
		||||
                fn try_into_packet(move instance) -> move_ok *mut ::servicepoint::Packet {
 | 
			
		||||
                    instance.try_into()
 | 
			
		||||
                };
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,9 +14,7 @@ macro_rules! derive_clone {
 | 
			
		|||
    ($object_type:ident) => {
 | 
			
		||||
        $crate::macros::wrap_method!($object_type;
 | 
			
		||||
            #[doc = concat!("Clones a [`", stringify!($object_type), "`] instance.")]
 | 
			
		||||
            fn clone(ref instance) -> move ::core::ptr::NonNull<$object_type> {
 | 
			
		||||
                instance.clone()
 | 
			
		||||
            };
 | 
			
		||||
            fn clone(ref instance) -> move ::core::ptr::NonNull<$object_type>;
 | 
			
		||||
        );
 | 
			
		||||
    };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -31,6 +29,8 @@ macro_rules! wrap_method {
 | 
			
		|||
        ::paste::paste!{
 | 
			
		||||
            $crate::macros::wrap_method!(
 | 
			
		||||
                $object_type;
 | 
			
		||||
                #[doc = " Calls method [`" $object_type "::" $function "`]."]
 | 
			
		||||
                ///
 | 
			
		||||
                $(#[$meta])+
 | 
			
		||||
                fn $function($ref_or_mut $instance $(, $($param_name: $param_modifier $param_type),*)?)
 | 
			
		||||
                $(-> $return_modifier $return_type)? {
 | 
			
		||||
| 
						 | 
				
			
			@ -47,8 +47,6 @@ macro_rules! wrap_method {
 | 
			
		|||
    ) => {
 | 
			
		||||
        paste::paste! {
 | 
			
		||||
            $crate::macros::wrap_functions!([< $object_type:lower >];
 | 
			
		||||
                #[doc = " Calls method [`servicepoint::" $object_type "::" $function "`]."]
 | 
			
		||||
                ///
 | 
			
		||||
                $(#[$meta])*
 | 
			
		||||
                fn $function(
 | 
			
		||||
                    $instance: $ref_or_mut ::core::ptr::NonNull<$object_type>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue