diff options
| author | Matthew Jasper <mjjasper1@gmail.com> | 2019-08-05 23:10:32 +0100 |
|---|---|---|
| committer | Matthew Jasper <mjjasper1@gmail.com> | 2019-08-05 23:50:47 +0100 |
| commit | d9d9246418ae884cb67feb3574832696660b8e2e (patch) | |
| tree | 7c1057d7534bd270c9c4460bed00d3043771312c /src/libsyntax_ext | |
| parent | 7b41fd215893c06110c7f650be47efed3910d90b (diff) | |
| download | rust-d9d9246418ae884cb67feb3574832696660b8e2e.tar.gz rust-d9d9246418ae884cb67feb3574832696660b8e2e.zip | |
Remove gensym from format_args
Diffstat (limited to 'src/libsyntax_ext')
| -rw-r--r-- | src/libsyntax_ext/format.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax_ext/format.rs b/src/libsyntax_ext/format.rs index fe9cad1e32f..1dfcc14021c 100644 --- a/src/libsyntax_ext/format.rs +++ b/src/libsyntax_ext/format.rs @@ -646,7 +646,7 @@ impl<'a, 'b> Context<'a, 'b> { let mut heads = Vec::with_capacity(self.args.len()); let names_pos: Vec<_> = (0..self.args.len()) - .map(|i| self.ecx.ident_of(&format!("arg{}", i)).gensym()) + .map(|i| ast::Ident::from_str_and_span(&format!("arg{}", i), self.macsp)) .collect(); // First, build up the static array which will become our precompiled @@ -843,7 +843,7 @@ pub fn expand_preparsed_format_args( let arg_unique_types: Vec<_> = (0..args.len()).map(|_| Vec::new()).collect(); let mut macsp = ecx.call_site(); - macsp = macsp.apply_mark(ecx.current_expansion.id); + macsp = macsp.with_ctxt(ecx.backtrace()); let msg = "format argument must be a string literal"; let fmt_sp = efmt.span; |
