<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/rust.git/src/test/ui/macros/issue-98466.stderr, branch master</title>
<subtitle>github.com: rust-lang/rust.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/rust.git/'/>
<entry>
<title>Move /src/test to /tests</title>
<updated>2023-01-11T09:32:08+00:00</updated>
<author>
<name>Albert Larsan</name>
<email>74931857+albertlarsan68@users.noreply.github.com</email>
</author>
<published>2023-01-05T08:13:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/rust.git/commit/?id=cf2dff2b1e3fa55fa5415d524200070d0d7aacfe'/>
<id>cf2dff2b1e3fa55fa5415d524200070d0d7aacfe</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve position named arguments lint underline and formatting names</title>
<updated>2022-08-02T06:20:44+00:00</updated>
<author>
<name>Preston From</name>
<email>prestonfrom@gmail.com</email>
</author>
<published>2022-07-30T04:52:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/rust.git/commit/?id=d0ea440dfe8659debd01246b5f2b8448abfb1e8b'/>
<id>d0ea440dfe8659debd01246b5f2b8448abfb1e8b</id>
<content type='text'>
For named arguments used as implicit position arguments, underline both
the opening curly brace and either:
* if there is formatting, the next character (which will either be the
  closing curl brace or the `:` denoting the start of formatting args)
* if there is no formatting, the entire arg span (important if there is
  whitespace like `{  }`)

This should make it more obvious where the named argument should be.

Additionally, in the lint message, emit the formatting argument names
without a dollar sign to avoid potentially confusion.

Fixes #99907
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For named arguments used as implicit position arguments, underline both
the opening curly brace and either:
* if there is formatting, the next character (which will either be the
  closing curl brace or the `:` denoting the start of formatting args)
* if there is no formatting, the entire arg span (important if there is
  whitespace like `{  }`)

This should make it more obvious where the named argument should be.

Additionally, in the lint message, emit the formatting argument names
without a dollar sign to avoid potentially confusion.

Fixes #99907
</pre>
</div>
</content>
</entry>
<entry>
<title>Generate correct suggestion with named arguments used positionally</title>
<updated>2022-07-25T06:00:27+00:00</updated>
<author>
<name>Preston From</name>
<email>prestonfrom@gmail.com</email>
</author>
<published>2022-07-16T21:13:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/rust.git/commit/?id=3330c7d1c3bcfd2c452b794db66705b92fb54a3c'/>
<id>3330c7d1c3bcfd2c452b794db66705b92fb54a3c</id>
<content type='text'>
Address issue #99265 by checking each positionally used argument
to see if the argument is named and adding a lint to use the name
instead. This way, when named arguments are used positionally in a
different order than their argument order, the suggested lint is
correct.

For example:
```
println!("{b} {}", a=1, b=2);
```
This will now generate the suggestion:
```
println!("{b} {a}", a=1, b=2);
```

Additionally, this check now also correctly replaces or inserts
only where the positional argument is (or would be if implicit).
Also, width and precision are replaced with their argument names
when they exists.

Since the issues were so closely related, this fix for issue #99265
also fixes issue #99266.

Fixes #99265
Fixes #99266
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Address issue #99265 by checking each positionally used argument
to see if the argument is named and adding a lint to use the name
instead. This way, when named arguments are used positionally in a
different order than their argument order, the suggested lint is
correct.

For example:
```
println!("{b} {}", a=1, b=2);
```
This will now generate the suggestion:
```
println!("{b} {a}", a=1, b=2);
```

Additionally, this check now also correctly replaces or inserts
only where the positional argument is (or would be if implicit).
Also, width and precision are replaced with their argument names
when they exists.

Since the issues were so closely related, this fix for issue #99265
also fixes issue #99266.

Fixes #99265
Fixes #99266
</pre>
</div>
</content>
</entry>
<entry>
<title>Emit warning when named arguments are used positionally in format</title>
<updated>2022-07-13T21:34:10+00:00</updated>
<author>
<name>Preston From</name>
<email>prestonfrom@gmail.com</email>
</author>
<published>2022-06-25T05:52:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/rust.git/commit/?id=1219f72f9049817cf5933112f75bbddf360a7a1f'/>
<id>1219f72f9049817cf5933112f75bbddf360a7a1f</id>
<content type='text'>
Addresses Issue 98466 by emitting a warning if a named argument
is used like a position argument (i.e. the name is not used in
the string to be formatted).

Fixes rust-lang#98466
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Addresses Issue 98466 by emitting a warning if a named argument
is used like a position argument (i.e. the name is not used in
the string to be formatted).

Fixes rust-lang#98466
</pre>
</div>
</content>
</entry>
</feed>
