Commit Graph

67423 Commits

Author SHA1 Message Date
Alex Crichton
1917ffe314 Add some suggested comments around drops 2017-08-25 07:38:57 -07:00
Felix S. Klock II
d1a15cdfb1 Regression test. 2017-08-25 16:35:42 +02:00
Alex Crichton
ed5bc60d4e Remove unneeded FIXME for now 2017-08-25 07:31:05 -07:00
Alex Crichton
74b93f35da Add a self_arg convenience 2017-08-25 07:19:40 -07:00
Alex Crichton
8c97ffa1d4 Fix merge conflict 2017-08-25 07:18:19 -07:00
Alex Crichton
303a26406a Reorder slightly in visit_basic_block_data 2017-08-25 07:17:37 -07:00
Alex Crichton
b28aeeb04e Fix indentation 2017-08-25 07:16:24 -07:00
Alex Crichton
c872f47276 Merge remote-tracking branch 'origin/master' into gen 2017-08-25 07:15:12 -07:00
Felix S. Klock II
b8d8dc3c23 Fix #43457 (and avoid some unneeded lookups to boot, woo). 2017-08-25 16:08:03 +02:00
bors
a4d11495f9 Auto merge of #43700 - gaurikholkar:struct_lifetimes, r=nikomatsakis
Adding E0623 for structs

This is a fix to #43275

The error message is
```
+error[E0623]: lifetime mismatch
+  --> $DIR/ex3-both-anon-regions-both-are-structs.rs:15:12
+   |
+14 | fn foo(mut x: Vec<Ref>, y: Ref) {
+   |                   ---      --- these structs are declared with different lifetimes...
+15 |     x.push(y);
+   |            ^ ...but data from `y` flows into `x` here
+
+error: aborting due to previous error
```

r? @nikomatsakis
2017-08-25 12:59:04 +00:00
bors
ba65645c78 Auto merge of #44031 - scottmcm:swap_with_slice, r=alexcrichton
Add [T]::swap_with_slice

The safe version of a method from `ptr`, like `[T]::copy_from_slice` is.

Tracking issue: https://github.com/rust-lang/rust/issues/44030
2017-08-25 10:20:15 +00:00
bors
32b50e280f Auto merge of #44012 - michaelwoerister:cache-hir-dep-node-index, r=nikomatsakis
incr.comp.: Cache Hir-DepNodeIndices in the HIR map.

In preparation for red/green. This should also be faster than before without any additional memory cost.

r? @nikomatsakis
2017-08-25 06:40:10 +00:00
bors
426711d11c Auto merge of #43786 - scalexm:issue-43784, r=nikomatsakis
Elaborate trait obligations when typechecking impls

When typechecking trait impl declarations, we only checked that bounds explictly written on the trait declaration hold.

We now also check that bounds which would have been implied by the trait reference do hold.

Fixes #43784.
2017-08-25 02:43:20 +00:00
scalexm
68fd322a95 Change to Elaborate::None inside compute_projection 2017-08-25 03:57:44 +02:00
bors
0cbe6d8fd6 Auto merge of #44070 - smaeul:musl-libunwind, r=alexcrichton
Do not assume libunwind.a is available on musl

Fixes #40113, #44069, and clux/muslrust#16.

libunwind.a is not copied from musl_root, so it must be integrated into the unwind crate.
2017-08-25 00:04:06 +00:00
Alex Crichton
8e95b3a939 rustc: Capture diagnostics from all queries
This commit alters the `rustc::ty::maps` implementation to ensure that all
output diagnostics from the compiler are tracked for the duration of each query.
These are then intended to be replayed back the first time a cached value is
loaded, and otherwise the cache should operate the same as it does today.

Closes #42513
2017-08-24 15:18:06 -07:00
Ralf Jung
8cd4cacbc7 include Cargo.{toml,lock} in rust-src tarball 2017-08-24 23:25:35 +02:00
bors
c0771f2190 Auto merge of #44051 - eddyb:apfloat-faster-div, r=nagisa
Speed up APFloat division by using short division for small divisors.

Fixes #43828 (hopefully), by not doing long division bit-by-bit for small divisors.

When parsing the ~200,000 decimal float literals in the `tuple-stress` benchmark, this change brings roughly a 5x speed increase (from `0.6s` to `0.12s`), and the hottest instructions are native `div`s.
2017-08-24 21:18:16 +00:00
Alex Crichton
b44e51cd62 Touch up a comment on LocalDecl::internal 2017-08-24 12:00:59 -07:00
Alex Crichton
0727adec6c Avoid looking at closure_kinds for generators 2017-08-24 12:00:59 -07:00
lukaramu
49ee9f3f08 Fix inconsistent doc headings
This fixes headings reading "Unsafety" and "Example", they should be
"Safety" and "Examples" according to RFC 1574.
2017-08-24 18:42:53 +02:00
Samuel Holland
dbcaf6c80a Do not assume libunwind.a is available 2017-08-24 11:11:55 -05:00
bors
2c0558f635 Auto merge of #43345 - matthewhammer:master, r=nikomatsakis
Profile queries

This PR implements the "profile queries" debugging feature described here:
https://github.com/rust-lang-nursery/rust-forge/blob/master/profile-queries.md

In particular, it implements the debugging flag `-Z profile-queries`

FYI: This PR is my second attempt at pushing these changes.  My original PR required a rebase; I have now done that rebase manually, after messing up with git's "interactive" rebase support.  The original (now closed/cancelled) PR is this one: https://github.com/rust-lang/rust/issues/43156

r? @nikomatsakis
2017-08-24 16:04:50 +00:00
bors
af6298d590 Auto merge of #44011 - TobiasSchaffner:improved_target_spec_clean, r=alexcrichton
L4Re Target: Add the needed Libraries and locate them

Add the libraries and objects that have to be linked to a get working L4Re Binary using pre- and post-link-args. Additionaly some ld commands had to be passed.

* L4Re libraries and objects will be located by an environment variable.
* gcc libraries and objects will be located using a gcc call.

GCC is mandatory for this target, that might need documentation somewhere. As soon as something mandatory cannot be found, the compiler will panic. This is intended, because the functions involved don't allow the usage of a Result type. libgcc_eh is now passed using `-l` and crtbeginT.o and crtend.o are now located using `gcc -print-filename`.
2017-08-24 12:43:13 +00:00
bors
a125ec918f Auto merge of #43907 - euclio:command, r=alexcrichton
Use std::process::Command throughout compile-test

Resubmission of #43798.

Fixes #43762.

r? @alexcrichton
2017-08-24 10:02:18 +00:00
Guillaume Gomez
5d71280c64 Add duplicate test 2017-08-24 11:38:58 +02:00
Guillaume Gomez
b4a32434c0 Remove duplicates in rustdoc 2017-08-24 11:38:58 +02:00
Oliver Schneider
20f1e6809e Require adding clippy's path to the x.py invocation 2017-08-24 09:22:17 +02:00
bors
a12e4f8098 Auto merge of #43532 - petrochenkov:pgargs, r=nikomatsakis
Desugar parenthesized generic arguments in HIR

Fixes ICE in https://github.com/rust-lang/rust/issues/43431 and maybe some other similar issues.

r? @eddyb
2017-08-24 03:48:25 +00:00
bors
560b6ca6c0 Auto merge of #42565 - murarth:rc-from-slice, r=aturon
Implement From<&[T]> and others for Arc/Rc (RFC 1845)

* Implements `From<`{`&[T]`, `&str`, `String`, `Box<T> where T: ?Sized`, `Vec<T>`}`>` for `Arc`/`Rc`
* Removes `rustc_private`-marked methods `Rc::__from_array` and `Rc::__from_str`, replacing their use with `Rc::from`

Tracking issue: #40475
2017-08-23 23:20:32 +00:00
Niko Matsakis
373e909d07 add a comment 2017-08-23 18:56:19 -04:00
Andy Russell
91bfe3f55b
capture adb shell stdout 2017-08-23 17:32:09 -04:00
Matthew Hammer
43335aec22 -Z profile-query-and-key, separate from -Z profile-query; query key is string option 2017-08-23 15:21:39 -06:00
gaurikholkar
2cd13189ce build fixes 2017-08-24 02:34:05 +05:30
gaurikholkar
cb563a93dc adding macro, cleaning up code 2017-08-24 01:29:13 +05:30
Matthew Hammer
4251032706 -Z profile-queries includes dep_graph.with_task uses in output 2017-08-23 09:26:48 -06:00
Matthew Hammer
3c24fea882 -Z profile-queries: remove panic when channel is unset 2017-08-23 09:26:48 -06:00
Matthew Hammer
28cb03d4e1 profiling with -Z profile-queries recognizes -Z time-passes 2017-08-23 09:26:48 -06:00
Matthew Hammer
d7ec3e1a7d inc comp: -Z profile-queries support; see also https://github.com/rust-lang-nursery/rust-forge/blob/master/profile-queries.md 2017-08-23 09:26:48 -06:00
gaurikholkar
b569094d94 minor fix 2017-08-23 19:43:05 +05:30
bors
2bb8fca182 Auto merge of #44058 - frewsxcv:rollup, r=frewsxcv
Rollup of 8 pull requests

- Successful merges: #43631, #43977, #43983, #44016, #44039, #44043, #44047, #44054
- Failed merges:
2017-08-23 13:46:14 +00:00
gaurikholkar
90ab9d9a6d code review fixes 2017-08-23 18:43:26 +05:30
Alexey Tarasov
e13090e8b2 Fixes issue #43205: ICE in Rvalue::Len evaluation.
- fixes evaluation of array length for zero-sized type referenced by
  rvalue operand.
- adds test to verify fix.

Cause of the issue.

Zero-sized aggregates are handled as operands, not lvalues. Therefore while
visiting Assign statement by LocalAnalyser, mark_as_lvalue() is not called for
related Local. This behaviour is controlled by rvalue_creates_operand() method.
As result it causes error later, when rvalue operand is evaluated in
trans_rvalue_operand() while handling Rvalue::Len case. Array length evaluation
invokes trans_lvalue() which expects referenced Local to be value, not operand.

How it is fixed.

In certain cases result of Rvalue::Len can be evaluated without calling
trans_lvalue(). Method evaluate_array_len() is introduced to handle length
evaluation for zero-sized types referenced by Locals.
2017-08-23 23:10:03 +10:00
Seiichi Uchida
601e3dac6c Add reset_err_count() to errors::Handler
The motivation here is to allow rustfmt to recover from parse errors
after failing to parse macros.
2017-08-23 21:56:09 +09:00
Corey Farwell
96efcdf065 Rollup merge of #44054 - frewsxcv:frewsxcv-libstd-thread-unwrap-or-else, r=sfackler
Thread spawning: don't run `min_stack` if the user has specified stack size.

None
2017-08-23 08:44:30 -04:00
Corey Farwell
e9853c4758 Rollup merge of #44047 - cuviper:union-basic-endian, r=petrochenkov
Fix little-endian assumptions in run-pass/union/union-basic

None
2017-08-23 08:44:29 -04:00
Corey Farwell
86f0f44762 Rollup merge of #44043 - mattico:patch-1, r=alexcrichton
Clarify windows build instructions in README

The old wording made me think you were supposed to do `python x.py --build=msvc`, which is not the case. Specify that you need to use the target triple.
2017-08-23 08:44:28 -04:00
Corey Farwell
4d83634faf Rollup merge of #44039 - remexre:master, r=steveklabnik
Mention null_mut on the pointer primitive docs.

Also adds a few mentions that both `*const` and `*mut` support functions, when only `*const` was mentioned before.
2017-08-23 08:44:27 -04:00
Corey Farwell
99ab3193da Rollup merge of #44016 - steffengy:master, r=alexcrichton
libproc_macro docs: fix brace and bracket mixup

The documentation indicates that brace is `[`.
Brace is mapped token::Brace which (expectedly) is `{`.
So the documentation is simply confusing brace and bracket there.

Even though it's just a very small issue, it can lead to quite some confusion.
2017-08-23 08:44:26 -04:00
Corey Farwell
dd58d4e45e Rollup merge of #43983 - ids1024:redox-path-prefix, r=alexcrichton
Redox: correct is_absolute() and has_root()

This is awkward, but representing schemes properly in `Components` is not easily possible without breaking backwards compatibility, as discussed earlier in https://github.com/rust-lang/rust/pull/37702.

But these methods can be corrected anyway.
2017-08-23 08:44:25 -04:00