if $c:expr { Some($r:expr) } else { None } =>> $c.then(|| $r)
This commit is contained in:
@@ -271,7 +271,7 @@ impl<'a> AstValidator<'a> {
|
||||
|
||||
self.session.emit_err(InvalidVisibility {
|
||||
span: vis.span,
|
||||
implied: if vis.kind.is_pub() { Some(vis.span) } else { None },
|
||||
implied: vis.kind.is_pub().then(|| vis.span),
|
||||
note,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user