Commit Graph

61393 Commits

Author SHA1 Message Date
bors
d5f54743db Auto merge of #39386 - tbu-:pr_pipe_less_syscalls, r=alexcrichton
Use less syscalls in `anon_pipe()`

Save a `ENOSYS` failure from `pipe2` and don't try again.

Use `cvt` instead of `cvt_r` for `pipe2` - `EINTR` is not an error
`pipe2` can return.
2017-02-02 13:04:53 +00:00
Son
c4cd4e19d9 Wrap 80 columns 2017-02-02 22:24:50 +11:00
Giang Nguyen
a7b65f1578 Add doc field init shorthand 2017-02-02 22:19:41 +11:00
Giang Nguyen
3388855443 Add explain struct field init shorthand 2017-02-02 22:19:24 +11:00
Giang Nguyen
897029d072 Update grammar struct field init shorthand 2017-02-02 22:18:43 +11:00
Son
823e185a40 Suggest only if resolution was previously resolved 2017-02-02 22:05:49 +11:00
bors
3b24c70012 Auto merge of #39384 - wesleywiser:fix_fixmes, r=alexcrichton
Resolve a bunch of fixmes

Resolves 56 fixmes in test code related to `box` syntax.
2017-02-02 10:40:13 +00:00
bors
6abe64871e Auto merge of #39116 - mgattozzi:better-string-message, r=nrc
Add clearer error message using `&str + &str`

This is the first part of #39018. One of the common things for new users
coming from more dynamic languages like JavaScript, Python or Ruby is to
use `+` to concatenate strings. However, this doesn't work that way in
Rust unless the first type is a `String`. This commit adds a check for
this use case and outputs a new error as well as a suggestion to guide
the user towards the desired behavior. It also adds a new test case to
test the output of the error.
2017-02-02 07:39:07 +00:00
bors
1b6b20ac17 Auto merge of #38932 - petrochenkov:privctor, r=jseyfried
Privatize constructors of tuple structs with private fields

This PR implements the strictest version of such "privatization" - it just sets visibilities for struct constructors, this affects everything including imports.
```
visibility(struct_ctor) = min(visibility(struct), visibility(field_1), ..., visibility(field_N))
```
Needs crater run before proceeding.

Resolves https://github.com/rust-lang/rfcs/issues/902

r? @nikomatsakis
2017-02-02 05:10:40 +00:00
Austin Bonander
89f9767356 Change tracking issue for proc_macro feature to #38356 2017-02-01 20:11:10 -08:00
Wesley Wiser
8b947a37c8 Update Cell references in the book 2017-02-01 22:53:39 -05:00
Wesley Wiser
daa509109f Update cell docs 2017-02-01 22:51:52 -05:00
Nick Cameron
395f23c9f7 save-analysis: be more paranoid about generated paths
fixes https://github.com/rust-lang-nursery/rls/issues/160
2017-02-02 16:23:27 +13:00
bors
2a6f7e41fc Auto merge of #38661 - frewsxcv:vec-deque-partial-eq, r=aturon
Implement `PartialEq<[A]>` for `VecDeque<A>`.

Fixes https://github.com/rust-lang/rust/issues/38625.
2017-02-02 02:42:07 +00:00
Michał Krasnoborski
ecda7f314f remove the wrapping arithmetics 2017-02-02 03:38:12 +01:00
Michał Krasnoborski
7403ee9d07 Adjust heuristics to better handle "{}..." format strings. 2017-02-01 23:47:03 +01:00
f001
dfcca546fc std: Add ToString trait specialization for Cow<'a, str> and String
r? @bluss
2017-02-01 19:17:51 +08:00
Wesley Wiser
94687aaf58 Removes FIXMEs related to #22405 2017-01-31 21:27:13 -05:00
Federico Mena Quintero
4a07e722c0 In std:rc, clarify the lack of mutability inside an Rc
Also, point to the example in Cell's docs for how to do it.
2017-01-31 18:02:41 -06:00
Sean McArthur
cd603e4324 add From<(I, u16)> for SocketAddr where I: Into<IpAddr> 2017-01-31 15:07:22 -08:00
Steve Klabnik
4b52600b15 update mailmap for @pliniker 2017-01-31 13:19:03 -05:00
Jonathan A. Kollasch
6d9f3590c5 Add i686-unknown-netbsdelf target 2017-01-31 11:43:58 -06:00
Jonathan A. Kollasch
d10a509932 Don't build gcc_personality_v0.c on NetBSD either 2017-01-31 11:33:54 -06:00
Niko Matsakis
d848f1d782 rewrite the predecessors code to create a reduced graph
The old code created a flat listing of "HIR -> WorkProduct" edges.
While perfectly general, this could lead to a lot of repetition if the
same HIR nodes affect many work-products. This is set to be a problem
when we start to skip typeck, since we will be adding a lot more
"work-product"-like nodes.

The newer code uses an alternative strategy: it "reduces" the graph
instead. Basically we walk the dep-graph and convert it to a DAG, where
we only keep intermediate nodes if they are used by multiple
work-products.

This DAG does not contain the same set of nodes as the original graph,
but it is guaranteed that (a) every output node is included in the graph
and (b) the set of input nodes that can reach each output node is
unchanged.

(Input nodes are basically HIR nodes and foreign metadata; output nodes
are nodes that have assocaited state which we will persist to disk in
some way. These are assumed to be disjoint sets.)
2017-01-31 12:07:31 -05:00
Oliver Schneider
d73e84d2e7 use suggestions instead of helps with code in them 2017-01-31 14:45:08 +01:00
bors
24055d0f2a Auto merge of #39379 - segevfiner:fix-backtraces-on-i686-pc-windows-gnu, r=alexcrichton
Fix backtraces on i686-pc-windows-gnu by disabling FPO

This might have performance implications. But do note that MSVC
disables FPO by default nowadays and it's use is limited in exception
heavy languages like C++.

See discussion in: #39234
Closes: #28218
2017-01-31 11:18:22 +00:00
bors
cd692cc7ec Auto merge of #39354 - alexcrichton:less-output, r=steveklabnik
rustdoc: Suppress warnings/errors with --test

Threads spawned by the test framework have their output captured by default, so
for `rustdoc --test` threads this propagates that capturing to the spawned
thread that we now have.

Closes #39327
2017-01-31 08:44:07 +00:00
bors
0c85f2a1bd Auto merge of #38847 - michaelwoerister:gate-on-incr-comp, r=alexcrichton
travis: Gate on some minimal support for incremental compilation.

This commit adds a travis job that

1. builds a stage2 compiler in incremental mode (but with empty incremental compilation cache), and
2. builds and runs the run-pass test suite also in incremental mode.

Building incrementally with an empty cache makes sure that the compiler doesn't crash in dependency tracking during bootstrapping. Executing the incrementally built test suite gives some measure of confidence that we generate valid code.

Note, however, that the above does not give strong guarantees about the validity of incremental compilation, it just provides a basis for being able to rely on from-scratch incr. comp. builds as reference values in further tests (which then do actual incremental compilation).

r? @alexcrichton
2017-01-31 06:13:05 +00:00
bors
b854d74bb8 Auto merge of #39250 - cseale:issue_30924, r=est31
[Gate Tests] - marking feature tests

Removal of the lang feature gate tests whitelist #39059

r? @est31
2017-01-31 03:28:12 +00:00
Jeremy Soller
b13d9ce222 Add dev and ino to MetadataExt 2017-01-30 20:19:00 -07:00
Colm Seale
94e9086685 [Gate Tests] - marking feature tests
Removal of the lang feature gate tests whitelist #39059

r? @est31
2017-01-31 00:24:06 +00:00
bors
8e9e055276 Auto merge of #39230 - petrochenkov:nobox, r=eddyb
Refactoring TyBox -> TyAdt

r? @eddyb
cc @Manishearth
2017-01-31 00:02:15 +00:00
Trevor Spiteri
fe324cea64 rustdoc: mark ffi functions with unsafety icon 2017-01-31 00:57:52 +01:00
Alex Crichton
775b32305f travis: Really delete the doc folder
Got two location to look at, be sure to delete them both.
2017-01-30 15:21:35 -08:00
Michael Woerister
d292e1229f compiletest: Clear RUSTFLAGS env-var for run-make tests. 2017-01-30 15:38:11 -05:00
Vadim Petrochenkov
93e3f634b0 Fix debuginfo scope issue with Box 2017-01-30 23:18:29 +03:00
Vadim Petrochenkov
a5d725cc82 cleanup: Refactor away DtorKind 2017-01-30 23:18:22 +03:00
Vadim Petrochenkov
4a4f8ff0a3 Implement Drop for Box 2017-01-30 23:14:15 +03:00
Vadim Petrochenkov
ffba0cea62 Merge ty::TyBox into ty::TyAdt 2017-01-30 23:14:15 +03:00
Tamir Duberstein
83fe5325d2
statics in match arm: compile with -g
Closes #24956.
2017-01-30 14:52:59 -05:00
bors
8921707653 Auto merge of #39368 - alexcrichton:fix-upload-dirs, r=aturon
travis: Tweak artifact uploads

* Don't upload `*.wixpdb` files by accident
* Don't upload `doc` dir by accident
* Fix level of indirection on Travis
2017-01-30 19:43:08 +00:00
Tamir Duberstein
bcca5e6454
trans::debuginfo: simplify 2017-01-30 13:47:05 -05:00
Alex Crichton
45d203df30 travis: Tweak artifact uploads
* Don't upload `*.wixpdb` files by accident
* Don't upload `doc` dir by accident
* Fix level of indirection on Travis
2017-01-30 08:56:30 -08:00
Tobias Bucher
4b46d2a3a2 Don't handle ENOSYS in anon_pipe()
We're not calling the raw syscall but a libc function, the libc will
have a compatibility layer.
2017-01-30 17:37:49 +01:00
bors
55f9712d14 Auto merge of #39407 - GuillaumeGomez:convert_module, r=frewsxcv
Add missing url in convert module

r? @frewsxcv
2017-01-30 13:16:57 +00:00
bors
c8699376cd Auto merge of #39405 - tshepang:nits, r=sfackler
doc: minor Option improvements
2017-01-30 06:45:13 +00:00
Tshepang Lekhonkhobe
4814fa488e doc: minor Option improvements 2017-01-30 08:39:03 +02:00
bors
15ad83f1d9 Auto merge of #39389 - Wilfred:patch-2, r=apasel422
Minor grammar fix 'can not' -> 'cannot'

The previous version suggested that the compiler chooses not to check, rather than being unable to check.
2017-01-30 02:47:06 +00:00
king6cong
701c32ed4a unify time_passes argument passing 2017-01-30 10:22:26 +08:00
king6cong
986dd077ea doc comment reword 2017-01-30 10:12:10 +08:00