Skip to content

Commit 9846c51

Browse files
kiendangtyranron
andauthored
Make rustc linter happy with upcoming lints (#486)
- Satisfy a new `mismatched-lifetime-syntaxes` lint introduced in rust-lang/rust#138677. - Fix `dead_code` warnings probably since rust-lang/rust#142485. Co-authored-by: Kai Ren <tyranron@gmail.com>
1 parent 92da5d8 commit 9846c51

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

impl/src/fmt/parsing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ pub(crate) fn format(input: &str) -> Option<(LeftToParse<'_>, Format<'_>)> {
280280
/// ```
281281
///
282282
/// [0]: std::fmt#syntax
283-
fn argument(input: &str) -> Option<(LeftToParse<'_>, Argument)> {
283+
fn argument(input: &str) -> Option<(LeftToParse<'_>, Argument<'_>)> {
284284
alt(&mut [
285285
&mut map(identifier, |(i, ident)| (i, Argument::Identifier(ident))),
286286
&mut map(integer, |(i, int)| (i, Argument::Integer(int))),

tests/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![cfg_attr(not(feature = "std"), no_std)]
2+
#![allow(dead_code)] // some code is tested for type checking only
23

34
#[cfg(not(feature = "std"))]
45
#[macro_use]

0 commit comments

Comments
 (0)