<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/test/ui/lint/dead-code/unused-enum.stderr, branch master</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=master</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2023-01-11T09:32:08+00:00</updated>
<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.dreamy.place/mirrors/rust/commit/?id=cf2dff2b1e3fa55fa5415d524200070d0d7aacfe'/>
<id>urn:sha1:cf2dff2b1e3fa55fa5415d524200070d0d7aacfe</id>
<content type='text'>
</content>
</entry>
<entry>
<title>collapse dead code warnings into a single diagnostic</title>
<updated>2022-06-19T09:32:56+00:00</updated>
<author>
<name>Takayuki Maeda</name>
<email>takoyaki0316@gmail.com</email>
</author>
<published>2022-06-10T03:14:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3a023e7e589c469c2c761c73eeab9c238818e94b'/>
<id>urn:sha1:3a023e7e589c469c2c761c73eeab9c238818e94b</id>
<content type='text'>
add comments in `store_dead_field_or_variant`

support multiple log level

add a item ident label

fix ui tests

fix a ui test

fix a rustdoc ui test

use let chain

refactor: remove `store_dead_field_or_variant`

fix a tiny bug
</content>
</entry>
<entry>
<title>Normalise notes with the/is</title>
<updated>2020-01-24T16:24:50+00:00</updated>
<author>
<name>varkor</name>
<email>github@varkor.com</email>
</author>
<published>2020-01-22T23:57:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=24a2929ed1d3e1760bf89c878352448fb5ee2087'/>
<id>urn:sha1:24a2929ed1d3e1760bf89c878352448fb5ee2087</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use ident instead of def_span in dead-code pass</title>
<updated>2019-10-27T01:42:52+00:00</updated>
<author>
<name>Pi Lanningham</name>
<email>pi.lanningham@gmail.com</email>
</author>
<published>2019-10-25T18:46:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7985510e37b91cab66a808ef6b3e4110e369dc9e'/>
<id>urn:sha1:7985510e37b91cab66a808ef6b3e4110e369dc9e</id>
<content type='text'>
According to @estebank, def_span scans forward on the line until it finds a {,
and if it can't find one, fallse back to the span for the whole item.  This
was apparently written before the identifier span was explicitly tracked on
each node.

This means that if an unused function signature spans multiple lines, the
entire function (potentially hundreds of lines) gets flagged as dead code.
This could, for example, cause IDEs to add error squiggly's to the whole
function.

By using the span from the ident instead, we narrow the scope of this in
most cases.  In a wider sense, it's probably safe to use ident.span
instead of def_span in most locations throughout the whole code base,
but since this is my first contribution, I kept it small.

Some interesting points that came up while I was working on this:
 - I reorganized the tests a bit to bring some of the dead code ones all
   into the same location
 - A few tests were for things unrelated to dead code (like the
   path-lookahead for parens), so I added #![allow(dead_code)] and
   cleaned up the stderr file to reduce noise in the future
 - The same fix doesn't apply to const and static declarations.  I tried
   adding these cases to the match expression, but that created a much
   wider change to tests and error messages, so I left it off until I
   could get some code review to validate the approach.
</content>
</entry>
<entry>
<title>Move dead_code related tests to test/ui/dead-code</title>
<updated>2019-10-27T01:42:52+00:00</updated>
<author>
<name>Pi Lanningham</name>
<email>pi.lanningham@gmail.com</email>
</author>
<published>2019-10-25T04:42:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e063ddb12e1e1d2ca0ab05b9976ee1d0b20a34e1'/>
<id>urn:sha1:e063ddb12e1e1d2ca0ab05b9976ee1d0b20a34e1</id>
<content type='text'>
This helps organize the tests better.  I also renamed several of the tests to remove redundant dead-code in the path, and better match what they're testing
</content>
</entry>
</feed>
