dmd.mustuse
Compile-time checks associated with the @mustuse
attribute.
License
Source: mustuse.d
Documentation: https://dlang.org/phobos/dmd_mustuse.html
-
Declaration
bool
checkMustUse
(Expressione
, Scope*sc
);Check whether discarding an expression would violate the requirements of @mustuse. If so, emit an error.
Parameters
Expression
e
the expression to check
Scope*
sc
scope in which
was semantically analyzede
Return Value
true
on error,false
on success. -
Declaration
void
checkMustUseReserved
(Dsymbolsym
);Called from a symbol's semantic to check for reserved usage of @mustuse.
Discussion
If such usage is found, emits an errror.
Parameters
Dsymbol
sym
symbol to check