<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/libsyntax/attr.rs, branch perf-tmp</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=perf-tmp</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=perf-tmp'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2018-07-01T00:44:20+00:00</updated>
<entry>
<title>factor built-in attribute parsing into submodule</title>
<updated>2018-07-01T00:44:20+00:00</updated>
<author>
<name>Andy Russell</name>
<email>arussell123@gmail.com</email>
</author>
<published>2018-06-30T16:19:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=011eaed59d9f04b3c9d539490c9891bcd2aabefc'/>
<id>urn:sha1:011eaed59d9f04b3c9d539490c9891bcd2aabefc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix HasAttrs support for GenericParam</title>
<updated>2018-06-20T11:23:23+00:00</updated>
<author>
<name>varkor</name>
<email>github@varkor.com</email>
</author>
<published>2018-06-13T12:29:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8bc3a35576dd4e2f02b9d34fe5ed241288b5bfbe'/>
<id>urn:sha1:8bc3a35576dd4e2f02b9d34fe5ed241288b5bfbe</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Deny #[cfg] and #[cfg_attr] on generic parameters.</title>
<updated>2018-06-01T21:11:33+00:00</updated>
<author>
<name>kennytm</name>
<email>kennytm@gmail.com</email>
</author>
<published>2018-06-01T21:10:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c9cb806689a9691e2a29836e2c597751cdbcfdc8'/>
<id>urn:sha1:c9cb806689a9691e2a29836e2c597751cdbcfdc8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>suggestion applicabilities for libsyntax and librustc, run-rustfix tests</title>
<updated>2018-05-20T21:13:25+00:00</updated>
<author>
<name>Zack M. Davis</name>
<email>code@zackmdavis.net</email>
</author>
<published>2018-05-19T21:52:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=98a04291e4db92ae86d7e3a20b5763cb926ebfbf'/>
<id>urn:sha1:98a04291e4db92ae86d7e3a20b5763cb926ebfbf</id>
<content type='text'>
Consider this a down payment on #50723. To recap, an `Applicability`
enum was recently (#50204) added, to convey to Rustfix and other tools
whether we think it's OK for them to blindly apply the suggestion, or
whether to prompt a human for guidance (because the suggestion might
contain placeholders that we can't infer, or because we think it has a
sufficiently high probability of being wrong even though it's—
presumably—right often enough to be worth emitting in the first place).

When a suggestion is marked as `MaybeIncorrect`, we try to use comments
to indicate precisely why (although there are a few places where we just
say `// speculative` because the present author's subjective judgement
balked at the idea that the suggestion has no false positives).

The `run-rustfix` directive is opporunistically set on some relevant UI
tests (and a couple tests that were in the `test/ui/suggestions`
directory, even if the suggestions didn't originate in librustc or
libsyntax). This is less trivial than it sounds, because a surprising
number of test files aren't equipped to be tested as fixed even when
they contain successfully fixable errors, because, e.g., there are more,
not-directly-related errors after fixing. Some test files need an
attribute or underscore to avoid unused warnings tripping up the "fixed
code is still producing diagnostics" check despite the fixes being
correct; this is an interesting contrast-to/inconsistency-with the
behavior of UI tests (which secretly pass `-A unused`), a behavior which
we probably ought to resolve one way or the other (filed issue #50926).

A few suggestion labels are reworded (e.g., to avoid phrasing it as a
question, which which is discouraged by the style guidelines listed in
`.span_suggestion`'s doc-comment).
</content>
</entry>
<entry>
<title>Macros: Add a 'literal' fragment specifier</title>
<updated>2018-05-13T16:17:02+00:00</updated>
<author>
<name>Dan Aloni</name>
<email>alonid@gmail.com</email>
</author>
<published>2018-04-09T23:08:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=37ed2ab91038567bafe3fd2e545c7d1631ff2ab0'/>
<id>urn:sha1:37ed2ab91038567bafe3fd2e545c7d1631ff2ab0</id>
<content type='text'>
Implements RFC 1576.

See: https://github.com/rust-lang/rfcs/blob/master/text/1576-macros-literal-matcher.md

Changes are mostly in libsyntax, docs, and tests. Feature gate is
enabled for 1.27.0.

Many thanks to Vadim Petrochenkov for following through code reviews
and suggestions.

Example:

````rust

macro_rules! test_literal {
    ($l:literal) =&gt; {
        println!("literal: {}", $l);
    };
    ($e:expr) =&gt; {
        println!("expr: {}", $e);
    };
}

fn main() {
    let a = 1;
    test_literal!(a);
    test_literal!(2);
    test_literal!(-3);
}
```

Output:

```
expr: 1
literal: 2
literal: -3
```
</content>
</entry>
<entry>
<title>Auto merge of #50030 - flip1995:rfc2103, r=petrochenkov</title>
<updated>2018-05-03T11:52:03+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2018-05-03T11:52:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d68b0eceaaf719a4702ab13a7ca62dea5d966082'/>
<id>urn:sha1:d68b0eceaaf719a4702ab13a7ca62dea5d966082</id>
<content type='text'>
Implement tool_attributes feature (RFC 2103)

cc #44690

This is currently just a rebased and compiling (hopefully) version of #47773.

Let's see if travis likes this. I will add the implementation for `tool_lints` this week.
</content>
</entry>
<entry>
<title>Auto merge of #50391 - nnethercote:escape_unicode, r=eddyb</title>
<updated>2018-05-03T08:06:08+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2018-05-03T08:06:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=698b956a9fca9688632d617dd6d73cae834237a3'/>
<id>urn:sha1:698b956a9fca9688632d617dd6d73cae834237a3</id>
<content type='text'>
Use escape_default() for strings in LitKind::token().

This avoids converting every char to \u{...} form, which bloats the
resulting strings unnecessarily. It also provides consistency with the
existing escape_default() calls in LitKind::token() used for raw
string literals, char literals, and raw byte char literals.

There are two benefits from this change.

- Compilation is faster. Most of the rustc-perf benchmarks see a
  non-trivial speedup, particularly for incremental rebuilds, with the
  best speedup over 13%, and multiple others over 10%.

- Generated rlibs are smaller. An extreme example is libfutures.rlib,
  which shrinks from 2073306 bytes to 1765927 bytes, a 15% reduction.

r? @jseyfried

&lt;details&gt;&lt;summary&gt;Here are full numbers for all the rustc-perf runs where the improvement was &gt; 1%.&lt;/summary&gt;

```
regex-check
	avg: -11.1%	min: -13.4%	max: -5.5%
futures-check
	avg: -7.6%	min: -11.4%	max: -3.5%
futures-opt
	avg: -6.3%	min: -10.3%	max: -2.3%
futures
	avg: -6.6%	min: -10.3%	max: -2.8%
regex-opt
	avg: -4.7%	min: -10.2%	max: -0.4%
regex
	avg: -5.3%	min: -10.2%	max: -1.2%
hyper-check
	avg: -4.8%	min: -6.6%	max: -2.7%
encoding-check
	avg: -4.1%	min: -5.5%	max: -2.5%
issue-46449-check
	avg: -4.7%	min: -5.2%	max: -4.1%
clap-rs-check
	avg: -2.9%	min: -5.2%	max: -1.1%
hyper
	avg: -3.0%	min: -5.1%	max: -0.8%
parser-check
	avg: -4.2%	min: -4.9%	max: -3.2%
hyper-opt
	avg: -2.6%	min: -4.9%	max: -0.3%
encoding-opt
	avg: -2.3%	min: -4.6%	max: -0.5%
encoding
	avg: -2.5%	min: -4.4%	max: -0.6%
issue-46449
	avg: -2.3%	min: -4.4%	max: -1.8%
issue-46449-opt
	avg: -1.7%	min: -4.3%	max: -0.9%
clap-rs-opt
	avg: -1.6%	min: -4.2%	max: -0.2%
serde-check
	avg: -1.4%	min: -4.1%	max: -0.2%
clap-rs
	avg: -1.6%	min: -3.9%	max: -0.7%
unify-linearly-check
	avg: -3.2%	min: -3.7%	max: -2.7%
serde
	avg: -1.1%	min: -3.5%	max: -0.1%
regression-31157-check
	avg: -2.6%	min: -3.4%	max: -1.6%
helloworld-check
	avg: -2.5%	min: -3.4%	max: -0.6%
serde-opt
	avg: -1.3%	min: -3.3%	max: -0.5%
tokio-webpush-simple-check
	avg: -2.4%	min: -3.2%	max: -1.8%
piston-image-check
	avg: -1.7%	min: -3.2%	max: -0.9%
deeply-nested-opt
	avg: -1.5%	min: -3.0%	max: -0.6%
deeply-nested-check
	avg: -1.9%	min: -2.9%	max: -0.4%
deeply-nested
	avg: -1.9%	min: -2.9%	max: -1.2%
syn-check
	avg: -1.8%	min: -2.8%	max: -0.6%
coercions
	avg: -0.5%	min: -2.8%	max: 0.4%
syn-opt
	avg: -0.9%	min: -2.4%	max: -0.1%
syn
	avg: -1.1%	min: -2.2%	max: -0.3%
parser-opt
	avg: -1.9%	min: -2.1%	max: -1.6%
parser
	avg: -1.9%	min: -2.1%	max: -1.6%
style-servo-check
	avg: -1.3%	min: -2.0%	max: -0.8%
regression-31157-opt
	avg: -0.8%	min: -2.0%	max: 0.0%
piston-image
	avg: -0.7%	min: -1.8%	max: -0.2%
piston-image-opt
	avg: -0.6%	min: -1.8%	max: -0.0%
regression-31157
	avg: -1.0%	min: -1.7%	max: -0.3%
html5ever-opt
	avg: -0.6%	min: -1.5%	max: -0.1%
unify-linearly-opt
	avg: -1.3%	min: -1.5%	max: -1.1%
unify-linearly
	avg: -1.3%	min: -1.4%	max: -1.2%
tokio-webpush-simple-opt
	avg: -0.4%	min: -1.2%	max: -0.0%
helloworld-opt
	avg: -1.0%	min: -1.1%	max: -0.6%
helloworld
	avg: -1.0%	min: -1.1%	max: -0.7%
inflate-opt
	avg: -0.3%	min: -1.1%	max: 0.1%
html5ever-check
	avg: -0.6%	min: -1.0%	max: -0.3%
inflate-check
	avg: -0.3%	min: -1.0%	max: -0.1%
```

&lt;/details&gt;
</content>
</entry>
<entry>
<title>Use escape_default() for strings in LitKind::token().</title>
<updated>2018-05-03T00:31:39+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>nnethercote@mozilla.com</email>
</author>
<published>2018-05-02T01:50:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d5d389e4f11b1fad2d42453942f81271bbddee78'/>
<id>urn:sha1:d5d389e4f11b1fad2d42453942f81271bbddee78</id>
<content type='text'>
This avoids converting every char to \u{...} form, which bloats the
resulting strings unnecessarily. It also provides consistency with the
existing escape_default() calls in LitKind::token() used for raw
string literals, char literals, and raw byte char literals.

There are two benefits from this change.

- Compilation is faster. Most of the rustc-perf benchmarks see a
  non-trivial speedup, particularly for incremental rebuilds, with the
  best speedup over 13%, and multiple others over 10%.

- Generated rlibs are smaller. An extreme example is libfutures.rlib,
  which shrinks from 2073306 bytes to 1765927 bytes, a 15% reduction.
</content>
</entry>
<entry>
<title>fix tests</title>
<updated>2018-05-02T10:05:18+00:00</updated>
<author>
<name>flip1995</name>
<email>uwdkn@student.kit.edu</email>
</author>
<published>2018-04-24T14:57:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=84f450866041e0269875acb1350920308cdc109f'/>
<id>urn:sha1:84f450866041e0269875acb1350920308cdc109f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>make it compile again</title>
<updated>2018-05-02T10:05:13+00:00</updated>
<author>
<name>flip1995</name>
<email>uwdkn@student.kit.edu</email>
</author>
<published>2018-04-17T13:33:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=121abd0599f6fd056dca84fe1df724fb7822b355'/>
<id>urn:sha1:121abd0599f6fd056dca84fe1df724fb7822b355</id>
<content type='text'>
</content>
</entry>
</feed>
