<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/test/ui/panic-handler/panic-handler-duplicate.stderr, branch 1.51.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.51.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.51.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2020-08-22T22:41:49+00:00</updated>
<entry>
<title>Use smaller def span for functions</title>
<updated>2020-08-22T22:41:49+00:00</updated>
<author>
<name>Aaron Hill</name>
<email>aa1ronham@gmail.com</email>
</author>
<published>2020-08-12T21:02:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e3cd43eb0093a59c4ba98e44c13a8dacc9f4f9b1'/>
<id>urn:sha1:e3cd43eb0093a59c4ba98e44c13a8dacc9f4f9b1</id>
<content type='text'>
Currently, the def span of a funtion encompasses the entire function
signature and body. However, this is usually unnecessarily verbose - when we are
pointing at an entire function in a diagnostic, we almost always want to
point at the signature. The actual contents of the body tends to be
irrelevant to the diagnostic we are emitting, and just takes up
additional screen space.

This commit changes the `def_span` of all function items (freestanding
functions, `impl`-block methods, and `trait`-block methods) to be the
span of the signature. For example, the function

```rust
pub fn foo&lt;T&gt;(val: T) -&gt; T { val }
```

now has a `def_span` corresponding to `pub fn foo&lt;T&gt;(val: T) -&gt; T`
(everything before the opening curly brace).

Trait methods without a body have a `def_span` which includes the
trailing semicolon. For example:

```rust
trait Foo {
    fn bar();
}```

the function definition `Foo::bar` has a `def_span` of `fn bar();`

This makes our diagnostic output much shorter, and emphasizes
information that is relevant to whatever diagnostic we are reporting.

We continue to use the full span (including the body) in a few of
places:

* MIR building uses the full span when building source scopes.
* 'Outlives suggestions' use the full span to sort the diagnostics being
  emitted.
* The `#[rustc_on_unimplemented(enclosing_scope="in this scope")]`
attribute points the entire scope body.
* The 'unconditional recursion' lint uses the full span to show
  additional context for the recursive call.

All of these cases work only with local items, so we don't need to
add anything extra to crate metadata.
</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>Diagnostics should not end with a full stop</title>
<updated>2020-01-12T15:37:50+00:00</updated>
<author>
<name>varkor</name>
<email>github@varkor.com</email>
</author>
<published>2020-01-10T14:36:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8461fa51198ad5db1d070620fe4186aaec648438'/>
<id>urn:sha1:8461fa51198ad5db1d070620fe4186aaec648438</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Update tests</title>
<updated>2019-03-11T20:10:26+00:00</updated>
<author>
<name>Vadim Petrochenkov</name>
<email>vadim.petrochenkov@gmail.com</email>
</author>
<published>2019-03-09T12:03:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fa72a81bea27f1fda4287475e4cc2f684c971e7f'/>
<id>urn:sha1:fa72a81bea27f1fda4287475e4cc2f684c971e7f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove licenses</title>
<updated>2018-12-26T04:08:33+00:00</updated>
<author>
<name>Mark Rousskov</name>
<email>mark.simulacrum@gmail.com</email>
</author>
<published>2018-12-25T15:56:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2a663555ddf36f6b041445894a8c175cd1bc718c'/>
<id>urn:sha1:2a663555ddf36f6b041445894a8c175cd1bc718c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>stabilize `#[panic_handler]`</title>
<updated>2018-09-07T11:27:30+00:00</updated>
<author>
<name>Jorge Aparicio</name>
<email>jorge@japaric.io</email>
</author>
<published>2018-09-07T10:43:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=358fc5b62126f997a1c38ba4c8be60ae16e4a2c4'/>
<id>urn:sha1:358fc5b62126f997a1c38ba4c8be60ae16e4a2c4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>add #[panic_handler]; deprecate #[panic_implementation]</title>
<updated>2018-08-23T18:58:55+00:00</updated>
<author>
<name>Jorge Aparicio</name>
<email>jorge@japaric.io</email>
</author>
<published>2018-08-22T22:40:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a774c81f9855f75a1a86f71a851b373d2178d9e9'/>
<id>urn:sha1:a774c81f9855f75a1a86f71a851b373d2178d9e9</id>
<content type='text'>
</content>
</entry>
</feed>
