File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -172,7 +172,8 @@ fn parse_args<'a>(
172172 let e = p. parse_expr ( ) ?;
173173 if let Some ( prev) = names. get ( & name) {
174174 ecx. struct_span_err ( e. span , & format ! ( "duplicate argument named `{}`" , name) )
175- . span_note ( args[ * prev] . span , "previously here" )
175+ . span_label ( args[ * prev] . span , "previously here" )
176+ . span_label ( e. span , "duplicate argument" )
176177 . emit ( ) ;
177178 continue ;
178179 }
Original file line number Diff line number Diff line change @@ -138,13 +138,9 @@ error: duplicate argument named `foo`
138138 --> $DIR/ifmt-bad-arg.rs:40:33
139139 |
140140LL | format!("{foo}", foo=1, foo=2);
141- | ^
142- |
143- note: previously here
144- --> $DIR/ifmt-bad-arg.rs:40:26
145- |
146- LL | format!("{foo}", foo=1, foo=2);
147- | ^
141+ | - ^ duplicate argument
142+ | |
143+ | previously here
148144
149145error: positional arguments cannot follow named arguments
150146 --> $DIR/ifmt-bad-arg.rs:41:35
You can’t perform that action at this time.
0 commit comments