Ghost declarations
A ghost declarations annotation may appear anywhere a Rust item may appear, except that only a few kinds of ghost declarations are supported inside function bodies (see Block annotations).
Syntax
GhostDeclarationsAnnotation :/*@GhostDeclaration *@*/GhostDeclaration :
pubGhostDeclaration
|inductiveIDENTIFIER GenericParams ?=|? InductiveConstructor (|InductiveConstructor )*;
|fixIDENTIFIER GenericParams ?(Params)(->Type )? ({Expression}|;)
|predIDENTIFIER GenericParams ?(( Params;)? Params)(=Assertion )?;
|pred_ctorIDENTIFIER GenericParams ?(Params)(( Params;)? Params)=Assertion;
|predGenericParams ?<Type>.IDENTIFIER(( ParamNames;)? ParamNames)=Assertion;
|lemIDENTIFIER GenericParams ?(Params)(->Type )? LemmaRest
|fn_typeIDENTIFIER GenericParams ?(Params)=unsafefn(Params)(->Type )?;reqAssertion;ensAssertion;on_unwind_ensAssertion;
|lem_typeIDENTIFIER GenericParams ?(Params)=lem(Params)(->Type )?;reqAssertion;ensAssertion;
|let_lftLifetime=Expression;
|abstract_typeIDENTIFIER;InductiveConstructor : IDENTIFIER (
(( ParamType,)* ParamType))?LemmaRest :
LemmaSpecification{GhostCommand *}
|;LemmaSpecificationLemmaSpecification :
nonghost_callers_only?reqAssertion;ensAssertion;Params : (( Param
,)* Param )?Param : IDENTIFIER
:TypeParamNames : (( IDENTIFIER
,)* IDENTIFIER )?