Commit Graph

52734 Commits

Author SHA1 Message Date
Vadim Petrochenkov
b32d7b5923 syntax: Merge keywords and remaining special idents in one list
Simplify the macro used for generation of keywords
Make `Keyword::ident` private
2016-04-24 20:59:44 +03:00
Vadim Petrochenkov
923001ebb7 Add tests 2016-04-24 20:59:44 +03:00
Vadim Petrochenkov
8dbab5121e syntax: Don't parse idents with parse_path
Lift some restrictions on type parameters in paths
Sanity check import paths for type parameters
2016-04-24 20:59:44 +03:00
Vadim Petrochenkov
e2c821d35e syntax: Make static/super/self/Self keywords + special ident cleanup 2016-04-24 20:59:44 +03:00
Vadim Petrochenkov
546c052d22 syntax: Get rid of token::IdentStyle 2016-04-24 20:59:44 +03:00
Vadim Petrochenkov
8dbf8f5f0a syntax: Don't rely on token::IdentStyle in the parser 2016-04-24 20:59:44 +03:00
bors
91aea5cf87 Auto merge of #33163 - c4rlo:patch-2, r=Manishearth
subtyping.md: typo fix
2016-04-24 10:10:50 -07:00
Manish Goregaokar
17ba11d105
Rollup merge of #33125 - Manishearth:closure-span, r=Manishearth
Track the span corresponding to the `|...|` part of the closure.

lifted from #32756
cc #31645

libsyntax-[breaking change]
2016-04-24 18:13:50 +05:30
Niko Matsakis
ecd10f04ce thread tighter span for closures around
Track the span corresponding to the `|...|` part of the closure.
2016-04-24 18:10:57 +05:30
mitaa
dca7f0162c Remove, now unnecessary, workaround
This used to be done to avoid inlining impls referencing private items,
but is now unnecessary since we actually check that impls do not
reference non-doc-reachable items.
2016-04-24 08:17:14 +02:00
mitaa
cc615b2072 Inline impls on traits too 2016-04-24 08:17:14 +02:00
bors
8d0dd7876e Auto merge of #33153 - mitaa:rdoc-dejavu, r=alexcrichton
rustdoc: Only record the same impl once

Due to inlining it is possible to visit the same module multiple times during `<Cache as DocFolder>::fold_crate`, so we keep track of the modules we've already visited.

fixes #33054

r? @alexcrichton
2016-04-23 18:02:06 -07:00
bors
23ccaddaa7 Auto merge of #33124 - sfackler:kill-ipv6-only, r=alexcrichton
Remove IPV6_V6ONLY functionality

These settings can only be adjusted before bind time, which doesn't make
sense in the current set of functionality. These methods are stable, but
haven't hit a stable release yet.

Closes #33052

[breaking-change]

r? @alexcrichton

Will also need a backport to the beta.
2016-04-23 14:40:06 -07:00
bors
ebff638219 Auto merge of #33117 - tamird:remove-outdated-workaround, r=sanxiyn
librustc: remove outdated workaround

Fixed upstream: https://github.com/llvm-mirror/llvm/commit/ca07e256f62f

@alexcrichton following up from https://github.com/rust-lang/rust/pull/31709#discussion_r59125612

cc @ranma42
2016-04-23 11:06:10 -07:00
benaryorg
68a18c4dbc
clarify documentation of TcpStream::connect() for multiple valid addresses
Signed-off-by: benaryorg <binary@benary.org>
2016-04-23 17:51:22 +02:00
bors
f01bb5ed24 Auto merge of #33092 - alexcrichton:rustbuild-docs, r=brson
rustbuild: Run all markdown documentation tests

This commit adds support to rustbuild to run all documentation tests, basically
running `rustdoc --test` over all our documentation.
2016-04-23 05:36:28 -07:00
c4rlo
abf00c65c2 subtyping.md: typo fix 2016-04-23 11:58:58 +01:00
bors
ef57fb7144 Auto merge of #33084 - alexcrichton:osx-python-sanity, r=michaelwoerister
Sanity check Python on OSX for LLDB tests

Two primary changes:

* Don't get past the configure stage if `python` isn't coming from `/usr/bin`
* Call `debugger.Terminate()` to prevent segfaults on newer versions of LLDB.

Closes #32994
2016-04-23 01:18:03 -07:00
bors
bb4b0d8943 Auto merge of #33020 - nikomatsakis:compiletest-json, r=alexcrichton
port compiletest to use JSON output

This uncovered a lot of bugs in compiletest and also some shortcomings
of our existing JSON output. We had to add information to the JSON
output, such as suggested text and macro backtraces. We also had to fix
various bugs in the existing tests.

Joint work with @jonathandturner.

r? @alexcrichton
2016-04-22 21:47:54 -07:00
Andy Russell
c7c34fdace
show unstable status for deprecated items 2016-04-22 23:35:48 -04:00
bors
66ff163081 Auto merge of #32466 - jooert:btree_append, r=apasel422
Implement `append` for b-trees.

I have finally found time to revive #26227, this time only with an `append` implementation.

The algorithm implemented here is linear in the size of the two b-trees. It firsts creates
a `MergeIter` from the two b-trees and then builds a new b-tree by pushing
key-value pairs from the `MergeIter` into nodes at the right heights.

Three functions for stealing have been added to the implementation of `Handle` as
well as a getter for the height of a `NodeRef`.

The docs have been updated with performance information about `BTreeMap::append` and
the remark about B has been removed now that it is the same for all instances of `BTreeMap`.

cc @gereeter @Gankro @apasel422
2016-04-22 17:54:30 -07:00
bors
af000a7bbf Auto merge of #31169 - gmbonnet:disable-option-checking, r=brson
configure: Support --disable-option-checking

I'm trying to package Rust for Fedora (this is nothing official (yet)).

The standard RPM packaging process involves running `./configure` with a whole lot of options that are commonly recognized by autotools configure scripts, but not by Rust's one. Since it does not make much sense to support all of this options, I think it would be great to support at least `--disable-option-checking`, so Rust's configure script would not fail.

[The old attempt](https://github.com/fabiand/rust-spec/blob/master/rustc.spec) to package Rust used a sed script (at line 72), but this is not the recommended way to do that.
2016-04-22 11:58:53 -07:00
Nick Fitzgerald
e078667b05 Make the Iterator::enumerate doc example more clear
The example uses integers for the value being iterated over, but the indices
added by `enumerate` are also integers, so I always end up double taking and
thinking harder than I should when parsing the documentation. I also always
forget which order the index and value are in the tuple so I frequently hit this
stumbling block. This commit changes the documentation to iterate over
characters so that it is immediately obvious which part of the tuple is the
index and which is the value.
2016-04-22 10:21:12 -07:00
mitaa
8ab2c20d8c Only record the same impl once
Due to inlining it is possible to visit the same module multiple times
during `<Cache as DocFolder>::fold_crate`, so we keep track of the
modules we've already visited.
2016-04-22 19:10:30 +02:00
Tshepang Lekhonkhobe
7609c64598 doc: that line was too long 2016-04-22 18:41:25 +02:00
Jonathan Turner
10d4cda9ed Fix filepath check for macro backtrace 2016-04-22 09:30:38 -07:00
Brayden Winterton
3e9ea3b604 Make HashSet::Insert documentation more consistent 2016-04-22 10:26:55 -06:00
Guillaume Bonnet
46b75eb54b configure: Move --disable-option-checking to a more appropriate location 2016-04-22 18:24:31 +02:00
Guillaume Bonnet
b22c8ec5c7 configure: Support --disable-option-checking 2016-04-22 18:22:50 +02:00
Jonathan Turner
d81de4871f Merge remote-tracking branch 'rust-lang/master' into compiletest-json 2016-04-22 08:05:58 -07:00
Oliver Middleton
2b1e35ec12 rustdoc: Cleanup ABI rendering
Use a common method for rendering `extern "<abi>"`.

This now consistently shows `extern "C" fn` rather than just `extern fn`.
2016-04-22 11:51:25 +01:00
bors
a264f5b7e8 Auto merge of #33089 - nrc:hir-name-res, r=eddyb
Move def id collection and extern crate handling to before AST->HIR lowering

r? @jseyfried, @eddyb, or @nikomatsakis
2016-04-22 03:41:29 -07:00
Johannes Oertel
241a3e4689 Implement append for b-trees.
The algorithm implemented here is linear in the size of the two b-trees. It
firsts creates a `MergeIter` from the two b-trees and then builds a new b-tree
by pushing key-value pairs from the `MergeIter` into nodes at the right heights.

Three functions for stealing have been added to the implementation of `Handle` as
well as a getter for the height of a `NodeRef`.

The docs have been updated with performance information about `BTreeMap::append` and
the remark about B has been removed now that it is the same for all instances of `BTreeMap`.
2016-04-22 12:30:43 +02:00
Steven Fackler
9e167ef60a Add Entry::key
This method was present on both variants of Entry, but not the enum

cc #32281
2016-04-21 22:19:49 -07:00
Jonathan Turner
fd0632fad6 Fix for filepath for cfail tests in windows 2016-04-21 18:24:44 -07:00
Leo Testard
fa23d10863 Remove some useless code. 2016-04-22 01:40:33 +02:00
Leo Testard
03ab057f97 Remove the MacroVisitor pass.
This pass was supposed to check use of gated features before
`#[cfg]`-stripping but this was not the case since it in fact happens
after. Checks that are actually important and must be done before macro
expansion are now made where the features are actually used. Close #32648.
Also ensure that attributes on macro-generated macro invocations are
checked as well. Close #32782 and #32655.
2016-04-22 01:40:33 +02:00
Leo Testard
11f1eb0c4e Fix tidy for the new syntax of feature declarations in libsyntax. 2016-04-22 01:40:30 +02:00
bors
887e947178 Auto merge of #33079 - bluss:split-iter, r=alexcrichton
Split core::iter module implementation into parts

Split core::iter module implementation into parts

split iter.rs into a directory of (implementation private) modules.

+ mod (adaptor structs whose private fields need to be available both for them and Iterator
  + iterator (Iterator trait)
  + traits (FromIterator, etc; all traits but Iterator itself)
  + range (range related)
  + sources (Repeat, Once, Empty)
2016-04-21 16:17:55 -07:00
bors
b5ba5923f8 Auto merge of #33074 - mitaa:rdoc-irlst, r=alexcrichton
rustdoc: Fix the strip-hidden `ImplStripper`

Instead of stripping impls which reference *stripped* items, we keep impls which reference *retained* items. We do this because when we strip an item we immediately return, and do not recurse into it - leaving the contained items non-stripped from the point of view of the `ImplStripper`.

fixes #33069

r? @alexcrichton
2016-04-21 10:52:15 -07:00
Leo Testard
ef1de519ff Generate the features structure and arrays with new macros.
This is more readable, safer, and allows for a much more efficient parsing.
2016-04-21 14:00:14 +02:00
Leo Testard
2f1dfe615d Rewrite the feature-gate checks to use a structure instead of a list of strings. 2016-04-21 14:00:11 +02:00
Niko Matsakis
399149ac7e fix transmute-from-fn-item-types-lint
This test was relying on buggy behavior.
2016-04-21 04:51:29 -04:00
Niko Matsakis
906cc48d48 add serialize as a dep for compiletest 2016-04-21 04:42:25 -04:00
Niko Matsakis
7aa594791d fix broken test revealed by compiletest 2016-04-21 04:42:25 -04:00
Niko Matsakis
6ce5e770d2 move json.rs file 2016-04-21 04:42:25 -04:00
Niko Matsakis
28a3c88157 pacify the merciless acrichto (somewhat)
Also add a comment or two to pacify the merciless self-critic, who hates
a closure without a comment.
2016-04-21 04:42:25 -04:00
Niko Matsakis
bf624c413f improve tidy to give you file that failed
the current tidy panics give you no idea why it failed
2016-04-21 04:42:25 -04:00
Niko Matsakis
01d2b4ab6b port compiletest to use JSON output
This uncovered a lot of bugs in compiletest and also some shortcomings
of our existing JSON output. We had to add information to the JSON
output, such as suggested text and macro backtraces. We also had to fix
various bugs in the existing tests.

Joint work with jntrnr.
2016-04-21 04:42:24 -04:00
Steven Fackler
c6480e8b6b Remove IPV6_V6ONLY functionality
These settings can only be adjusted before bind time, which doesn't make
sense in the current set of functionality. These methods are stable, but
haven't hit a stable release yet.

Closes #33052

[breaking-change]
2016-04-20 21:42:19 -07:00