Commit Graph

78528 Commits

Author SHA1 Message Date
Isaac Whitfield
ece778e2a3 Attempt to pass CrateMetadata flags on creation 2018-05-18 09:37:29 -07:00
Isaac Whitfield
466fc6815d Avoid generating attributes more than once for CrateMetadata 2018-05-18 09:37:13 -07:00
Isaac Whitfield
f418f1dd78 Remove attribute_cache from CrateMetadata 2018-05-18 09:36:45 -07:00
bors
ba64edb3ed Auto merge of #50533 - GuillaumeGomez:rustdoc-prim-auto, r=QuietMisdreavus
add auto-impl for primitive type

Part of #50431.

I have no clue how to test this though with the rustdoc test suite...

r? @QuietMisdreavus
2018-05-18 14:52:12 +00:00
Jonathan A. Kollasch
ec779b9f08 Add armv6-unknown-netbsd-eabihf target 2018-05-18 09:29:58 -05:00
Jonathan A. Kollasch
908230ee6d Add armv7-unknown-netbsd-eabihf target 2018-05-18 09:29:58 -05:00
Jonathan A. Kollasch
32f9b53ed8 NetBSD on EABI ARM does not use ARM EHABI 2018-05-18 09:29:58 -05:00
Anthony Ramine
b7db68f516 Find the largest niche when computing layouts
Otherwise we end up with `Option<Option<(&(), bool)>>` unnecessarily large.
2018-05-18 14:32:05 +02:00
Nicholas Nethercote
ad471452ba Make Directory::path a Cow.
Because we create a lot of these in the macro parser, but only very
rarely modify them.

This speeds up some html5ever runs by 2--3%.
2018-05-18 22:20:33 +10:00
Nicholas Nethercote
fcf2b24e1b Introduce MatcherPosHandle.
This lets us store most `MatcherPos` instances on the stack. This speeds
up various runs of html5ever, the best by 3%.
2018-05-18 22:20:27 +10:00
Robin Krahl
cf1f0385a8
Reorder description for snippets in rustdoc documentation
The example code snippets for the `no_run` and `compile_fail` attributes
in the rustdoc documentation were followed by the description for the
wrong attribute.  This patch reorders the descriptions to match the code
snippets.
2018-05-18 14:12:25 +02:00
bors
df40e61382 Auto merge of #50307 - petrochenkov:keyhyg2, r=nikomatsakis
Implement edition hygiene for keywords

Determine "keywordness" of an identifier in its hygienic context.
cc https://github.com/rust-lang/rust/pull/49611

I've resurrected `proc` as an Edition-2015-only keyword for testing purposes, but it should probably be buried again. EDIT: `proc` is removed again.
2018-05-18 10:57:05 +00:00
bors
fd18d2537d Auto merge of #50758 - varkor:stabilise-inclusive_range_methods, r=SimonSapin
Stabilise inclusive_range_methods

r? @SimonSapin

Closes #49022.
2018-05-18 08:10:23 +00:00
Zack M. Davis
59782f4829 in which the unused shorthand field pattern debacle/saga continues
In e4b1a79 (#47922), we corrected erroneous suggestions for unused
shorthand field pattern bindings, suggesting `field: _` where the
previous suggestion of `_field` wouldn't even have compiled
(#47390). Soon, it was revealed that this was insufficient (#50303), and
the fix was extended to references, slices, &c. (#50327) But even this
proved inadequate, as the erroneous suggestions were still being issued
for patterns in local (`let`) bindings (#50804). Here, we yank the
shorthand-detection and variable/node registration code into a new
common function that can be called while visiting both match arms and
`let` bindings.

Resolves #50804.
2018-05-18 01:00:22 -07:00
Anthony Ramine
032831da78 Update LLVM to 56c931901cfb85cd6f7ed44c7d7520a8de1edf97
This brings in https://github.com/rust-lang/llvm/pull/115, which fixes
https://github.com/rust-lang/rust/issues/49873.
2018-05-18 09:24:11 +02:00
bors
2a421f8e19 Auto merge of #50848 - nrc:update, r=alexcrichton
Update RLS and Rustfmt

Fixes RLS build (The Rustfmt update is insignificant)

r? @alexcrichton
2018-05-18 05:23:23 +00:00
bors
dfc07a48f6 Auto merge of #50847 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
Rollup of 10 pull requests

Successful merges:

 - #50387 (Remove leftover tab in libtest outputs)
 - #50553 (Add Option::xor method)
 - #50610 (Improve format string errors)
 - #50649 (Tweak `nearest_common_ancestor()`.)
 - #50790 (Fix grammar documentation wrt Unicode identifiers)
 - #50791 (Fix null exclusions in grammar docs)
 - #50806 (Add `bless` x.py subcommand for easy ui test replacement)
 - #50818 (Speed up `opt_normalize_projection_type`)
 - #50837 (Revert #49767)
 - #50839 (Make sure people know the book is free oline)

Failed merges:
2018-05-18 02:58:13 +00:00
bors
bedbf72785 Auto merge of #50566 - nnethercote:bump, r=petrochenkov
Streamline `StringReader::bump`

These patches make `bump` smaller and nicer. They speed up most runs for coercions and tuple-stress by 1--3%.
2018-05-18 00:09:37 +00:00
iancormac84
03493941fb Fixed accidental removal of StableHasher declaration. 2018-05-17 19:43:36 -04:00
est31
7ad9ef3c45 CheckLoopVisitor: also visit closure arguments
This turns an ICE on this code:

fn main() {
    |_: [u8; break]| ();
}

from
    'assertion failed: self.tcx.sess.err_count() > 0', librustc_typeck/check/mod.rs
to
    librustc_mir/hair/cx/expr.rs:543: invalid loop id for break: not inside loop scope

which is at a later stage during compilation and most importantly
fixes of bug #50576 will fix this as well.
2018-05-17 23:54:49 +02:00
bors
612ca14b81 Auto merge of #50593 - nikomatsakis:nll-no-location, r=nikomatsakis
stop considering location when computing outlives relationships

This doesn't (yet?) use SEME regions, but it does ignore the location for outlives constraints. This makes (I believe) NLL significantly faster -- but we should do some benchmarks. It regresses the "get-default" family of use cases for NLL, which is a shame, but keeps the other benefits, and thus represents a decent step forward.

r? @pnkfelix
2018-05-17 21:36:43 +00:00
iancormac84
1839faead0 Removed yet another unused import. 2018-05-17 16:41:34 -04:00
iancormac84
18b032a96b Removed unused import. 2018-05-17 16:41:33 -04:00
iancormac84
b79edf008f Added extra hashing step. 2018-05-17 16:41:33 -04:00
iancormac84
6131c0a98c Fix more unused imports errors. 2018-05-17 16:41:31 -04:00
iancormac84
ef38712f87 Removed unused imports. 2018-05-17 16:41:30 -04:00
iancormac84
9041d81f78 Code structure edits. 2018-05-17 16:41:29 -04:00
iancormac84
659f164167 Removed TypeIdHasher. 2018-05-17 16:41:27 -04:00
iancormac84
9a746d5c1d Removed use of TypeIdHasher in symbol hash generation and replaced it with StableHasher. 2018-05-17 16:41:26 -04:00
iancormac84
a8c2332cc8 Removed use of TypeIdHasher in debuginfo and replaced it with StableHasher. Also corrected erroneous mention of TypeIdHasher in implementation of HashStable trait. 2018-05-17 16:41:18 -04:00
Vadim Petrochenkov
d8bbc1ee1a Fix rebase 2018-05-17 23:32:47 +03:00
Nikita Popov
12308139ec Emit noalias on &mut parameters by default
This used to be disabled due to LLVM bugs in the handling of
noalias information in conjunction with unwinding. However,
according to #31681 all known LLVM bugs have been fixed by
LLVM 6.0, so it's probably time to reenable this optimization.

Noalias annotations will not be emitted by default if either
-C panic=abort (as previously) or LLVM >= 6.0 (new).

-Z mutable-noalias=no is left as an escape-hatch to allow
debugging problems suspected to stem from this change.
2018-05-17 22:27:29 +02:00
Nick Cameron
8de091ed4e Update RLS and Rustfmt 2018-05-18 08:20:36 +12:00
Simonas Kazlauskas
59bb0fe66e Fix align_offset_stride1 & align_to_simple tests 2018-05-17 23:13:43 +03:00
Simonas Kazlauskas
6d5bf8b23f Remove the intrinsic for align_offset
Keep only the language item. This removes some indirection and makes
codegen worse for debug builds, but simplifies code significantly, which
is a good tradeoff to make, in my opinion.

Besides, the codegen can be improved even further with some constant
evaluation improvements that we expect to happen in the future.
2018-05-17 23:13:42 +03:00
Vadim Petrochenkov
dae5f05f43 Remove the proc keyword again 2018-05-17 23:13:09 +03:00
Vadim Petrochenkov
c4352ff198 Turn some functions from token.rs into methods on Ident 2018-05-17 23:13:09 +03:00
Vadim Petrochenkov
f4cbc2388f Pass crate editions to macro expansions, update tests 2018-05-17 23:13:09 +03:00
Vadim Petrochenkov
76bf3454da Keep crate edition in metadata 2018-05-17 23:13:09 +03:00
Vadim Petrochenkov
cd4925d1b8 Add tests 2018-05-17 23:13:09 +03:00
Vadim Petrochenkov
f89e356245 Add two keywords specific to editions 2015 and 2018 respectively 2018-05-17 23:13:09 +03:00
Simonas Kazlauskas
680031b016 Implement [T]::align_to 2018-05-17 23:13:08 +03:00
Vadim Petrochenkov
640884bad0 Add edition to expansion info 2018-05-17 23:13:08 +03:00
Vadim Petrochenkov
ee5b1e15aa Move definition of Edition from libsyntax to libsyntax_pos 2018-05-17 23:13:08 +03:00
varkor
ff0f00d318 Add doc comments mentioning unspecified behaviour upon exhaustion 2018-05-17 20:58:28 +01:00
varkor
1b3ecbcebb Stabilise into_inner 2018-05-17 20:58:28 +01:00
varkor
edad2eff0c Stabilise inclusive_range_methods 2018-05-17 20:58:28 +01:00
Mark Simulacrum
faa1f21298
Rollup merge of #50839 - glassresistor:master, r=steveklabnik
Make sure people know the book is free oline

I've used the tutorial a number of times to relearn rust basics.  When i saw this for a moment I was sad thinking it had been taken offline.
2018-05-17 13:51:30 -06:00
Mark Simulacrum
53ea73a5cd
Rollup merge of #50837 - steveklabnik:revert-49767, r=QuietMisdreavus
Revert #49767

There was [some confusion](https://github.com/rust-lang/rust/pull/49767#issuecomment-389250815) and I accidentally merged a PR that wasn't ready.
2018-05-17 13:51:28 -06:00
Mark Simulacrum
54df1bf200
Rollup merge of #50818 - nnethercote:faster-normalize, r=nikomatsakis
Speed up `opt_normalize_projection_type`

`opt_normalize_projection_type` is hot in the serde and futures benchmarks in rustc-perf. These two patches speed up the execution of most runs for them by 2--4%.
2018-05-17 13:51:27 -06:00