<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/test/ui/codemap_tests, branch 1.63.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.63.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.63.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2022-06-07T08:12:45+00:00</updated>
<entry>
<title>Auto merge of #97512 - scottmcm:add-coldcc, r=nagisa,lcnr</title>
<updated>2022-06-07T08:12:45+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2022-06-07T08:12:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=91cacb3faf987805675e39aca41859ec1fcabef3'/>
<id>urn:sha1:91cacb3faf987805675e39aca41859ec1fcabef3</id>
<content type='text'>
Add support for emitting functions with `coldcc` to LLVM

The eventual goal is to try using this for things like the internal panicking stuff, to see whether it helps.
</content>
</entry>
<entry>
<title>Mention filename in suggestion when it differs from primary span</title>
<updated>2022-06-01T16:52:03+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2022-05-31T23:38:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=310b1a9062ea785116f85e889380600e4943de21'/>
<id>urn:sha1:310b1a9062ea785116f85e889380600e4943de21</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Bless tests with the full list of conventions in the output</title>
<updated>2022-05-30T07:19:23+00:00</updated>
<author>
<name>Scott McMurray</name>
<email>scottmcm@users.noreply.github.com</email>
</author>
<published>2022-05-29T08:29:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=055cfaf10d3223dff3c703a2dfff1ca714fd6742'/>
<id>urn:sha1:055cfaf10d3223dff3c703a2dfff1ca714fd6742</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add more *-unwind ABI variants</title>
<updated>2022-02-02T21:21:24+00:00</updated>
<author>
<name>Amanieu d'Antras</name>
<email>amanieu@gmail.com</email>
</author>
<published>2022-02-01T17:53:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=547b4e601e797e7989f6fc9ebe921376c74bd1f0'/>
<id>urn:sha1:547b4e601e797e7989f6fc9ebe921376c74bd1f0</id>
<content type='text'>
The following *-unwind ABIs are now supported:
- "C-unwind"
- "cdecl-unwind"
- "stdcall-unwind"
- "fastcall-unwind"
- "vectorcall-unwind"
- "thiscall-unwind"
- "aapcs-unwind"
- "win64-unwind"
- "sysv64-unwind"
- "system-unwind"
</content>
</entry>
<entry>
<title>Suggest using a temporary variable to fix borrowck errors</title>
<updated>2021-12-10T22:34:00+00:00</updated>
<author>
<name>Noah Lev</name>
<email>camelidcamel@gmail.com</email>
</author>
<published>2021-03-15T22:09:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e27315268b10c9ef2f4c3d815dfc79f513327def'/>
<id>urn:sha1:e27315268b10c9ef2f4c3d815dfc79f513327def</id>
<content type='text'>
In Rust, nesting method calls with both require `&amp;mut` access to `self`
produces a borrow-check error:

    error[E0499]: cannot borrow `*self` as mutable more than once at a time
     --&gt; src/lib.rs:7:14
      |
    7 |     self.foo(self.bar());
      |     ---------^^^^^^^^^^-
      |     |    |   |
      |     |    |   second mutable borrow occurs here
      |     |    first borrow later used by call
      |     first mutable borrow occurs here

That's because Rust has a left-to-right evaluation order, and the method
receiver is passed first. Thus, the argument to the method cannot then
mutate `self`.

There's an easy solution to this error: just extract a local variable
for the inner argument:

    let tmp = self.bar();
    self.foo(tmp);

However, the error doesn't give any suggestion of how to solve the
problem. As a result, new users may assume that it's impossible to
express their code correctly and get stuck.

This commit adds a (non-structured) suggestion to extract a local
variable for the inner argument to solve the error. The suggestion uses
heuristics that eliminate most false positives, though there are a few
false negatives (cases where the suggestion should be emitted but is
not). Those other cases can be implemented in a future change.
</content>
</entry>
<entry>
<title>Fix a format_args span to be expansion</title>
<updated>2021-10-29T22:13:15+00:00</updated>
<author>
<name>Cameron Steffen</name>
<email>cam.steffen94@gmail.com</email>
</author>
<published>2021-10-21T14:01:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4cfb7add771367757ee2dd26da4e29d333c93cb6'/>
<id>urn:sha1:4cfb7add771367757ee2dd26da4e29d333c93cb6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Bless tests</title>
<updated>2021-10-15T07:36:58+00:00</updated>
<author>
<name>Cameron Steffen</name>
<email>cam.steffen94@gmail.com</email>
</author>
<published>2021-10-14T18:28:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=90f4521cfdfc85fc04759cfba2f86a6acc096cb3'/>
<id>urn:sha1:90f4521cfdfc85fc04759cfba2f86a6acc096cb3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use larger span for adjustments on method calls</title>
<updated>2021-09-25T15:00:41+00:00</updated>
<author>
<name>Aaron Hill</name>
<email>aa1ronham@gmail.com</email>
</author>
<published>2021-09-16T20:01:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4d66986e090abed11c1aae9602f23385f94154fa'/>
<id>urn:sha1:4d66986e090abed11c1aae9602f23385f94154fa</id>
<content type='text'>
Currently, we use a relatively 'small' span for THIR
expressions generated by an 'adjustment' (e.g. an autoderef,
autoborrow, unsizing). As a result, if a borrow generated
by an adustment ends up causing a borrowcheck error, for example:

```rust
let mut my_var = String::new();
let my_ref = &amp;my_var
my_var.push('a');
my_ref;
```

then the span for the mutable borrow may end up referring
to only the base expression (e.g. `my_var`), rather than
the method call which triggered the mutable borrow
(e.g. `my_var.push('a')`)

Due to a quirk of the MIR borrowck implementation,
this doesn't always get exposed in migration mode,
but it does in many cases.

This commit makes THIR building consistently use 'larger'
spans for adjustment expressions

The intent of this change it make it clearer to users
when it's the specific way in which a variable is
used (for example, in a method call) that produdes
a borrowcheck error. For example, an error message
claiming that a 'mutable borrow occurs here' might
be confusing if it just points at a usage of a variable
(e.g. `my_var`), when no `&amp;mut` is in sight. Pointing
at the entire expression should help to emphasize
that the method call itself is responsible for
the mutable borrow.

In several cases, this makes the `#![feature(nll)]` diagnostic
output match up exactly with the default (migration mode) output.
As a result, several `.nll.stderr` files end up getting removed
entirely.
</content>
</entry>
<entry>
<title>Show macro name in 'this error originates in macro' message</title>
<updated>2021-05-12T23:03:06+00:00</updated>
<author>
<name>Aaron Hill</name>
<email>aa1ronham@gmail.com</email>
</author>
<published>2021-02-13T19:52:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0dd9f118d973bb077c6ff0e2a57421ca2eecb81c'/>
<id>urn:sha1:0dd9f118d973bb077c6ff0e2a57421ca2eecb81c</id>
<content type='text'>
When there are multiple macros in use, it can be difficult to tell
which one was responsible for producing an error.
</content>
</entry>
<entry>
<title>Auto merge of #83729 - JohnTitor:issue-43913, r=estebank</title>
<updated>2021-04-23T23:44:49+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2021-04-23T23:44:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8ad0821b035e35aed07ec252c2dd831c15a4e26e'/>
<id>urn:sha1:8ad0821b035e35aed07ec252c2dd831c15a4e26e</id>
<content type='text'>
Add a suggestion when using a type alias instead of trait alias

Fixes #43913

r? `@estebank`
</content>
</entry>
</feed>
