use fmt_macros as parse;
-use crate::errors::DiagnosticBuilder;
-use crate::errors::Applicability;
+use errors::DiagnosticBuilder;
+use errors::Applicability;
use syntax::ast;
use syntax::ext::base::{self, *};
self.ecx.expr_str(sp, s)
}
- /// Build a static `rt::Argument` from a `parse::Piece` or append
+ /// Builds a static `rt::Argument` from a `parse::Piece` or append
/// to the `literal` string.
fn build_piece(&mut self,
piece: &parse::Piece<'_>,
}
/// Actually builds the expression which the format_args! block will be
- /// expanded to
+ /// expanded to.
fn into_expr(self) -> P<ast::Expr> {
let mut locals = Vec::with_capacity(
(0..self.args.len()).map(|i| self.arg_unique_types[i].len()).sum()
//if !ecx.ecfg.enable_allow_internal_unstable() {
// For some reason, the only one that actually works for `println` is the first check
- if !sp.allows_unstable() // the enclosing span is marked as `#[allow_insternal_unsable]`
+ if !sp.allows_unstable("format_args_nl") // the span is marked as `#[allow_insternal_unsable]`
&& !ecx.ecfg.enable_allow_internal_unstable() // NOTE: when is this enabled?
&& !ecx.ecfg.enable_format_args_nl() // enabled using `#[feature(format_args_nl]`
{
},
};
- /// Find the indices of all characters that have been processed and differ between the actual
+ /// Finds the indices of all characters that have been processed and differ between the actual
/// written code (code snippet) and the `InternedString` that get's processed in the `Parser`
/// in order to properly synthethise the intra-string `Span`s for error diagnostics.
fn find_skips(snippet: &str, is_raw: bool) -> Vec<usize> {