Commit Graph

63889 Commits

Author SHA1 Message Date
Simonas Kazlauskas
54de2749b0 Try fixing bigendian metadata serialisation
I compiled this on PPC to check and it seems to work, but not sure whether I didn't mess up
anything in a major way.

Maybe a good shot at #41443
2017-05-01 04:51:17 +03:00
Niko Matsakis
6c2f64bdd8 modify ExprUseVisitor and friends to take region-maps, not def-id 2017-04-30 17:03:32 -04:00
Taylor Cramer
73cd9bde37 introduce per-fn RegionMaps
Instead of requesting the region maps for the entire crate, request for
a given item etc. Several bits of code were modified to take
`&RegionMaps` as input (e.g., the `resolve_regions_and_report_errors()`
function). I am not totally happy with this setup -- I *think* I'd
rather have the region maps be part of typeck tables -- but at least the
`RegionMaps` works in a "parallel" way to `FreeRegionMap`, so it's not
too bad. Given that I expect a lot of this code to go away with NLL, I
didn't want to invest *too* much energy tweaking it.
2017-04-30 17:03:30 -04:00
Niko Matsakis
c7dc39dbf0 intern CodeExtents
Make a `CodeExtent<'tcx>` be something allocated in an arena
instead of an index into the `RegionMaps`.
2017-04-30 17:02:59 -04:00
Niko Matsakis
55d6066c05 remove ROOT_CODE_EXTENT and DUMMY_CODE_EXTENT
Instead, thread around `Option<CodeExtent>` where applicable.
2017-04-30 17:02:58 -04:00
Taylor Cramer
119c38ea91 Remove RefCells from RegionMaps 2017-04-30 17:02:58 -04:00
Taylor Cramer
eff39b73d1 On-demandify region mapping 2017-04-30 17:02:56 -04:00
Titus Barik
04e4d426a1 Rename os variable in bootstrap.py to avoid shadowing os module. 2017-04-30 16:10:31 -04:00
Marco A L Barbosa
98964832f3 Add -march=armv7-a parameter to armv7 android linker 2017-04-30 15:07:43 -03:00
Marco A L Barbosa
5cf044643d Change arm-linux-androideabi to correspond to the armeabi official ABI
Fixes #40941.
2017-04-30 14:52:29 -03:00
Mark Simulacrum
3b003233fd Add test for issue #16994. 2017-04-30 08:53:47 -06:00
bors
06fb4d2564 Auto merge of #41651 - arielb1:missing-adjustment-2, r=eddyb
refactor the handling of lvalue ops

I think I got the code into a "mostly sane" situation.

Fixes #41604.

beta-nominating because fixes regression in #41578. I think I can do a smaller fix, but the previous code is too fragile.

r? @eddyb
2017-04-30 13:38:12 +00:00
Ariel Ben-Yehuda
b7b3c232f7 refactor the handling of lvalue ops
Fixes #41604.
2017-04-30 15:49:04 +03:00
bors
c0f86f5927 Auto merge of #41602 - hsivonen:explainnonnull, r=steveklabnik
Explain why zero-length slices require a non-null pointer

In reference to [a thread on Discourse](https://users.rust-lang.org/t/why-does-std-slice-from-raw-parts-require-a-non-null-pointer-for-zero-length-slices/10534), explain why `from_raw_parts` requires a non-null pointer for zero-length slices.

r? @steveklabnik
2017-04-30 07:58:10 +00:00
bors
78f6318136 Auto merge of #41643 - frewsxcv:rollup, r=frewsxcv
Rollup of 6 pull requests

- Successful merges: #41449, #41509, #41608, #41613, #41636, #41637
- Failed merges:
2017-04-30 05:25:47 +00:00
Corey Farwell
43cb7c4212 Rollup merge of #41637 - eddyb:used-not-dead, r=petrochenkov
Don't ever warn about #[used] items being dead code.

Fixes #41628 by whitelisting `#[used]` items in `rustc::middle::dead`.
2017-04-29 23:44:31 -04:00
Corey Farwell
eab2af9af5 Rollup merge of #41636 - moosingin3space:fix/process-exit-in-forget-doc, r=sfackler
process:exit -> process::exit in mem::forget docs

The documentation in mem::forget says "...or call `process:exit`..."
instead of `process::exit`.

r? @steveklabnik
2017-04-29 23:44:30 -04:00
Corey Farwell
c9f5a47ed1 Rollup merge of #41613 - cuviper:fix-release-links, r=aturon
Fix links in RELEASES.md for 1.10.0 through 1.12.0

Many links in this series have the `[link text]` and `(url)` on separate
lines, which doesn't get correctly interpreted in markdown.  Or maybe it
once did, but it doesn't now.  This patch joins the lines together.

Here is the content rendered [before](2971d491b9/RELEASES.md (version-1120-2016-09-29)) and [after](e8c4b7af21/RELEASES.md (version-1120-2016-09-29)).
2017-04-29 23:44:29 -04:00
Corey Farwell
b14694071c Rollup merge of #41608 - cuviper:distcheck-rust-src, r=alexcrichton
Add a distcheck for rust-src completeness

This is for the last commit of #41546.  For some reason, @bors only saw the first two commits, and wouldn't approve the last even when explicitly directed so.

r? @alexcrichton
2017-04-29 23:44:28 -04:00
Corey Farwell
3c1070689b Rollup merge of #41509 - froydnj:float-stack-reduction, r=nagisa
reduce stack requirements for floating-point formatting

Doing this speeds up float formatting by ~10% or so, and also makes the formatting code more suitable for embedded environments where stack space is at a premium.
2017-04-29 23:44:27 -04:00
Corey Farwell
ab99c9beb5 Rollup merge of #41449 - Eh2406:master, r=aturon
FromIterator and Extend Cow for String

This is a quick draft to start working on [#41351](https://github.com/rust-lang/rust/issues/41351).
I don't think I got the stable attributes correct, but it is good enuf to start a conversation.
2017-04-29 23:44:27 -04:00
bors
ba5b911340 Auto merge of #41593 - achernyak:def_span, r=eddyb
query for def_span

Resolves `fn def_span(&self, sess: &Session, def: DefId) -> Span;` of  #41417.

I had to change the query name to `def_sess_span` since `ty::TyCtxt` already has a method `def_span` implemented.

This also will probably have merge conflicts with  #41534 but I will resolves those once it's merged and wanted to start a code review on this one now.

r? @eddyb
2017-04-30 02:48:11 +00:00
bors
afa1240e57 Auto merge of #41544 - alexcrichton:bump-bootstrap, r=brson
Update stage0 bootstrap compiler

We've got a freshly minted beta compiler, let's update to use that on nightly!
This has a few other changes associated with it as well

* A bump to the rustc version number (to 1.19.0)
* Movement of the `cargo` and `rls` submodules to their "proper" location in
  `src/tools/{cargo,rls}`. Now that Cargo workspaces support the `exclude`
  option this can work.
* Updates of the `cargo` and `rls` submodules to their master branches.
* Tweak to the `src/stage0.txt` format to be more amenable for Cargo version
  numbers. On the beta channel Cargo will bootstrap from a different version
  than rustc (e.g. the version numbers are different), so we need different
  configuration for this.
* Addition of `dev` as a readable key in the `src/stage0.txt` format. If present
  then stage0 compilers are downloaded from `dev-static.rust-lang.org` instead
  of `static.rust-lang.org`. This is added to accomodate our updated release
  process with Travis and AppVeyor.
2017-04-29 20:38:15 +00:00
Eduard-Mihai Burtescu
c054b2a761 Don't ever warn about #[used] items being dead code. 2017-04-29 23:18:15 +03:00
Alex Crichton
5daf557a77 Update stage0 bootstrap compiler
We've got a freshly minted beta compiler, let's update to use that on nightly!
This has a few other changes associated with it as well

* A bump to the rustc version number (to 1.19.0)
* Movement of the `cargo` and `rls` submodules to their "proper" location in
  `src/tools/{cargo,rls}`. Now that Cargo workspaces support the `exclude`
  option this can work.
* Updates of the `cargo` and `rls` submodules to their master branches.
* Tweak to the `src/stage0.txt` format to be more amenable for Cargo version
  numbers. On the beta channel Cargo will bootstrap from a different version
  than rustc (e.g. the version numbers are different), so we need different
  configuration for this.
* Addition of `dev` as a readable key in the `src/stage0.txt` format. If present
  then stage0 compilers are downloaded from `dev-static.rust-lang.org` instead
  of `static.rust-lang.org`. This is added to accomodate our updated release
  process with Travis and AppVeyor.
2017-04-29 12:11:14 -07:00
Nathan Moos
087b838dd2 process:exit -> process::exit in mem::forget docs
The documentation in mem::forget says "...or call `process:exit`..."
instead of `process::exit`.

r? @steveklabnik
2017-04-29 14:56:35 -04:00
achernyak
d3b7af0e26 removed custom functions and comment 2017-04-29 13:11:01 -05:00
Ralf Jung
23522f6cab need to pick a new feature name 2017-04-29 19:15:59 +02:00
achernyak
00d02cf910 chaned dep nodes impl 2017-04-29 11:04:55 -05:00
bors
b4d3ed64ec Auto merge of #39291 - Freyskeyd:check_context_E0423, r=petrochenkov
Checker:: Execute levenshtein before other context checking

As explain [here]() i think it's better to check for a miss typing before checking context dependent help.

```rust
struct Handle {}

struct Something {
     handle: Handle
}

fn main() {
     let handle: Handle = Handle {};

     let s: Something = Something {
         // Checker detect an error and propose a solution with `Handle { /* ... */ }`
         // but it's a miss typing of `handle`
         handle: Handle
    };
}
```

Ping: @nagisa for #39226

Signed-off-by: Freyskeyd <simon.paitrault@gmail.com>
2017-04-29 15:18:52 +00:00
achernyak
ad1959e8e4 added dep nodes and comment 2017-04-29 09:56:01 -05:00
bors
e326e86b47 Auto merge of #41588 - cengizIO:master, r=nikomatsakis
use diff crate for compile-fail test diagnostics #41474

Hello!

This fixes #41474

We were using a custom implementation to dump the differences between expected and actual outputs of compile-fail tests.

I removed this internal implementation and added `diff` crate as a new dependency to `compile-fail`.

Again, huge thanks to @nikomatsakis for guiding.
2017-04-29 12:59:45 +00:00
bors
12e76e24cc Auto merge of #41623 - alexcrichton:update-sccache, r=TimNN
ci: Update sccache build

Pulls in mozilla/sccache@ef0d77543 to fix #40240 again after the builds included
in #41447 forgot to include the mio fixed included in #41076.

Closes #40240
2017-04-29 08:36:57 +00:00
Ralf Jung
998a877737 MutexGuard<T> may be Sync only if T is Sync
Also remove some unnecessary unsafe impl from the tests.
2017-04-29 09:44:09 +02:00
Alex Crichton
aa891a57a1 ci: Update sccache build
Pulls in mozilla/sccache@ef0d77543 to fix #40240 again after the builds included
in #41447 forgot to include the mio fixed included in #41076.

Closes #40240
2017-04-29 00:29:54 -07:00
bors
b9e9a03462 Auto merge of #41564 - gaurikholkar:master, r=nikomatsakis
Disable ref hint for pattern in let and adding ui tests #40402

A fix to #40402

The `to prevent move, use ref e or ref mut e ` has been disabled.
```
fn main() {
    let v = vec![String::from("oh no")];

    let e = v[0];
}
```
now gives
```
error[E0507]: cannot move out of indexed content
 --> example.rs:4:13
  |
4 |     let e = v[0];
  |             ^^^^ cannot move out of indexed content

error: aborting due to previous error
```
I have added ui tests for the same and also modified a compile-fail test.
2017-04-29 06:16:22 +00:00
Mark Simulacrum
f48a8f592d Unignore tests which work fine now. 2017-04-28 22:31:10 -06:00
bors
95467d33cb Auto merge of #41577 - Keruspe:master, r=alexcrichton
rustbuild improvements

Properly hook up cargo and rls in the build phase, and install them, when extended build is enabled.
2017-04-29 03:56:09 +00:00
Artem Chernyak
2f73b173cb Merge branch 'master' into def_span 2017-04-28 22:44:34 -05:00
achernyak
ba90718bb4 found the stack overflow culprit 2017-04-28 22:42:05 -05:00
Eh2406
0e2571b4ad FromIterator and Extend Cow for String 2017-04-28 22:30:12 -04:00
Amit Aryeh Levy
0f00f27e0d Added LLVMRustRelocMode
Replaces the llvm-c exposed LLVMRelocMode, which does not include all
relocation model variants, with a LLVMRustRelocMode modeled after
LLVMRustCodeMode.
2017-04-28 17:33:56 -05:00
bors
810ed98d08 Auto merge of #41542 - petrochenkov:objpars2, r=nikomatsakis
syntax: Parse trait object types starting with a lifetime bound

Fixes https://github.com/rust-lang/rust/issues/39085

This was originally implemented in https://github.com/rust-lang/rust/pull/40043, then reverted, then there was some [agreement](https://github.com/rust-lang/rust/issues/39318#issuecomment-289108720) that it should be supported.
(This is hopefully the last PR related to bound parsing.)
2017-04-28 22:28:11 +00:00
alexey zabelin
c741bc8032
Fix error message label 2017-04-28 18:01:06 -04:00
achernyak
93ac5dff2a review updateds 2017-04-28 16:29:05 -05:00
Nathan Froyd
b2c3102e62 fmt: use mem::uninitialized for float formatting buffers
Spending time to initialize these is just wasted work, as we'll
overwrite them soon anyway.

Fixes #41259.
2017-04-28 16:08:37 -04:00
Nathan Froyd
2499d819d4 fmt: use the minimum parts array size
The comments for flt2dec::to_shortest_str says that we only need a slice
of length 5 for the parts array.  Initializing a 16-part array is just
wasted effort and wasted stack space.  Other functions in the flt2dec
module have similar comments, so we adjust the parts arrays passed to
those functions accordingly.
2017-04-28 15:33:17 -04:00
Nathan Froyd
a21f61685d fmt: reduce the stack space required by float formatting
For the two major entry points for float formatting, we split the exact
case and the shortest cases into separate functions.  We mark the
separate functions as #[inline(never) so the exact cases won't bloat
stack space in their callers unnecessarily.  The shortest cases are
marked so for similar reasons.

Fixes #41234.
2017-04-28 15:27:08 -04:00
Nathan Froyd
5a0078520e num: add minimal benchmarks for full floating-point formatting
We have benchmarks for the floating-point formatting algorithms
themselves, but not for the surrounding machinery like Formatter and
translating to the flt2dec::Part slices.
2017-04-28 15:24:09 -04:00
Josh Stone
e8c4b7af21 Fix links in RELEASES.md for 1.10.0 through 1.12.0
Many links in this series have the `[link text]` and `(url)` on separate
lines, which doesn't get correctly interpreted in markdown.  Or maybe it
once did, but it doesn't now.  This patch joins the lines together.
2017-04-28 12:11:33 -07:00