dmd.mustuse
Compile-time checks associated with the @mustuse attribute.
License
Source: mustuse.d
Documentation: https://dlang.org/phobos/dmd_mustuse.html
-
Declaration
boolcheckMustUse(Expressione, Scope*sc);Check whether discarding an expression would violate the requirements of @mustuse. If so, emit an error.
Parameters
Expressionethe expression to check
Scope*scscope in which
was semantically analyzedeReturn Value
trueon error,falseon success. -
Declaration
voidcheckMustUseReserved(Dsymbolsym);Called from a symbol's semantic to check for reserved usage of @mustuse.
Discussion
If such usage is found, emits an errror.
Parameters
Dsymbolsymsymbol to check