Commit Graph

65945 Commits

Author SHA1 Message Date
Mark Simulacrum
ef1d1bdc18 Move code out of macro and into generic method. 2017-07-20 11:23:58 -06:00
Mark Simulacrum
c114fe576f Finish fixing warnings and errors. Bootstrap builds. 2017-07-20 11:23:58 -06:00
Mark Simulacrum
7db49fb467 Move cargo() to Builder 2017-07-20 11:23:58 -06:00
Mark Simulacrum
276090e870 Fix tool_cmd 2017-07-20 11:23:58 -06:00
Mark Simulacrum
1a844ebb8f Move tool_cmd to tool.rs 2017-07-20 11:23:58 -06:00
Mark Simulacrum
60388303c7 Fixes warnings and errors introduced while moving code around 2017-07-20 11:23:58 -06:00
Mark Simulacrum
cd3dd803a7 Add Builder and Step definitions. 2017-07-20 11:23:58 -06:00
Mark Simulacrum
6b3413d825 Change code to work with the new system 2017-07-20 11:23:57 -06:00
Mark Simulacrum
001e9f3490 Move code into Step trait implementations.
No changes are introduced to code body. This commit will not build; it
is done to permit a better diff in later commits.
2017-07-20 11:23:57 -06:00
Mark Simulacrum
0a1b5e8bc0 Move rule configs out of step 2017-07-20 11:23:57 -06:00
bors
ae98ebfcb9 Auto merge of #43281 - mmatyas:remotetest_env, r=alexcrichton
Allow remote testing remotely when `TEST_DEVICE_ADDR` is set

Remote testing was added in #41268, but at the moment it's only enabled if QEMU is also available or we're testing Android. This patch also allows remote testing if the environment variable `TEST_DEVICE_ADDR` is set, as required by `remote-test-client` [[1](https://github.com/rust-lang/rust/blob/master/src/tools/remote-test-client/src/main.rs#L28), [2](https://github.com/rust-lang/rust/blob/master/src/tools/remote-test-client/src/main.rs#L61)]
2017-07-20 13:58:03 +00:00
Michael Woerister
fa91eeb99f Remove unused DefTable::retrace_path(). 2017-07-20 15:32:06 +02:00
bors
9d54ebe550 Auto merge of #43271 - Nashenas88:nll, r=nikomatsakis
Add empty MIR pass for non-lexical lifetimes

This is the first step for #43234.
2017-07-20 11:31:30 +00:00
bors
1edbc3df0d Auto merge of #43270 - petrochenkov:fixstab, r=alexcrichton
Fix checking for missing stability annotations

This was a regression from https://github.com/rust-lang/rust/pull/37676 causing "unmarked API" ICEs like https://github.com/rust-lang/rust/issues/43027.

r? @alexcrichton
2017-07-20 09:01:58 +00:00
bors
381d51dc49 Auto merge of #43260 - zackmdavis:print_target_spec_json_unstable_options_error, r=arielb1
explanatory error on `--print target-spec-json` without unstable options

![unstable_target_spec](https://user-images.githubusercontent.com/1076988/28243342-9731a45c-697a-11e7-9852-bad7ca1802b7.png)

Resolves #41683.
2017-07-20 06:38:41 +00:00
bors
1beaea26ff Auto merge of #43251 - gaurikholkar:span_reorder, r=nikomatsakis
Reorder span suggestions to appear below main labels

A fix to #41698

r? @nikomatsakis
2017-07-20 03:36:14 +00:00
bors
28486e7f90 Auto merge of #43247 - est31:master, r=alexcrichton
Tidy: allow common lang+lib features

This allows changes to the Rust language that have both library
and language components share one feature gate.

The feature gates need to be "about the same change", so that both
library and language components must either be both unstable, or
both stable, and share the tracking issue.

Removes the ugly "proc_macro" exception added by #40939.

Closes #43089
2017-07-20 00:11:40 +00:00
Jacques-Henri Jourdan
8416713240 Add test test_weak_count_locked 2017-07-20 01:59:01 +02:00
Zack M. Davis
c6a23996ca explanatory error on --print target-spec-json without unstable options
Resolves #41683.
2017-07-19 13:27:35 -07:00
Vadim Petrochenkov
18d9701645 Add an extra note to late_bound_lifetime_arguments error/lint 2017-07-19 23:12:58 +03:00
bors
582af6e1ad Auto merge of #43178 - zackmdavis:some_suggestion, r=eddyb
suggest one-argument enum variant to fix type mismatch when applicable

Following @est31's [suggestion](https://github.com/rust-lang/rust/issues/42764#issuecomment-309680886).

![some_suggestion](https://user-images.githubusercontent.com/1076988/28101064-ee83f51e-667a-11e7-9e4f-d8f9eb2fb6c3.png)

Resolves #42764.
2017-07-19 20:12:56 +00:00
Thomas Lively
6a3e32267e Pass debugging arguments to emcc
Tells emcc to enable assertions and debugging information for
wasm32-experimental-emscripten. This makes the codegen issues caused by
LLVM bug 33824 manifest more frequently at runtime and improves the wasm
debugging experience.
2017-07-19 10:55:12 -07:00
bors
9bbbd29e82 Auto merge of #42859 - eddyb:const-size-and-align-of, r=nikomatsakis
Implement const fn {size,align}_of.

Fixes #34078.

r? @nikomatsakis
2017-07-19 16:58:02 +00:00
bors
344f01cf13 Auto merge of #43333 - Mark-Simulacrum:appveyor-fix, r=alexcrichton
Attempt to fix appveyor

This will fix the problem, I think, but I don't know that this is a good idea (potentially leaving ourselves open to attackers, I guess, if a cert was revoked...). Of course, it may not. I don't actually have windows to check on..

r? @alexcrichton
2017-07-19 14:01:45 +00:00
Mark Simulacrum
3fe5721764 Attempt to fix appveyor 2017-07-19 07:01:23 -07:00
Paul Faria
7a966b4328 Add empty MIR pass for non-lexical lifetimes 2017-07-19 07:55:53 -04:00
Eduard-Mihai Burtescu
148718b4f3 Implement const fn {size,align}_of. 2017-07-19 14:46:54 +03:00
bors
4e56bbeb19 Auto merge of #43170 - kyrias:full-relro, r=alexcrichton
Add support for full RELRO

This commit adds support for full RELRO, and enables it for the
platforms I know have support for it.

Full RELRO makes the PLT+GOT data read-only on startup, preventing it
from being overwritten.

http://tk-blog.blogspot.com/2009/02/relro-not-so-well-known-memory.html

Fixes rust-lang/rust#29877.

---

I'm not entirely certain if this is the best way to do it, but I figured mimicking the way it's done for PIE seemed like a good start at least.  I'm not sure whether we want to have it enabled by default globally and then disabling it explicitly for targets that don't support it though.  I'm also not sure whether the `full_relro` function should call `bug!()` or something like it for linkers that don't support it rather than no-opping.
2017-07-19 05:39:14 +00:00
bors
88e2c396a4 Auto merge of #43168 - pnkfelix:check-attr-gating, r=aturon
Slew of builtin-attribute gating tests

Slew of builtin-attribute "gating" tests for issue #43106.

Some stray observations:

 * I don't know if its a good thing that so many attributes allow inputs which are silently discarded. (I  made heavy use of that in writing my tests, but that was more out of curiosity than necessity.)
 * The difference between crate-level and non-crate-level behavior is quite significant in some cases. Definitely worth making sure one has tests for both cases. (Not as clear whether it was worthwhile trying the various other AST forms like `fn f()` vs `struct S;`)
 * `#[no_builtins]` and `#[no_mangle]` occur twice on the `BUILTIN_ATTRIBUTES` list. Thats almost certainly a bug. (Filed as #43148)
 * We are maximally liberal in what we allow for `#[test]` and `#[bench]` when one compiles without `--test`.
 * We allow `#[no_mangle]` on arbitrary AST nodes, but only warn about potential misuse on `fn`
 * We allow `#[cold]`, `#[must_use]`, `#[windows_subsystem]`, and `#[no_builtins]` on arbitrary AST nodes. I don't know off-hand what the semantics are for e.g. a `#[cold] type T = ...;`
 * We allow crate-level `#![inline]`. That's probably a bug since its otherwise restricted to `fn` items
2017-07-19 03:06:21 +00:00
Oliver Middleton
697491c14d Fix overflowing_literals lint for large f32s
Float literals need to be parsed as the correct type so they can be
rounded correctly.
2017-07-19 03:22:45 +01:00
Perry Fraser
0fcb4fca19 Change the error message for multiple unused print params 2017-07-18 22:06:24 -04:00
Jeremy Soller
daa276ebb7 Update liblibc 2017-07-18 19:01:51 -06:00
bors
83c3621910 Auto merge of #40989 - matklad:comma-arms, r=petrochenkov
Unify rules about commas in match arms and semicolons in expressions

Original discussion: https://internals.rust-lang.org/t/syntax-of-block-like-expressions-in-match-arms/5025/7.

Currently, rust uses different rules to determine if `,` is needed after an expression in a match arm and if `;` is needed in an expression statement:

```Rust
fn stmt() {
    # no need for semicolons
    { () }
    if true { () } else { () }
    loop {}
    while true {}
}

fn match_arm(n: i32) {
    match n {
        1 => { () } # can omit comma here
        2 => if true { () } else { () }, # but all other cases do need commas.
        3 => loop { },
        4 => while true {},
        _ => ()
    }
}
```

This seems weird: why would you want to require `,` after and `if`?

This PR unifies the rules. It is backwards compatible because it allows strictly more programs.
2017-07-19 00:35:33 +00:00
bors
af049cd08b Auto merge of #43316 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
Rollup of 11 pull requests

- Successful merges: #42837, #43282, #43287, #43290, #43292, #43294, #43304, #43310, #43312, #43314, #43315
- Failed merges:
2017-07-18 21:59:01 +00:00
Esteban Küber
e39bcecf79 Handle type ascription cases with a method call instead of a type 2017-07-18 13:33:36 -07:00
Jacques-Henri Jourdan
49edaf14fd Fix in weak_count in Arc.
In the case the weak count was locked, the weak_count function could
return usize::MAX. We need to test this condition manually.
2017-07-18 19:39:30 +02:00
Mark Simulacrum
dc6606ead9 Rollup merge of #43315 - est31:stabilize_float_bits_conv, r=alexcrichton
float_bits_conv made it into 1.20

It seems that my PR to stabilize the `float_bits_conv` feature got merged before beta branched, which means I'm lucky, and the stabilization makes it into Rust 1.20. As it was against my expectations, the version number has to be corrected from 1.21 to 1.20.

Please also apply this PR to the beta branch.
2017-07-18 09:41:38 -06:00
Mark Simulacrum
21a7b26bb4 Rollup merge of #43314 - alexcrichton:fail-curl, r=aidanhs
travis: Switch `curl -s` to `curl -f`

I seem to have been a little too tired when I fixed up the container scripts,
applying the wrong flag!
2017-07-18 09:41:37 -06:00
Mark Simulacrum
fc7f0fd40a Rollup merge of #43312 - lu-zero:master, r=alexcrichton
powerpc: Ignore the stack-probes test

One little step further to have the test working fine on power8 :)
2017-07-18 09:41:36 -06:00
Mark Simulacrum
0d004c5141 Rollup merge of #43310 - lynn:rc-weak-doc-fix, r=apasel422
Fix erroneous reference to Arc instead of Rc in rc::Weak documentation

The docs for `rc::Weak` refer to `Arc` in one place, where they should obviously be referring to `Rc`; presumably this was erroneously copied over from the `arc::Weak` docs.
2017-07-18 09:41:35 -06:00
Mark Simulacrum
b43f58bc25 Rollup merge of #43304 - ids1024:path2, r=aturon
redox: handle multiple paths in PATH
2017-07-18 09:41:34 -06:00
Mark Simulacrum
f568249cca Rollup merge of #43294 - insaneinside:std-time-duration-docs, r=aturon
`std::time::Duration`: improve _precision_ of terminology in docs

Changed wording of docs on `std::time::Duration` for better clarity w.r.t. the contents of the type and the purpose of its methods.  (Specifically, removed the use of the word "precision" to describe the fractional part of the `Duration` because "precision" is more properly used to describe how _precise_ a value is, i.e. its granularity in this case.)
2017-07-18 09:41:33 -06:00
Mark Simulacrum
ac9e9e5075 Rollup merge of #43292 - kennytm:fix-quasi-quoting-warning-in-rustbuild, r=alexcrichton
Workaround "Quasi-quoting is inefficient" warning in incremental rustbuild introduced in #43252.

After #43252 is merged, building stage0 libcore with `-i` (`--incremental`) flag will cause 17 "Quasi-quoting might make incremental compilation very inefficient: NtExpr(..)" warnings, as in #40946.

```
warning: Quasi-quoting might make incremental compilation very inefficient: NtExpr(..)
   --> src/libcore/default.rs:133:21
    |
133 |             #[doc = $doc]
    |                     ^^^^
...
139 | default_impl! { (), (), "Returns the default value of `()`" }
    | ------------------------------------------------------------- in this macro invocation
(× 17)
```

True fix for #40946 will take at least 12 weeks from now to make into the next stage0, so it is quicker to workaround it in libcore instead.

cc @vbrandl @jseyfried
2017-07-18 09:41:32 -06:00
Mark Simulacrum
751c6e2b4c Rollup merge of #43290 - nodakai:fix-ref-path-new, r=Mark-Simulacrum
libstd: remove redundant & from &Path::new(...)

```rust
fn Path::new<S: AsRef ...>(s: &S) -> &Path
```

* https://doc.rust-lang.org/std/path/struct.Path.html#method.new
2017-07-18 09:41:32 -06:00
Mark Simulacrum
6a566710c5 Rollup merge of #43287 - kennytm:travis-ci-adjustments, r=alexcrichton
Change Travis CI job order.

Reorder the job matrix to take advantage of the order how Travis CI starts them in rust-lang/rust. Plus other refactoring of `.travis.yml`.

1. Move the `$ALLOW_PR` image to the top, so pull requests will start testing as immediately after the build is started. Previously the `$ALLOW_PR` image starts 6 minutes after the build was scheduled.

2. Move the slow macOS images near the top, so they share more time with the rest of the faster Linux builds, which should shorten total test time (actually not much, about 7 minutes at most if this change does work).

3. Merged the `install` section of both Linux and macOS to make the `env:` section a bit shorter, and enable change 4 below.

4. Do not download or install anything if `$SKIP_BUILD == true`, which further reduces chance of spurious failure in the PR-CI stage (avoid the red cross appearing even if CI passed).

(IMO `$SKIP_BUILD` should not even exist: those irrelevant jobs should not start at all, but that would require travis-ci/travis-ci#2778 which has been rejected)
2017-07-18 09:41:31 -06:00
Mark Simulacrum
413ef50884 Rollup merge of #43282 - feadoor:patch-1, r=nikomatsakis
Update merge queue link in CONTRIBUTING.md
2017-07-18 09:41:30 -06:00
Mark Simulacrum
b83285bd29 Rollup merge of #42837 - rthomas:29355-error, r=steveklabnik
Update docs on Error struct. #29355

This adds a pretty contrived example of the usage of fmt::Error. I am
very open to suggestions for a better one.

I have also highlighted the fmt::Error vs std::error::Error.

r? @steveklabnik
2017-07-18 09:41:29 -06:00
Alex Crichton
8340f74eb7 travis: Switch curl -s to curl -f
I seem to have been a little too tired when I fixed up the container scripts,
applying the wrong flag!
2017-07-18 07:42:32 -07:00
Vadzim Dambrouski
9b8c223407 Fix LLVM assertion when a weak symbol is defined in global_asm.
This change will fix the issue from
https://github.com/japaric/svd2rust/pull/130
2017-07-18 16:52:00 +03:00
Aleksey Kladov
e3d052f30a Ignore pretty-test 2017-07-18 15:21:18 +03:00