Use explicitly-named args in impl_render_with_display
(#328)
* Use explicitly-named args in `impl_render_with_display` Implicitly-named args were failing on Rust 1.57 (but worked on Nightly). * Fix macro formatting Also add a TODO comment to revert later. Co-authored-by: Chris Wong <lambda.fairy@gmail.com>
This commit is contained in:
parent
6e3222f57a
commit
26cdad9991
1 changed files with 2 additions and 1 deletions
|
@ -155,7 +155,8 @@ macro_rules! impl_render_with_display {
|
||||||
$(
|
$(
|
||||||
impl Render for $ty {
|
impl Render for $ty {
|
||||||
fn render_to(&self, w: &mut String) {
|
fn render_to(&self, w: &mut String) {
|
||||||
format_args!("{self}").render_to(w);
|
// TODO: remove the explicit arg when Rust 1.58 is released
|
||||||
|
format_args!("{self}", self = self).render_to(w);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)*
|
)*
|
||||||
|
|
Loading…
Add table
Reference in a new issue