<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/libstd/sync, branch 1.22.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.22.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.22.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2017-10-04T12:03:23+00:00</updated>
<entry>
<title>Add missing urls for Mutex</title>
<updated>2017-10-04T12:03:23+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume1.gomez@gmail.com</email>
</author>
<published>2017-10-04T12:03:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e1df72fdababd4f8217762d64c1f066a902b2fe1'/>
<id>urn:sha1:e1df72fdababd4f8217762d64c1f066a902b2fe1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>std::sync::RwLock docs improvement</title>
<updated>2017-09-23T02:12:21+00:00</updated>
<author>
<name>Lucas Morales</name>
<email>lucas@lucasem.com</email>
</author>
<published>2017-09-22T22:43:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f283875a780662f13d977e05de7ab5fe52604743'/>
<id>urn:sha1:f283875a780662f13d977e05de7ab5fe52604743</id>
<content type='text'>
</content>
</entry>
<entry>
<title>change #![feature(const_fn)] to specific gates</title>
<updated>2017-09-16T15:53:02+00:00</updated>
<author>
<name>Alex Burka</name>
<email>alex@alexburka.com</email>
</author>
<published>2017-09-08T18:26:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=681e5da61ee3f1251c00c2ec0d93dd23dbf861bc'/>
<id>urn:sha1:681e5da61ee3f1251c00c2ec0d93dd23dbf861bc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #43891 - Fourchaux:master, r=steveklabnik</title>
<updated>2017-08-17T14:44:07+00:00</updated>
<author>
<name>Corey Farwell</name>
<email>coreyf@rwell.org</email>
</author>
<published>2017-08-17T14:44:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a4387d54dca2160544fd0775c52ad942794e4f5f'/>
<id>urn:sha1:a4387d54dca2160544fd0775c52ad942794e4f5f</id>
<content type='text'>
Fix typos &amp; us spellings

Fixing some typos and non en-US spellings.

(Update of PR https://github.com/rust-lang/rust/pull/42812 )
</content>
</entry>
<entry>
<title>use field init shorthand EVERYWHERE</title>
<updated>2017-08-15T22:29:17+00:00</updated>
<author>
<name>Zack M. Davis</name>
<email>code@zackmdavis.net</email>
</author>
<published>2017-08-07T05:54:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1b6c9605e41b7c7dc23e0e6f633f05912d0463dd'/>
<id>urn:sha1:1b6c9605e41b7c7dc23e0e6f633f05912d0463dd</id>
<content type='text'>
Like #43008 (f668999), but _much more aggressive_.
</content>
</entry>
<entry>
<title>Fix typos &amp; us spellings</title>
<updated>2017-08-15T19:56:30+00:00</updated>
<author>
<name>Fourchaux</name>
<email>jprodi04@gmail.com</email>
</author>
<published>2017-08-15T19:45:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c7104be1a37daa2f7ec114913247dc93524fd48e'/>
<id>urn:sha1:c7104be1a37daa2f7ec114913247dc93524fd48e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #43582 - ivanbakel:unused_mut_ref, r=arielb1</title>
<updated>2017-08-10T08:53:22+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2017-08-10T08:53:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d21ec9b4efd1da012979b050bc0a0426fe45fcdf'/>
<id>urn:sha1:d21ec9b4efd1da012979b050bc0a0426fe45fcdf</id>
<content type='text'>
Fixed mutable vars being marked used when they weren't

#### NB : bootstrapping is slow on my machine, even with `keep-stage` - fixes for occurances in the current codebase are &lt;s&gt;in the pipeline&lt;/s&gt; done. This PR is being put up for review of the fix of the issue.

Fixes #43526, Fixes #30280, Fixes #25049

### Issue
Whenever the compiler detected a mutable deref being used mutably, it marked an associated value as being used mutably as well. In the case of derefencing local variables which were mutable references, this incorrectly marked the reference itself being used mutably, instead of its contents - with the consequence of making the following code emit no warnings
```
fn do_thing&lt;T&gt;(mut arg : &amp;mut T) {
    ... // don't touch arg - just deref it to access the T
}
```

### Fix
Make dereferences not be counted as a mutable use, but only when they're on borrows on local variables.
#### Why not on things other than local variables?
  * Whenever you capture a variable in a closure, it gets turned into a hidden reference - when you use it in the closure, it gets dereferenced. If the closure uses the variable mutably, that is actually a mutable use of the thing being dereffed to, so it has to be counted.
  * If you deref a mutable `Box` to access the contents mutably, you are using the `Box` mutably - so it has to be counted.
</content>
</entry>
<entry>
<title>Use explicit wrapping_add to prevent potential unexpected behavior on debug builds</title>
<updated>2017-08-08T20:58:09+00:00</updated>
<author>
<name>Stefan Schindler</name>
<email>dns2utf8@estada.ch</email>
</author>
<published>2017-08-01T14:25:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=702750c538c56905f58b60520dd1e9814ba03a8e'/>
<id>urn:sha1:702750c538c56905f58b60520dd1e9814ba03a8e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixed all unnecessary muts in language core</title>
<updated>2017-08-01T22:01:24+00:00</updated>
<author>
<name>Isaac van Bakel</name>
<email>ivb@vanbakel.io</email>
</author>
<published>2017-08-01T12:03:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=400075d9d9b6410c9f7952ca52c35806b46b3177'/>
<id>urn:sha1:400075d9d9b6410c9f7952ca52c35806b46b3177</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Correct some stability attributes</title>
<updated>2017-07-10T01:07:29+00:00</updated>
<author>
<name>Oliver Middleton</name>
<email>olliemail27@gmail.com</email>
</author>
<published>2017-07-10T01:07:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f2566bbaebc4ea56bc3717ee8c04bee7d5c0a8d3'/>
<id>urn:sha1:f2566bbaebc4ea56bc3717ee8c04bee7d5c0a8d3</id>
<content type='text'>
These show up in rustdoc so need to be correct.
</content>
</entry>
</feed>
