From fe6227eb3c8533200c52dffa42ef1b6f2f02c40e Mon Sep 17 00:00:00 2001 From: Gus Wynn Date: Mon, 30 Aug 2021 13:42:38 -0700 Subject: [PATCH] =?UTF-8?q?update=20lifetime-elision=20to=20show=20what=20?= =?UTF-8?q?elided=20code=20under=20`rust=5F2018=5Fidi=E2=80=A6=20(#306)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was a bit confusing for me to read, as it was using an old style of rust that I am not used to Unfortunately, this lint group isn't on by default, but I think `elided_lifetimes_in_paths` may be on track to be deny-by-default in edition 2021? --- src/lifetime-elision.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lifetime-elision.md b/src/lifetime-elision.md index dfa45ec..9e210c7 100644 --- a/src/lifetime-elision.md +++ b/src/lifetime-elision.md @@ -63,5 +63,6 @@ fn args(&mut self, args: &[T]) -> &mut Command // el fn args<'a, 'b, T: ToCStr>(&'a mut self, args: &'b [T]) -> &'a mut Command // expanded fn new(buf: &mut [u8]) -> BufWriter; // elided +fn new(buf: &mut [u8]) -> BufWriter<'_>; // elided (with `rust_2018_idioms`) fn new<'a>(buf: &'a mut [u8]) -> BufWriter<'a> // expanded ```