Commit Graph

52602 Commits

Author SHA1 Message Date
Alex Crichton
126e09e5e5 test: Move run-make tests into compiletest
Forcing them to be embedded in makefiles precludes being able to run them in
rustbuild, and adding them to compiletest gives us a great way to leverage
future enhancements to our "all encompassing test suite runner" as well as just
moving more things into Rust.

All tests are still Makefile-based in the sense that they rely on `make` being
available to run them, but there's no longer any Makefile-trickery to run them
and rustbuild can now run them out of the box as well.
2016-04-28 21:46:40 -07:00
bors
092b0738b7 Auto merge of #33203 - Ryman:patch-3, r=alexcrichton
libstd: fix typos in thread::LocalKey docs
2016-04-26 06:57:03 -07:00
bors
03bef4c43b Auto merge of #32989 - GuillaumeGomez:e0393, r=Manishearth
Add E0393 error explanation

Part of #32777.

r? @Manishearth
cc @steveklabnik
2016-04-26 04:51:08 -07:00
bors
81d070f582 Auto merge of #32962 - taralx:patch-1, r=GuillaumeGomez
Clean up some info log spam.

Some of this looks like merge cruft, but the region spam is especially noisy.
2016-04-26 02:42:52 -07:00
Guillaume Gomez
d648fc6865 Add E0393 error explanation 2016-04-26 11:16:36 +02:00
bors
769ac42c2e Auto merge of #33099 - eddyb:issue-33096, r=michaelwoerister
Normalize types before using them in debuginfo.

Small oversight, fixes #33096 - odd thing is that the old code doesn't look like it should've ever worked, although it wasn't using all of the type parameters, so maybe that's what changed.
2016-04-26 00:36:03 -07:00
bors
41028def11 Auto merge of #33204 - Manishearth:rollup, r=Manishearth
Rollup of 7 pull requests

- Successful merges: #33107, #33133, #33160, #33167, #33194, #33196, #33200
- Failed merges:
2016-04-25 22:26:56 -07:00
bors
8ce735858d Auto merge of #33210 - alexcrichton:fix-ndk-dir, r=alexcrichton
mk: Fix use of deprecated configure var

The `--android-cross-path` has been deprecated for some time now, we should use
`CFG_ARM_LINUX_ANDROIDEABI_NDK` instead.

Ideally this would use the right triple, but we're only testing ARM for now.
2016-04-25 18:48:05 -07:00
Alex Crichton
1fac8a4564 mk: Fix use of deprecated configure var
The `--android-cross-path` has been deprecated for some time now, we should use
`CFG_ARM_LINUX_ANDROIDEABI_NDK` instead.

Ideally this would use the right triple, but we're only testing ARM for now.
2016-04-25 18:35:58 -07:00
Manish Goregaokar
3dc0b55a47 Rollup merge of #33200 - sfackler:nonblocking-docs, r=alexcrichton
Fix reference to TCP in UDP docs

Closees #33195
2016-04-26 01:44:52 +05:30
Manish Goregaokar
edbb0d5a90 Rollup merge of #33196 - mitaa:rdoc-crate-links, r=alexcrichton
rustdoc: Linkify extern crates

fixes #33178

r? @alexcrichton
2016-04-26 01:44:52 +05:30
Manish Goregaokar
b50a2ff4d1 Rollup merge of #33194 - mitaa:rdoc-a, r=alexcrichton
rustdoc: Improve accessibility of rustdoc pages

fixes #33131

r? @alexcrichton
2016-04-26 01:44:52 +05:30
Manish Goregaokar
4c0fdebe7b Rollup merge of #33167 - benaryorg:master, r=alexcrichton
clarify documentation of TcpStream::connect() for multiple valid addresses

I am not sure how the UDP part of the stdlib behaves when passing multiple valid addresses, but it should be mentioned as there are legit use cases for [`impl<'a> ToSocketAddrs for &'a [SocketAddr]`](http://doc.rust-lang.org/nightly/std/net/trait.ToSocketAddrs.html), a TCP fallback only being one.

Just a little example program for anyone willing to enhance the documentation further:

```rust
use std::net::SocketAddr;
use std::net::ToSocketAddrs;
use std::net::TcpStream;

fn main()
{
	let v: Vec<SocketAddr> = vec!
	[
		"127.0.0.1:1338".to_socket_addrs().unwrap().next().unwrap(),
		"127.0.0.1:1337".to_socket_addrs().unwrap().next().unwrap(),
		"127.0.0.1:1339".to_socket_addrs().unwrap().next().unwrap(),
	];

	let stream = TcpStream::connect(&v[..]).unwrap();
}
```
2016-04-26 01:44:51 +05:30
Manish Goregaokar
b588f6903d Rollup merge of #33160 - euclio:rustdoc-unstable-deprecated, r=alexcrichton
show unstable status for deprecated items

Fixes #32374.
2016-04-26 01:44:51 +05:30
Manish Goregaokar
5fba2bfa0a Rollup merge of #33133 - mitaa:rdoc-smth-smth-impl, r=alexcrichton
rustdoc: inline all the impls

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.

fixes #32881
fixes #33025
fixes #33113

r? @alexcrichton
2016-04-26 01:44:51 +05:30
Manish Goregaokar
1bc30a5621 Rollup merge of #33107 - sanxiyn:prev-impl-item, r=eddyb
Show previous definition of duplicate impl item

Fix #32971.
2016-04-26 01:44:51 +05:30
Ryman
2b71219a61 libstd: fix typos in thread::LocalKey docs 2016-04-25 21:01:19 +01:00
bors
bd938166d6 Auto merge of #33115 - mbrubeck:vfp3-d16, r=nrc
Enable vfp3-d16 for ARMv7 Android target

Android's [armeabi-v7a ABI][1] guarantees at least VFPv3-d16 hardware FPU support, so Rust should include this in the default features for the `arm-linux-androideabi` target.

[1]: https://developer.android.com/ndk/guides/abis.html
2016-04-25 10:43:36 -07:00
Steven Fackler
379e6fc5be Fix reference to TCP in UDP docs
Closees #33195
2016-04-25 09:12:51 -07:00
bors
90318b8c22 Auto merge of #32258 - nikomatsakis:fewer-errors, r=arielb1
Suppress fallback and ambiguity errors

If the infcx has observed other errors, then suppress both default type
parameter fallback (which can be unreliable, as the full constraint set
is not available) and errors related to unresovled
variables (annoyingly, integer type variables cannot currently be
unified with error, so that has to be a separate mechanism). Also add a
flag to `infcx` to allow us to independently indicate when we have
observed an error and hence should trigger this suppression mode.

Fixes #31997

cc @alexcrichton
r? @arielb1
2016-04-25 08:13:22 -07:00
Niko Matsakis
b3d54a2c0e patch test due to changes from compiletest-json 2016-04-25 09:38:06 -04:00
bors
cfae4dea87 Auto merge of #33184 - tamird:misc-cleanup, r=alexcrichton
librustc_back: misc cleanup

r? @alexcrichton
2016-04-25 05:45:52 -07:00
mitaa
0b5b782e39 Linkify extern crates on rustdoc pages 2016-04-25 11:26:33 +02:00
mitaa
bb9ec82563 Improve accessibility of rustdoc pages 2016-04-25 07:50:16 +02:00
bors
253b7c1e1a Auto merge of #33120 - tclfs:patch-2, r=Manishearth
docs: Highlight a keyword
2016-04-24 20:17:08 -07:00
bors
645dd013ac Auto merge of #33085 - fitzgen:make-enumerate-example-more-clear, r=steveklabnik
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-24 17:04:49 -07:00
Tamir Duberstein
847d195e3c librustc_back: fix typo 2016-04-24 19:39:02 -04:00
Tamir Duberstein
8c65ef7fa0 librustc_back: remove explicit linker
"cc" is already the default.
2016-04-24 19:39:01 -04:00
Tamir Duberstein
322f3a3eaa rustc: update Cargo.lock 2016-04-24 19:38:49 -04:00
bors
19304837c8 Auto merge of #33179 - Manishearth:breaking-batch, r=Manishearth
Batch up breaking libsyntax changes

Contains:

 - #33125
 - #33041
 - #33157

cc https://github.com/rust-lang/rust/issues/31645
2016-04-24 13:47:22 -07:00
Manish Goregaokar
a31658de51
Rollup merge of #33041 - petrochenkov:path, r=nrc,Manishearth
Paths are mostly parsed without taking whitespaces into account, e.g. `std :: vec :: Vec :: new ()` parses successfully, however, there are some special cases involving keywords `super`, `self` and `Self`. For example, `self::` is considered a path start only if there are no spaces between `self` and `::`. These restrictions probably made sense when `self` and friends weren't keywords, but now they are unnecessary.

The first two commits remove this special treatment of whitespaces by removing `token::IdentStyle` entirely and therefore fix https://github.com/rust-lang/rust/issues/14109.
This change also affects naked `self` and `super` (which are not tightly followed by `::`, obviously) they can now be parsed as paths, however they are still not resolved correctly in imports (cc @jseyfried, see `compile-fail/use-keyword.rs`), so https://github.com/rust-lang/rust/issues/29036 is not completely fixed.

The third commit also makes `super`, `self`, `Self` and `static` keywords nominally (before this they acted as keywords for all purposes) and removes most of remaining \"special idents\".

The last commit (before tests) contains some small improvements - some qualified paths with type parameters are parsed correctly, `parse_path` is not used for parsing single identifiers, imports are sanity checked for absence of type parameters - such type parameters can be generated by syntax extensions or by macros when https://github.com/rust-lang/rust/issues/10415 is fixed (~~soon!~~already!).

This patch changes some pretty basic things in `libsyntax`, like `token::Token` and the keyword list, so it's a plugin-[breaking-change].

r? @eddyb
2016-04-25 00:47:44 +05:30
Vadim Petrochenkov
4bd44be369 Fix keyword parsing tests 2016-04-24 21:35:50 +03:00
mitaa
6603c95414 Check reachability for inlined extern links too
An item is inlined and recorded as inlined even if it is
`doc(hidden)`, leading to unchecked external links.
2016-04-24 20:32:21 +02:00
Vadim Petrochenkov
9108fb7bae Remove some old code from libsyntax 2016-04-24 21:04:09 +03:00
Vadim Petrochenkov
a97f60ee86 syntax: Make is_path_start precise and improve some error messages about unexpected tokens 2016-04-24 20:59:44 +03:00
Vadim Petrochenkov
6c44bea644 syntax: Check paths in visibilities for type parameters
syntax: Merge PathParsingMode::NoTypesAllowed and PathParsingMode::ImportPrefix
syntax: Rename PathParsingMode and its variants to better express their purpose
syntax: Remove obsolete error message about 'self lifetime
syntax: Remove ALLOW_MODULE_PATHS workaround
syntax/resolve: Adjust some error messages
resolve: Compare unhygienic (not renamed) names with keywords::Invalid, invalid identifiers may appear to be valid after renaming
2016-04-24 20:59:44 +03:00
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