<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/libsyntax_ext/deriving, branch 1.27.1</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.27.1</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.27.1'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2018-05-02T09:32:34+00:00</updated>
<entry>
<title>Remove Option from the return type of Attribute::name()</title>
<updated>2018-05-02T09:32:34+00:00</updated>
<author>
<name>Seiichi Uchida</name>
<email>seuchida@gmail.com</email>
</author>
<published>2018-01-30T05:53:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9b3aea602c37d53bbecf8bff8c77ccbfbefc23d0'/>
<id>urn:sha1:9b3aea602c37d53bbecf8bff8c77ccbfbefc23d0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rustc_target: move in syntax::abi and flip dependency.</title>
<updated>2018-04-26T14:49:16+00:00</updated>
<author>
<name>Irina Popa</name>
<email>irinagpopa@gmail.com</email>
</author>
<published>2018-04-25T16:30:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=04fa0e7bb3e462080be4a6cee45fd94b1c27d287'/>
<id>urn:sha1:04fa0e7bb3e462080be4a6cee45fd94b1c27d287</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #49986 - zofrex:better-derived-argument-names, r=Manishearth</title>
<updated>2018-04-25T01:50:56+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2018-04-25T01:50:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0c5740feb24bff4f13b68b565288dd8a42ab93f6'/>
<id>urn:sha1:0c5740feb24bff4f13b68b565288dd8a42ab93f6</id>
<content type='text'>
Provide better names for builtin deriving-generated attributes

First attempt at fixing #49967

Not in love with any choices here, don't be shy if you aren't happy with anything :)

I've tested that this produces nicer names in documentation, and that it no longer has issues conflicting with constants with the same name. (I guess we _could_ make a test for that... unsure if that would be valuable)

In all cases I took the names from the methods as declared in the relevant trait.

In some cases I had to prepend the names with _ otherwise there were errors about un-used variables. I'm uneasy with the inconsistency... do they all need to be like that? Is there a way to generate an alternate impl or use a different name (`_`?) in the cases where the arguments are not used?

Lastly the gensym addition to Ident I implemented largely as suggested, but I want to point out it's a little circuitous (at least, as far as I understand it). `cx.ident_of(name)` is just `Ident::from_str`, so we create an Ident then another Ident from it. `Ident::with_empty_ctxt(Symbol::gensym(string))` may or may not be equivalent, I don't know if it's important to intern it _then_ gensym it. It seems like either we could use that, or if we do want a new method to make this convenient, it could be on Ident instead (`from_str_gensymed`?)
</content>
</entry>
<entry>
<title>Fix some of the __names in the comments</title>
<updated>2018-04-19T19:17:06+00:00</updated>
<author>
<name>James Sanderson</name>
<email>zofrex@gmail.com</email>
</author>
<published>2018-04-19T19:17:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1a72d6dcd17ae02d56942fd3eb1a891eb51c45c6'/>
<id>urn:sha1:1a72d6dcd17ae02d56942fd3eb1a891eb51c45c6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Gensym remaining identifiers</title>
<updated>2018-04-19T19:06:35+00:00</updated>
<author>
<name>James Sanderson</name>
<email>zofrex@gmail.com</email>
</author>
<published>2018-04-19T18:04:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b9b650c412d901dc92f795c4d32eb382f530f7e1'/>
<id>urn:sha1:b9b650c412d901dc92f795c4d32eb382f530f7e1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Don't prepend deriving-generated attributes with _</title>
<updated>2018-04-19T12:57:43+00:00</updated>
<author>
<name>James Sanderson</name>
<email>zofrex@gmail.com</email>
</author>
<published>2018-04-19T12:57:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a3241d1350ab95e0a7ef4c84cbd828c207f211b5'/>
<id>urn:sha1:a3241d1350ab95e0a7ef4c84cbd828c207f211b5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Provide better names for builtin deriving-generated attributes</title>
<updated>2018-04-15T19:51:10+00:00</updated>
<author>
<name>James Sanderson</name>
<email>zofrex@gmail.com</email>
</author>
<published>2018-04-15T19:51:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4ae9488ce8fc89d1ddaa70ac148b8d66c311e517'/>
<id>urn:sha1:4ae9488ce8fc89d1ddaa70ac148b8d66c311e517</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #49881 - varkor:partialord-opt, r=Manishearth</title>
<updated>2018-04-15T03:54:15+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2018-04-15T03:54:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=bc001fa07f1e44f88b59c74290a2dd916824d33c'/>
<id>urn:sha1:bc001fa07f1e44f88b59c74290a2dd916824d33c</id>
<content type='text'>
Fix derive(PartialOrd) and optimise final field operation

```rust
// Before (`lt` on 2-field struct)
self.f1 &lt; other.f1 || (!(other.f1 &lt; self.f1) &amp;&amp;
(self.f2 &lt; other.f2 || (!(other.f2 &lt; self.f2) &amp;&amp;
(false)
))
)

// After
self.f1 &lt; other.f1 || (!(other.f1 &lt; self.f1) &amp;&amp;
self.f2 &lt; other.f2
)

// Before (`le` on 2-field struct)
self.f1 &lt; other.f1 || (!(other.f1 &lt; self.f1) &amp;&amp;
(self.f2 &lt; other.f2 || (!(other.f2 &lt; self.f2) &amp;&amp;
(true)
))
)

// After
self.f1 &lt; other.f1 || (self.f1 == other.f1 &amp;&amp;
self.f2 &lt;= other.f2
)
```

(The big diff is mainly because of a past faulty rustfmt application that I corrected 😒)

Fixes #49650 and fixes #49505.
</content>
</entry>
<entry>
<title>Abstract cs_eq for partial_eq</title>
<updated>2018-04-12T00:53:21+00:00</updated>
<author>
<name>varkor</name>
<email>github@varkor.com</email>
</author>
<published>2018-04-12T00:35:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=105c5180941f4034fd0d576a1d4c1bb71dd8e077'/>
<id>urn:sha1:105c5180941f4034fd0d576a1d4c1bb71dd8e077</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Improve the comment for cs_fold1</title>
<updated>2018-04-12T00:33:52+00:00</updated>
<author>
<name>varkor</name>
<email>github@varkor.com</email>
</author>
<published>2018-04-12T00:33:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=60dc4f8ec8729bd851b8ee8e3dac9abae1f62bef'/>
<id>urn:sha1:60dc4f8ec8729bd851b8ee8e3dac9abae1f62bef</id>
<content type='text'>
</content>
</entry>
</feed>
