Commit Graph

68161 Commits

Author SHA1 Message Date
Douglas Campos
2bde6949f9 bring TyCtxt into scope 2017-09-14 21:26:06 -04:00
Josh Stone
61a7703e55 Customize <FlatMap as Iterator>::fold
`FlatMap` can use internal iteration for its `fold`, which shows a
performance advantage in the new benchmarks:

    test iter::bench_flat_map_chain_ref_sum ... bench:   4,354,111 ns/iter (+/- 108,871)
    test iter::bench_flat_map_chain_sum     ... bench:     468,167 ns/iter (+/- 2,274)
    test iter::bench_flat_map_ref_sum       ... bench:     449,616 ns/iter (+/- 6,257)
    test iter::bench_flat_map_sum           ... bench:     348,010 ns/iter (+/- 1,227)

... where the "ref" benches are using `by_ref()` that isn't optimized.
So this change shows a decent advantage on its own, but much more when
combined with a `chain` iterator that also optimizes `fold`.
2017-09-14 13:51:32 -07:00
Alex Crichton
ddd321df91 travis: Move sccache to the us-west-1 region
Most of the other rust-lang buckets are in us-west-1 and I think the original
bucket was just accidentally created in the us-east-1 region. Let's consolidate
by moving it to the same location as the rest of our buckets.
2017-09-14 13:17:25 -07:00
Corey Farwell
258ef37f8e Clarify return type of String::from_utf16_lossy.
Fixes https://github.com/rust-lang/rust/issues/32874
2017-09-14 15:47:37 -04:00
bors
2d288a5ae5 Auto merge of #44502 - alexcrichton:remove-session-dep-graph, r=michaelwoerister
rustc: Remove `Session::dep_graph`

This commit removes the `dep_graph` field from the `Session` type according to
issue #44390. Most of the fallout here was relatively straightforward and the
`prepare_session_directory` function was rejiggered a bit to reuse the results
in the later-called `load_dep_graph` function.

Closes #44390
2017-09-14 19:37:11 +00:00
Alex Crichton
1cf956f2ba rustc: Remove Session::dep_graph
This commit removes the `dep_graph` field from the `Session` type according to
issue #44390. Most of the fallout here was relatively straightforward and the
`prepare_session_directory` function was rejiggered a bit to reuse the results
in the later-called `load_dep_graph` function.

Closes #44390
2017-09-14 10:40:50 -07:00
est31
168f624c7c "avoid" is a better word here than "disable" 2017-09-14 17:23:47 +02:00
Eh2406
b91bac2983 readd test 2017-09-14 10:46:14 -04:00
Michal Budzynski
199cb82597 stabilize tcpstream_connect_timeout (closes #43079) 2017-09-14 16:18:49 +02:00
Joshua Sheard
597ac36547 Merge branch 'master' into threadname 2017-09-14 14:19:53 +01:00
bors
5dfc84cfa7 Auto merge of #44480 - Zoxc:gen-liveness, r=arielb1
Analyse storage liveness and preserve it during generator transformation

This uses a dataflow analysis on `StorageLive` and `StorageDead` statements to infer where the storage of locals are live. The result of this analysis is intersected with the regular liveness analysis such that a local is can only be live when its storage is. This fixes https://github.com/rust-lang/rust/issues/44184. If the storage of a local is live across a suspension point, we'll insert a `StorageLive` statement for it after the suspension point so storage liveness is preserved. This fixes https://github.com/rust-lang/rust/issues/44179.

r? @arielb1
2017-09-14 12:28:31 +00:00
Gauri Kholkar
52294434b0 Delete fn.rs
Removing unwanted file merged in  a previous commit
2017-09-14 17:36:57 +05:30
bors
2b6bc588ca Auto merge of #44526 - leodasvacas:remove-deprecated-lang-items, r=arielb1
Remove deprecated lang items

They have been deprecated for years and there is no trace left of them in the compiler. Also removed `require_owned_box` which is dead code and other small refactorings.
2017-09-14 09:18:28 +00:00
Eduard-Mihai Burtescu
06478d12ac rustdoc: pretty-print Unevaluated expressions in types. 2017-09-14 09:45:07 +03:00
gaurikholkar
9240454a3f add ui tests for EBR 2017-09-14 10:27:41 +05:30
Nick Cameron
39c9a3d796 Attempt to fix the component manifest problem for rls-preview
cc #44270
2017-09-14 16:36:29 +12:00
gaurikholkar
696a268822 fix depth for structs 2017-09-14 10:01:12 +05:30
gaurikholkar
f8df89a5cb adding ui tests 2017-09-14 09:56:44 +05:30
gaurikholkar
d3c2386434 extend E0623 for earlybound and latebound for structs 2017-09-14 09:56:44 +05:30
bors
84bbd14e3f Auto merge of #43972 - TobiasSchaffner:std_clean, r=alexcrichton
Add the libstd-modifications needed for the L4Re target

This commit adds the needed modifications to compile the std crate for the L4 Runtime environment (L4Re).

A target for the L4Re was introduced in commit: c151220a84

In many aspects implementations for linux also apply for the L4Re microkernel.

Some uncommon characteristics had to be resolved:
 * L4Re has no network funktionality
 * L4Re has a maximum stacksize of 1Mb for threads
 * L4Re has no uid or gid

Co-authored-by: Sebastian Humenda <sebastian.humenda@tu-dresden.de>
2017-09-14 03:02:58 +00:00
Douglas Campos
d3bbce79d0 bring TyCtxt into scope 2017-09-13 23:00:17 -04:00
Tamir Duberstein
49492cb861
Update compiler-builtins
Picks up the removal of the rustbuild feature, which is still used
in our local shim, along with a comment update explaining the usage.
2017-09-13 22:55:46 -04:00
Tamir Duberstein
313b8f803e
Use double quotes to appease some TOML parsers 2017-09-13 22:55:18 -04:00
Corey Farwell
2d292cff5d Remove unneeded loop. 2017-09-13 22:44:14 -04:00
bors
d1ca653b17 Auto merge of #44484 - tirr-c:issue-44332, r=petrochenkov
Parse nested closure with two consecutive parameter lists properly

This is a followup of #44332.

---

Currently, in nightly, this does not compile:

```rust
fn main() {
    let f = |_||x, y| x+y;
    println!("{}", f(())(1, 2)); // should print 3
}
```

`|_||x, y| x+y` should be parsed as `|_| (|x, y| x+y)`, but the parser didn't accept `||` between `_` and `x`. This patch fixes the problem.

r? @petrochenkov
2017-09-14 00:28:27 +00:00
Douglas Campos
916ccc58ac remove overzealous Box<ZeroSizeType> optimization 2017-09-13 17:48:33 -04:00
Alex Burka
5f43357782 update "since" for discriminant_value
It's going to be backported to beta.
2017-09-13 17:29:55 -04:00
John Kåre Alsaker
0e8e6592f6 Fix a bug where StorageIgnored had an incorrect buffer length 2017-09-13 23:28:11 +02:00
John Kåre Alsaker
a2b3e0889f Fix nits and refactor creation of StorageLive blocks 2017-09-13 23:28:11 +02:00
John Kåre Alsaker
d97a7d2594 Make sure we aren't using dead locals 2017-09-13 23:28:11 +02:00
John Kåre Alsaker
efc7d46188 Analyse storage liveness and preserve it during generator transformation 2017-09-13 23:28:10 +02:00
bors
94211416bc Auto merge of #44516 - gaurikholkar:fns, r=arielb1
Extend E0623 for fn items

This fixes #44516
The below example now gives
```
error[E0623]: lifetime mismatch
 --> gg.rs:3:10
  |
2 | fn foo(x:fn(&u8, &u8), y: Vec<&u8>, z: &u8) {
  |                               ---      --- these two types are declared with different lifetimes...
3 |   y.push(z);
  |          ^ ...but data from `z` flows into `y` here

error: aborting due to previous error
```

r? @nikomatsakis
cc @arielb1
2017-09-13 21:20:19 +00:00
oyvindln
e89748e54f Remove the other period and start with lowercase for more consistency 2017-09-13 22:50:47 +02:00
oyvindln
edf1622bb4 Add proper help line for inline threshold
Also remove a period on a different help line for consistency
2017-09-13 20:11:02 +02:00
leonardo.yvens
9218e44434 Fix initial review 2017-09-13 14:21:16 -03:00
gaurikholkar
e71eef1775 fix ui tests 2017-09-13 20:56:27 +05:30
leonardo.yvens
c2fb70be6b Refactor fn_trait_kind
Short and sweet
2017-09-13 12:19:37 -03:00
Alex Burka
a12d0d4f66 honor #[rustc_const_unstable] attributes 2017-09-13 15:07:17 +00:00
leonardo.yvens
ab30b6a6ed Refactor how to get a lang item's name
Small refactorings
2017-09-13 12:00:40 -03:00
Alex Crichton
5cad391631 rustc: Spawn cmd /c emcc.bat explicitly
In #42436 the behavior for spawning processes on Windows was tweaked slightly to
fix various bugs, but this caused #42791 as a regression, namely that to spawn
batch scripts they need to be manually spawned with `cmd /c` instead now. This
updates the compiler to handle this case explicitly for Emscripten.

Closes #42791
2017-09-13 07:41:58 -07:00
leonardo.yvens
74107f987b Remove require_owned_box
It's unused and unnecessary
2017-09-13 11:16:45 -03:00
bors
539f2083de Auto merge of #44129 - pnkfelix:fix-end-region-emission-order, r=nmatsakis
Fix end region emission order

Fix #43481
2017-09-13 13:01:42 +00:00
Guillaume Gomez
c4044ee39a Add note for append method in OpenOptions docs 2017-09-13 14:47:50 +02:00
Guillaume Gomez
ccd4689ca3 Add missing urls for OpenOptions docs 2017-09-13 14:46:15 +02:00
Havvy
9dd2ee1942 Fix example in transmute; add safety requirement to Vec::from_raw_parts 2017-09-13 04:27:40 -07:00
Romain Porte
b40a9f4eca from_micros: add feature name 2017-09-13 13:21:20 +02:00
Felix S. Klock II
5fa0b661e0 Test case illustrating some destruction code extent stuff. 2017-09-13 12:55:03 +02:00
Felix S. Klock II
88080bd56a Unit test for proper EndRegion emission on a cyclic reference. 2017-09-13 12:55:03 +02:00
Felix S. Klock II
ab46142bd9 Update mir-opt tests to reflect change to EndRegion emission order.
Driveby fix to end_region_9.rs; it was missing END marker and was
therefore always passing (regardless of output correctness).
2017-09-13 12:55:03 +02:00
Felix S. Klock II
25aa86da17 Fix issue #43481: emit the EndRegion *before* StorageDeads for a scope.
(The idea is that the StorageDead marks the point where the memory can
be deallocated, and the EndRegion is marking where borrows of that
memory can no longer legally exist.)
2017-09-13 12:55:03 +02:00