<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/test/ui/array-slice-vec, branch 1.57.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.57.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.57.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2021-09-30T01:40:30+00:00</updated>
<entry>
<title>Auto merge of #89110 - Aaron1011:adjustment-span, r=estebank</title>
<updated>2021-09-30T01:40:30+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2021-09-30T01:40:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4aa7879b559ccf7f82bcce2a8e532ea307697ea9'/>
<id>urn:sha1:4aa7879b559ccf7f82bcce2a8e532ea307697ea9</id>
<content type='text'>
Use larger span for adjustment THIR expressions

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. These spans are recoded
when we first create the adjustment during typecheck. For
example, an autoref adjustment triggered by a method call
will record the span of the entire method call.

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>Remove box syntax from most places in src/test outside of the issues dir</title>
<updated>2021-09-26T02:07:44+00:00</updated>
<author>
<name>est31</name>
<email>MTest31@outlook.com</email>
</author>
<published>2021-08-25T00:39:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6550021124451628b1efc60c59284465b109e3aa'/>
<id>urn:sha1:6550021124451628b1efc60c59284465b109e3aa</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>Ignore automatically derived impls of `Clone` and `Debug` in dead code analysis</title>
<updated>2021-09-09T17:49:07+00:00</updated>
<author>
<name>Fabian Wolff</name>
<email>fabian.wolff@alumni.ethz.ch</email>
</author>
<published>2021-05-21T17:35:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=79adda930f9b607ecb4819ed7abcf1cd285e938a'/>
<id>urn:sha1:79adda930f9b607ecb4819ed7abcf1cd285e938a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>`feature(const_generics)` -&gt; `feature(const_param_types)`</title>
<updated>2021-08-30T09:00:21+00:00</updated>
<author>
<name>lcnr</name>
<email>rust@lcnr.de</email>
</author>
<published>2021-08-27T16:04:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0c28e028b6f45f33447f24de7dd762b8599b7a4e'/>
<id>urn:sha1:0c28e028b6f45f33447f24de7dd762b8599b7a4e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Lint for unused borrows as part of UNUSED_MUST_USE</title>
<updated>2021-06-18T07:09:40+00:00</updated>
<author>
<name>hi-rustin</name>
<email>rustin.liu@gmail.com</email>
</author>
<published>2021-06-18T07:09:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=88abd7d81d585ba31cab1ca404a5ed6b44511f98'/>
<id>urn:sha1:88abd7d81d585ba31cab1ca404a5ed6b44511f98</id>
<content type='text'>
</content>
</entry>
<entry>
<title>remove const_fn feature gate from const tests</title>
<updated>2021-04-29T07:27:45+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2021-04-26T12:53:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3752c6bb40e9e05bbc10d286c508742242448fa3'/>
<id>urn:sha1:3752c6bb40e9e05bbc10d286c508742242448fa3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Allow casting mut array ref to mut ptr</title>
<updated>2021-02-10T12:44:41+00:00</updated>
<author>
<name>Ömer Sinan Ağacan</name>
<email>omeragacan@gmail.com</email>
</author>
<published>2021-01-28T17:22:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d64b749f2cebcfec942ecbbb87e24a9f8cc28469'/>
<id>urn:sha1:d64b749f2cebcfec942ecbbb87e24a9f8cc28469</id>
<content type='text'>
We now allow two new casts:

- mut array reference to mut ptr. Example:

      let mut x: [usize; 2] = [0, 0];
      let p = &amp;mut x as *mut usize;

  We allow casting const array references to const pointers so not
  allowing mut references to mut pointers was inconsistent.

- mut array reference to const ptr. Example:

      let mut x: [usize; 2] = [0, 0];
      let p = &amp;mut x as *const usize;

  This was similarly inconsistent as we allow casting mut references to
  const pointers.

Existing test 'vector-cast-weirdness' updated to test both cases.

Fixes #24151
</content>
</entry>
<entry>
<title>make const_err a future incompat lint</title>
<updated>2021-02-03T14:45:43+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2021-01-30T13:49:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8477d352ac47c89199f27f2368138cb89beaea54'/>
<id>urn:sha1:8477d352ac47c89199f27f2368138cb89beaea54</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #81387 - c410-f3r:tests-tests-tests, r=petrochenkov</title>
<updated>2021-02-01T13:29:33+00:00</updated>
<author>
<name>Jonas Schievink</name>
<email>jonasschievink@gmail.com</email>
</author>
<published>2021-02-01T13:29:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c99ec7f724dfbff1be487ff3b3fc8733fb4474cb'/>
<id>urn:sha1:c99ec7f724dfbff1be487ff3b3fc8733fb4474cb</id>
<content type='text'>
Move some tests to more reasonable directories - 3

cc #73494
r? ````@petrochenkov````

https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-56202.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/56202&lt;/sup&gt;: traits 1.008
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-69841.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/69841&lt;/sup&gt;: for-loop-while 1.014
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-10763.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/10763&lt;/sup&gt;: extern 1.016
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-50599.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/50599&lt;/sup&gt;: resolve 1.018
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-6128.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/6128&lt;/sup&gt;: traits 1.043
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-20616-8.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/20616&lt;/sup&gt;: parser 1.045
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-46553.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/46553&lt;/sup&gt;: consts 1.081
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-33140-hack-boundaries.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/33140&lt;/sup&gt;: traits 1.101
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-25826.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/25826&lt;/sup&gt;: consts 1.108
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-56488.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/56488&lt;/sup&gt;: traits 1.110
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-58856-1.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/58856&lt;/sup&gt;: parser 1.133
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-57819.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/57819&lt;/sup&gt;: parser 1.138
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-54348.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/54348&lt;/sup&gt;: consts 1.155
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-14309.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/14309&lt;/sup&gt;: lint 1.160
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-4446.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/4446&lt;/sup&gt;: threads-sendsync 1.203
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-53675-a-test-called-panic.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/53675&lt;/sup&gt;: test-attrs 1.211
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-40231-2.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/40231&lt;/sup&gt;: consts 1.213
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-22037.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/22037&lt;/sup&gt;: associated-types 1.214
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-59029-2.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/59029&lt;/sup&gt;: traits 1.219
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-18425.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/18425&lt;/sup&gt;: consts 1.237
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-6157.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/6157&lt;/sup&gt;: regions 1.238
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-33819.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/33819&lt;/sup&gt;: borrowck 1.280
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-3683.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/3683&lt;/sup&gt;: traits 1.283
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-8709.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/8709&lt;/sup&gt;: macros 1.291
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-20616-9.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/20616&lt;/sup&gt;: parser 1.293
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-64732.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/64732&lt;/sup&gt;: parser 1.296
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-18655.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/18655&lt;/sup&gt;: associated-types 1.305
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-32947.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/32947&lt;/sup&gt;: simd 1.322
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-57198.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/57198&lt;/sup&gt;: parser 1.342
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-10764-rpass.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/10764&lt;/sup&gt;: extern 1.392
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-73541-2.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/73541&lt;/sup&gt;: async-await 1.422
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-7970b.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/7970&lt;/sup&gt;: parser 1.439
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-57684.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/57684&lt;/sup&gt;: parser 1.512
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-33264.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/33264&lt;/sup&gt;: llvm-asm 1.523
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-65284-suggest-generic-trait-bound.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/65284&lt;/sup&gt;: suggestions 1.647
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-17458.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/17458&lt;/sup&gt;: consts 1.711
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-56762.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/56762&lt;/sup&gt;: consts 1.787
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-2216.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/2216&lt;/sup&gt;: for-loop-while 1.856
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/45696&lt;/sup&gt;: nll 2.009
https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-46036.rs &lt;sup&gt;https://github.com/rust-lang/rust/issues/46036&lt;/sup&gt;: nll 2.059

````@petrochenkov```` Can you put a place holder (like `N/A`) for tests without GitHub issues? It is a lot easier to parse fixed sized rows.
</content>
</entry>
</feed>
