The ErrorKind must have pub visibility. error_chain! does this implicitly.
This rule exists because Error, Result and ResultExt are always emitted with pub, so the ErrorKind needs to be pub to avoid "private type is exposed publicly" errors.
Instead, those three should only be pub if the ErrorKind is pub.
This rule exists because
Error
,Result
andResultExt
are always emitted withpub
, so theErrorKind
needs to bepub
to avoid "private type is exposed publicly" errors.Instead, those three should only be
pub
if theErrorKind
ispub
.