File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed
compiler/rustc_builtin_macros/src Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -1316,8 +1316,6 @@ pub fn expand_preparsed_format_args(
13161316 . map ( |span| fmt_span. from_inner ( InnerSpan :: new ( span. start , span. end ) ) )
13171317 . collect ( ) ;
13181318
1319- let named_pos: FxHashSet < usize > = names. values ( ) . cloned ( ) . collect ( ) ;
1320-
13211319 let mut cx = Context {
13221320 ecx,
13231321 args,
@@ -1388,11 +1386,9 @@ pub fn expand_preparsed_format_args(
13881386 . enumerate ( )
13891387 . filter ( |( i, ty) | ty. is_empty ( ) && !cx. count_positions . contains_key ( & i) )
13901388 . map ( |( i, _) | {
1391- let msg = if named_pos. contains ( & i) {
1392- // named argument
1389+ let msg = if cx. args [ i] . name . is_some ( ) {
13931390 "named argument never used"
13941391 } else {
1395- // positional argument
13961392 "argument never used"
13971393 } ;
13981394 ( cx. args [ i] . expr . span , msg)
You can’t perform that action at this time.
0 commit comments