<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/libsyntax_ext/deriving/hash.rs, branch 1.12.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.12.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.12.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2016-07-19T17:37:57+00:00</updated>
<entry>
<title>Run rustfmt on libsyntax_ext/deriving folder</title>
<updated>2016-07-19T17:37:57+00:00</updated>
<author>
<name>Srinivas Reddy Thatiparthy</name>
<email>thatiparthysreenivas@gmail.com</email>
</author>
<published>2016-07-19T17:32:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9652fcbb6e59845904ef246b41231f5df198dd0d'/>
<id>urn:sha1:9652fcbb6e59845904ef246b41231f5df198dd0d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #34436 - jseyfried:no_block_expr, r=eddyb</title>
<updated>2016-06-26T02:20:14+00:00</updated>
<author>
<name>Jeffrey Seyfried</name>
<email>jeffrey.seyfried@gmail.com</email>
</author>
<published>2016-06-26T02:19:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9bb3ea0febcbb8f6d7715256a5644daa985cf4e7'/>
<id>urn:sha1:9bb3ea0febcbb8f6d7715256a5644daa985cf4e7</id>
<content type='text'>
To allow these braced macro invocation, this PR removes the optional expression from `ast::Block` and instead uses a `StmtKind::Expr` at the end of the statement list.

Currently, braced macro invocations in blocks can expand into statements (and items) except when they are last in a block, in which case they can only expand into expressions.

For example,
```rust
macro_rules! make_stmt {
    () =&gt; { let x = 0; }
}

fn f() {
    make_stmt! {} //&lt; This is OK...
    let x = 0; //&lt; ... unless this line is commented out.
}
```

Fixes #34418.
</content>
</entry>
<entry>
<title>Remove field `expr` of `ast::Block`</title>
<updated>2016-06-23T17:42:08+00:00</updated>
<author>
<name>Jeffrey Seyfried</name>
<email>jeffrey.seyfried@gmail.com</email>
</author>
<published>2016-06-23T09:51:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b7da35a5aa7603c3010e1aa9e5ff6de5660058fb'/>
<id>urn:sha1:b7da35a5aa7603c3010e1aa9e5ff6de5660058fb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move errors from libsyntax to its own crate</title>
<updated>2016-06-23T12:07:35+00:00</updated>
<author>
<name>Jonathan Turner</name>
<email>jturner@mozilla.com</email>
</author>
<published>2016-06-21T22:08:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6ae350213485f7c917113f3916e58c51cef97a76'/>
<id>urn:sha1:6ae350213485f7c917113f3916e58c51cef97a76</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Improve derived implementations for enums with lots of fieldless variants</title>
<updated>2016-05-12T19:05:13+00:00</updated>
<author>
<name>Björn Steinbrink</name>
<email>bsteinbr@gmail.com</email>
</author>
<published>2016-05-12T15:54:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0eeb14eaba04025aa8a4612e1935f04f2ca3fb6b'/>
<id>urn:sha1:0eeb14eaba04025aa8a4612e1935f04f2ca3fb6b</id>
<content type='text'>
A number of trait methods like PartialEq::eq or Hash::hash don't
actually need a distinct arm for each variant, because the code within
the arm only depends on the number and types of the fields in the
variants. We can easily exploit this fact to create less and better
code for enums with multiple variants that have no fields at all, the
extreme case being C-like enums.

For nickel.rs and its by now infamous 800 variant enum, this reduces
optimized compile times by 25% and non-optimized compile times by 40%.
Also peak memory usage is down by almost 40% (310MB down to 190MB).

To be fair, most other crates don't benefit nearly as much, because
they don't have as huge enums. The crates in the Rust distribution that
I measured saw basically no change in compile times (I only tried
optimized builds) and only 1-2% reduction in peak memory usage.
</content>
</entry>
<entry>
<title>deriving: factor out discriminant_value construction</title>
<updated>2016-03-27T05:25:47+00:00</updated>
<author>
<name>Alex Burka</name>
<email>aburka@seas.upenn.edu</email>
</author>
<published>2016-03-10T05:31:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1e67d8a57099eb9d286b5a4adfa798c1b3d437b9'/>
<id>urn:sha1:1e67d8a57099eb9d286b5a4adfa798c1b3d437b9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix #21714 by using discriminant_value in #[derive(Hash)]</title>
<updated>2016-03-27T05:25:46+00:00</updated>
<author>
<name>Alex Burka</name>
<email>aburka@seas.upenn.edu</email>
</author>
<published>2016-03-07T18:05:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c480b6a75df08cef48190e3c18eab26e99bae58c'/>
<id>urn:sha1:c480b6a75df08cef48190e3c18eab26e99bae58c</id>
<content type='text'>
This is the same approach taken in #24270, except that this
should not be a breaking change because it only changes the output
of hash functions, which nobody should be relying on.
</content>
</entry>
<entry>
<title>derive: improve hygiene for type parameters (see #2810)</title>
<updated>2016-03-14T20:59:55+00:00</updated>
<author>
<name>Alex Burka</name>
<email>aburka@seas.upenn.edu</email>
</author>
<published>2016-03-08T18:24:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8355389e3e9d299d90ea78197c0e5b6c2162a957'/>
<id>urn:sha1:8355389e3e9d299d90ea78197c0e5b6c2162a957</id>
<content type='text'>
When deriving Hash, RustcEncodable and RustcDecodable, the syntax extension
needs a type parameter to use in the inner method. They used to use __H, __S
and __D respectively. If this conflicts with a type parameter already declared
for the item, bad times result (see the test). There is no hygiene for type
parameters, but this commit introduces a better heuristic by concatenating the
names of all extant type parameters (and prepending __H).
</content>
</entry>
<entry>
<title>Fix #[derive] for empty structs with braces</title>
<updated>2016-02-22T18:24:32+00:00</updated>
<author>
<name>Vadim Petrochenkov</name>
<email>vadim.petrochenkov@gmail.com</email>
</author>
<published>2016-02-22T18:24:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4e8e607d8469a8882944233e4bb3ee45d2a6435a'/>
<id>urn:sha1:4e8e607d8469a8882944233e4bb3ee45d2a6435a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[breaking-change] don't glob export ast::Mutablity variants</title>
<updated>2016-02-11T11:34:48+00:00</updated>
<author>
<name>Oliver 'ker' Schneider</name>
<email>git-spam-no-reply9815368754983@oli-obk.de</email>
</author>
<published>2016-02-09T16:44:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=73fa9b2da2ee82c91a5c8d605b91f22f19e4d74b'/>
<id>urn:sha1:73fa9b2da2ee82c91a5c8d605b91f22f19e4d74b</id>
<content type='text'>
</content>
</entry>
</feed>
