}
}
+#[inline]
+pub(crate) fn format_constness_right(constness: ast::Const) -> &'static str {
+ match constness {
+ ast::Const::Yes(..) => " const",
+ ast::Const::No => "",
+ }
+}
+
#[inline]
pub(crate) fn format_defaultness(defaultness: ast::Defaultness) -> &'static str {
match defaultness {
Span::new(lo, hi, SyntaxContext::root())
}
+pub(crate) fn mk_sp_lo_plus_one(lo: BytePos) -> Span {
+ Span::new(lo, lo + BytePos(1), SyntaxContext::root())
+}
+
// Returns `true` if the given span does not intersect with file lines.
macro_rules! out_of_file_lines_range {
($self:ident, $span:expr) => {
| ast::ExprKind::Ret(..)
| ast::ExprKind::Tup(..)
| ast::ExprKind::Type(..)
- | ast::ExprKind::Yield(None) => false,
+ | ast::ExprKind::Yield(None)
+ | ast::ExprKind::Underscore => false,
}
}