Commit Graph

60193 Commits

Author SHA1 Message Date
Alex Crichton
08741494db Rollup merge of #38388 - redox-os:config_toml_prefix, r=alexcrichton
Add prefix to config.toml

This allows `rustbuild` to be used to install to a prefix.
```toml
[build]
prefix = "/path/to/install"
```
For example, the following `config.toml` will cause `x.py dist --install` to install to `/path/to/install`
2016-12-20 12:59:03 -08:00
Alex Crichton
adfafffce8 Rollup merge of #38346 - GuillaumeGomez:duration_doc, r=frewsxcv
Duration doc

r? @frewsxcv
2016-12-20 12:59:03 -08:00
Alex Crichton
a7710eff06 Rollup merge of #38315 - jonhoo:better-E0309, r=pnkfelix
Expand E0309 explanation with motivating example

I recently started reading @Gankro's "[Learning Rust With Entirely Too Many Linked Lists](http://cglab.ca/~abeinges/blah/too-many-lists/book/README.html)", and came across [a part](http://cglab.ca/~abeinges/blah/too-many-lists/book/second-iter.html) where he comes across `E0309`, and after showing `rustc --explain E0309` prompty says

> This is dumb. I think it's dumb. You have to do it.

Humor aside, I think this says something about the current explanation being somewhat lacking.

This patch introduces a motivating example saying why `T: 'a` is a necessary restriction. Hopefully, this will help new Rustaceans understand why leaving out the `'a` bound on `T` might lead to broken code.
2016-12-20 12:59:02 -08:00
Jeremy Soller
86f85c1399 Move start functions into libstd/rt 2016-12-20 12:41:33 -07:00
Alex Crichton
dfa9948d76 Rollup merge of #38289 - bluss:mir-verbose-test-fail, r=michaelwoerister
A more verbose matching failure for mir tests

This makes it easier to work with mir test failures during development.

- Show which expected line was not found
- Show full expected output
- Show full actual output
2016-12-20 11:16:30 -08:00
Alex Crichton
2f4ca4e2df Rollup merge of #38245 - estebank:cast-deref-hint-2, r=nikomatsakis
When cast needs a dereference point at full cast

After the fix of #37453 in PR #37369, instead of pointing at only the cast type, point at the full cast span when a cast needs a dereference, as well as assign the error label to the correct span for proper coloring:

<img width="471" alt="error span pointing at the entire cast" src="https://cloud.githubusercontent.com/assets/1606434/21024245/8797fc2e-bd38-11e6-82c1-66c281c656c1.png">

instead of

<img width="471" alt="error span pointing at the type of the cast" src="https://cloud.githubusercontent.com/assets/1606434/21023777/d4814aa6-bd36-11e6-9fc3-b2a0ea5ee15d.png">

Move `compile-fail` test to `ui` test.
2016-12-20 11:16:29 -08:00
Alex Crichton
4cfb2b48fe Rollup merge of #38236 - GuillaumeGomez:unix_socket_doc, r=frewsxcv
Unix socket doc

r? @frewsxcv
2016-12-20 11:16:26 -08:00
Alex Crichton
70e1275a1a Rollup merge of #38215 - liigo:patch-12, r=petrochenkov
minor fix about visibility in reference
2016-12-20 11:16:25 -08:00
Alex Crichton
b070feb440 Rollup merge of #38208 - frewsxcv:btreesetdocs, r=alexcrichton
Improvements to `BTreeSet` documentation.

None
2016-12-20 11:16:24 -08:00
Alex Crichton
551cb0646f Rollup merge of #38171 - jseyfried:cleanup, r=nrc
Miscellaneous cleanup/refactoring in `resolve` and `syntax::ext`

r? @nrc
2016-12-20 11:16:23 -08:00
Alex Crichton
58d58c24dc Rollup merge of #38158 - sourcefrog:doc-iter, r=GuillaumeGomez
Explain meaning of Result iters and link to factory functions
2016-12-20 11:16:22 -08:00
Alex Crichton
2fb2d307e0 Rollup merge of #38150 - estebank:fix-23286, r=nikomatsakis
Point out the known type when field doesn't satisfy bound

For file

```rust
use std::path::Path;

fn f(p: Path) { }
```

provide the following error

```nocode
error[E0277]: the trait bound `[u8]: std::marker::Sized` is not satisfied in `std::path::Path`
 --> file.rs:3:6
  |
3 | fn f(p: Path) { }
  |      ^ within `std::path::Path`, the trait `std::marker::Sized` is not implemented for `[u8]`
  |
  = note: `[u8]` does not have a constant size known at compile-time
  = note: required because it appears within the type `std::path::Path`
  = note: all local variables must have a statically known size
```

Fix #23286.
2016-12-20 11:16:20 -08:00
Alex Crichton
65e9691cef Rollup merge of #38131 - clarcharr:from_segments, r=alexcrichton
Add From<[u16; 8]> to Ipv6Addr

Not really sure that this requires an RFC, but I figured that I'd offer a pull request and see what people think. It seems like a reasonable addition.
2016-12-20 11:16:19 -08:00
Alex Crichton
68dd6fd964 Rollup merge of #38006 - frewsxcv:libstd-debug, r=alexcrichton
Implement `fmt::Debug` for all structures in libstd.

Part of https://github.com/rust-lang/rust/issues/31869.

Also turn on the `missing_debug_implementations` lint at the crate
level.
2016-12-20 11:16:17 -08:00
Alex Crichton
7fe44f77f4 Rollup merge of #37761 - christophebiocca:borrow-stdlib-fn-refactor, r=alexcrichton
Use Borrow for binary_search and contains methods in the standard library

Fixes all standard library methods in #32822 that can be fixed without backwards compatibility issues.
2016-12-20 11:16:17 -08:00
Corey Farwell
fe0d0927f7 Indicate that BTreeSet::iter returns values in ascending order.
Fixes https://github.com/rust-lang/rust/issues/38204.
2016-12-20 10:44:33 -08:00
Alex Crichton
70ef94db22 rustbuild: Run debuginfo tests by default
This fixes an accidental regression in rustbuild which stopped running debuginfo
tests by default. Here we flag the test suites as `default(true)` to ensure that
they're run on bots, for example.
2016-12-20 10:21:19 -08:00
Alex Crichton
49546cc6bb rustbuild: Actually test musl on the musl bot
A typo unfortunately meant that we haven't been testing musl for a bit, so now
it's time to discover if we accidentally introduced a regression!
2016-12-20 10:19:02 -08:00
Jeremy Soller
57bc1a982e Add arm syscalls 2016-12-20 11:17:09 -07:00
bors
3038f30f96 Auto merge of #38271 - jseyfried:rfc_1560_warning_cycle, r=nrc
resolve: change most backwards incompatible ambiguity errors to `legacy_imports` warnings

Fixes #38176.
r? @nrc or @nikomatsakis
2016-12-20 17:44:15 +00:00
Alex Crichton
57cf2ab31c rustbuild: Deny and fix warnings
Turned out this lint uncovered an actual bug!

Closes #38484
2016-12-20 09:38:57 -08:00
QuietMisdreavus
941b6b0c0c rustdoc: properly calculate line length for impl where clauses 2016-12-20 11:33:34 -06:00
Wang Xuerui
8e38b2de42
rustbuild: package src only once for build triple 2016-12-20 21:43:59 +08:00
Wang Xuerui
46d74eac23
rustbuild: only plan from build triple for dist
We only want to package each host/target once for `dist`. The obvious
solution takes the form of step dependency, which is implemented at
least for the `dist-rustc` step. Unfortunately since the steps are
created from `hosts x targets` during planning and *not* de-duplicated
afterwards, the problem still persists.

We therefore move the check inside `plan()` instead, to avoid creating
the duplicate steps in the first place.
2016-12-20 21:43:58 +08:00
Seo Sanghyeon
73877a0bc8 Find FileCheck using llvm-config 2016-12-20 19:48:14 +09:00
Guillaume Gomez
28e2c6aff9 Update ui test stderr 2016-12-20 11:43:19 +01:00
Guillaume Gomez
f439a24ca2 Fix linter issue 2016-12-20 11:37:15 +01:00
Niko Matsakis
6ea1fbb52b recover from unresolved inference variable at end of autoderef
When we are scanning for suggestions, an unresolved inference variable
is not a hard error.
2016-12-20 11:37:15 +01:00
Niko Matsakis
5d41be3629 don't special case having 1 item 2016-12-20 11:37:15 +01:00
Guillaume Gomez
25a2d13cde Allow multiple suggestions 2016-12-20 11:37:15 +01:00
Niko Matsakis
dac8883a94 fix some broken tests 2016-12-20 11:37:15 +01:00
Niko Matsakis
88e9430dbb call impl_or_trait_item() instead instead of associated_item()
The older method was not aware of the return type possibility.
2016-12-20 11:37:15 +01:00
Guillaume Gomez
044b07dd20 Update to last master 2016-12-20 11:37:15 +01:00
Niko Matsakis
3bb3278e53 revert a lot of the changes to method probe internals 2016-12-20 11:37:15 +01:00
Niko Matsakis
ec5847a698 rewrite return type probing to use the "probe by name" path
We now do two phases. First, we gather up the list of candidates with
suitable return types and extract their names. Then we filter those to
see which are applicable and we return that.

It might be nice to do the "filter by return type" as a second step,
but this is ok for now.
2016-12-20 11:37:15 +01:00
Niko Matsakis
579e52692f make probe_for generic over final operation 2016-12-20 11:37:15 +01:00
Guillaume Gomez
18b33579e1 splitting methods into smaller ones, add docs, better variable naming 2016-12-20 11:37:15 +01:00
Guillaume Gomez
b5686422e1 improve suggestions output and add ui test 2016-12-20 11:37:15 +01:00
Guillaume Gomez
eaa2ddb04f fix tests 2016-12-20 11:37:15 +01:00
Guillaume Gomez
66057a7f72 Fix invalid probe path 2016-12-20 11:37:15 +01:00
Guillaume Gomez
c11fe553df Create check_ref method to allow to check coercion with & types 2016-12-20 11:37:15 +01:00
Guillaume Gomez
b2d0ec0eb4 Fix coercion ICE 2016-12-20 11:37:15 +01:00
Guillaume Gomez
8057d485d4 Move matches return type method 2016-12-20 11:37:15 +01:00
Guillaume Gomez
07a3ede5f2 Return DiagnosticBuilder to add help suggestions 2016-12-20 11:37:15 +01:00
Guillaume Gomez
021d97d1c5 Move suggestion list creation to coerce check 2016-12-20 11:37:15 +01:00
Guillaume Gomez
164f0105bb Add safe_suggestion attribute 2016-12-20 11:37:15 +01:00
Guillaume Gomez
601bbf26a8 Start of implementation of proposal for E0308 2016-12-20 11:37:14 +01:00
Srinivas Reddy Thatiparthy
6414e67dba
run rustfmt on libcollections folder 2016-12-20 09:54:00 +05:30
est31
54f75c9572 Add regression test for #38458 2016-12-20 03:34:36 +01:00
Austin Hicks
e1d8806efd Fix closure debuginfo. 2016-12-19 21:14:27 -05:00