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>(
172
172
let e = p. parse_expr ( ) ?;
173
173
if let Some ( prev) = names. get ( & name) {
174
174
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" )
176
177
. emit ( ) ;
177
178
continue ;
178
179
}
Original file line number Diff line number Diff line change @@ -138,13 +138,9 @@ error: duplicate argument named `foo`
138
138
--> $DIR/ifmt-bad-arg.rs:40:33
139
139
|
140
140
LL | 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
148
144
149
145
error: positional arguments cannot follow named arguments
150
146
--> $DIR/ifmt-bad-arg.rs:41:35
You can’t perform that action at this time.
0 commit comments