diff options
| author | bors <bors@rust-lang.org> | 2018-08-22 19:59:52 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-08-22 19:59:52 +0000 |
| commit | f1b506af022fdcb054aa90da1fbcf8c0226292d0 (patch) | |
| tree | 43f9e1d2cac8d4a873e634ade9214a6c6baee42d /src/libsyntax_ext | |
| parent | b75b0471a8b87c44e0bd953d2a5c36d896128723 (diff) | |
| parent | f012b4c84e9b44b48510712be0ce64cc964b352a (diff) | |
| download | rust-f1b506af022fdcb054aa90da1fbcf8c0226292d0.tar.gz rust-f1b506af022fdcb054aa90da1fbcf8c0226292d0.zip | |
Auto merge of #53607 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 10 pull requests
Successful merges:
- #53418 (Mark some suggestions as MachineApplicable)
- #53431 (Moved some feature gate ui tests to correct location)
- #53442 (Update version of rls-data used with save-analysis)
- #53504 (Set applicability for more suggestions.)
- #53541 (Fix missing impl trait display as ret type)
- #53544 (Point at the trait argument when using unboxed closure)
- #53558 (Normalize source line and column numbers.)
- #53562 (Lament the invincibility of the Turbofish)
- #53574 (Suggest direct raw-pointer dereference)
- #53585 (Remove super old comment on function that parses items)
Failed merges:
- #53472 (Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.)
- #53563 (use String::new() instead of String::from(""), "".to_string(), "".to_owned() or "".into())
r? @ghost
Diffstat (limited to 'src/libsyntax_ext')
| -rw-r--r-- | src/libsyntax_ext/format.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsyntax_ext/format.rs b/src/libsyntax_ext/format.rs index bebf20b1a38..b23c2ec3db1 100644 --- a/src/libsyntax_ext/format.rs +++ b/src/libsyntax_ext/format.rs @@ -22,6 +22,7 @@ use syntax::ptr::P; use syntax::symbol::Symbol; use syntax::tokenstream; use syntax_pos::{MultiSpan, Span, DUMMY_SP}; +use errors::Applicability; use std::borrow::Cow; use std::collections::hash_map::Entry; @@ -791,10 +792,11 @@ pub fn expand_preparsed_format_args(ecx: &mut ExtCtxt, 0 => "{}".to_string(), _ => format!("{}{{}}", "{} ".repeat(args.len())), }; - err.span_suggestion( + err.span_suggestion_with_applicability( fmt_sp.shrink_to_lo(), "you might be missing a string literal to format with", format!("\"{}\", ", sugg_fmt), + Applicability::MaybeIncorrect, ); err.emit(); return DummyResult::raw_expr(sp); |
