]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoCheck RLS tests
Mark Simulacrum [Thu, 20 Jul 2017 22:33:04 +0000 (16:33 -0600)]
Check RLS tests

6 years agoChange default documentation rules to correspond with previous state.
Mark Simulacrum [Thu, 20 Jul 2017 22:16:31 +0000 (16:16 -0600)]
Change default documentation rules to correspond with previous state.

6 years agoDon't include lldb/gdb in default tests
Mark Simulacrum [Thu, 20 Jul 2017 17:23:29 +0000 (11:23 -0600)]
Don't include lldb/gdb in default tests

6 years agoDon't run host-only tests when targeting another platform
Mark Simulacrum [Thu, 20 Jul 2017 15:42:18 +0000 (09:42 -0600)]
Don't run host-only tests when targeting another platform

6 years agoFix a few issues found by comparing past/present
Mark Simulacrum [Thu, 20 Jul 2017 12:27:13 +0000 (06:27 -0600)]
Fix a few issues found by comparing past/present

6 years agoAllow iterating over step descriptions.
Mark Simulacrum [Wed, 19 Jul 2017 12:55:46 +0000 (06:55 -0600)]
Allow iterating over step descriptions.

This simplifies code and allows working mostly with normal Rust instead
of macros.

6 years agoImplement available paths list.
Mark Simulacrum [Wed, 19 Jul 2017 00:03:38 +0000 (18:03 -0600)]
Implement available paths list.

6 years agoUse a single line for serde annotations.
Mark Simulacrum [Tue, 18 Jul 2017 22:14:44 +0000 (16:14 -0600)]
Use a single line for serde annotations.

6 years agoKrate -> Crate
Mark Simulacrum [Tue, 18 Jul 2017 21:28:53 +0000 (15:28 -0600)]
Krate -> Crate

6 years agoRemove outdated code.
Mark Simulacrum [Tue, 18 Jul 2017 00:03:31 +0000 (18:03 -0600)]
Remove outdated code.

Relevant sys crates handle this properly.

6 years agoRemove TypeId from stack in Builder
Mark Simulacrum [Tue, 18 Jul 2017 00:01:48 +0000 (18:01 -0600)]
Remove TypeId from stack in Builder

6 years agoRemove deserialize
Aidan Hobson Sayers [Sun, 16 Jul 2017 22:46:27 +0000 (23:46 +0100)]
Remove deserialize

6 years agoResolve rebase errors
Mark Simulacrum [Mon, 17 Jul 2017 15:52:05 +0000 (09:52 -0600)]
Resolve rebase errors

6 years agofail in case nothing to run was found
Guillaume Gomez [Mon, 10 Jul 2017 14:27:46 +0000 (16:27 +0200)]
fail in case nothing to run was found

6 years agoFix tidy
Mark Simulacrum [Fri, 14 Jul 2017 23:59:03 +0000 (17:59 -0600)]
Fix tidy

6 years agoRemove outdated FIXME from cache
Mark Simulacrum [Fri, 14 Jul 2017 15:37:30 +0000 (09:37 -0600)]
Remove outdated FIXME from cache

6 years agoImplement keep-stage support
Mark Simulacrum [Fri, 14 Jul 2017 15:28:06 +0000 (09:28 -0600)]
Implement keep-stage support

6 years agoRequire should_run to be implemented.
Mark Simulacrum [Fri, 14 Jul 2017 12:30:16 +0000 (06:30 -0600)]
Require should_run to be implemented.

6 years agoMake the book default.
Mark Simulacrum [Fri, 14 Jul 2017 04:37:33 +0000 (22:37 -0600)]
Make the book default.

6 years agoUtilize interning to allow Copy/Clone steps
Mark Simulacrum [Fri, 14 Jul 2017 00:48:44 +0000 (18:48 -0600)]
Utilize interning to allow Copy/Clone steps

6 years agoRemove core_intrinsics feature gate
Mark Simulacrum [Thu, 13 Jul 2017 17:12:57 +0000 (11:12 -0600)]
Remove core_intrinsics feature gate

6 years agoClean up install
Mark Simulacrum [Thu, 13 Jul 2017 12:25:40 +0000 (06:25 -0600)]
Clean up install

6 years agoCleanups and fixes throughout
Mark Simulacrum [Thu, 13 Jul 2017 00:52:31 +0000 (18:52 -0600)]
Cleanups and fixes throughout

6 years agoFix more incorrectly transitioned code
Mark Simulacrum [Wed, 12 Jul 2017 16:12:47 +0000 (10:12 -0600)]
Fix more incorrectly transitioned code

6 years agoFix a few errors introduced during rebase.
Mark Simulacrum [Wed, 12 Jul 2017 15:15:00 +0000 (09:15 -0600)]
Fix a few errors introduced during rebase.

6 years agoCherry pick changes from ce3abc5801f94292be9bc5fbe00b52f1ccb28672.
Mark Simulacrum [Sat, 8 Jul 2017 03:00:38 +0000 (23:00 -0400)]
Cherry pick changes from ce3abc5801f94292be9bc5fbe00b52f1ccb28672.

Fix stage 2 builds with a custom libdir.

When copying libstd for the stage 2 compiler, the builder ignores the
configured libdir/libdir_relative configuration parameters.  This causes
the compiler to fail to find libstd, which cause any tools built with the
stage 2 compiler to fail.

To fix this, make the copy steps of rustbuild aware of the libdir_relative
parameter when the stage >= 2.  Also update the dist target to be aware of
the new location of libstd.

6 years agoUpdate to toml 0.4
Mark Simulacrum [Tue, 4 Jul 2017 16:03:01 +0000 (10:03 -0600)]
Update to toml 0.4

6 years agoMigrate to serde_json entirely
Mark Simulacrum [Tue, 4 Jul 2017 13:31:05 +0000 (07:31 -0600)]
Migrate to serde_json entirely

6 years agoFix a nit.
Mark Simulacrum [Fri, 7 Jul 2017 18:37:55 +0000 (12:37 -0600)]
Fix a nit.

6 years agoRework compiletest implementation.
Mark Simulacrum [Fri, 7 Jul 2017 18:31:29 +0000 (12:31 -0600)]
Rework compiletest implementation.

6 years agoMove compiletest config into a struct
Mark Simulacrum [Fri, 7 Jul 2017 17:51:57 +0000 (11:51 -0600)]
Move compiletest config into a struct

6 years agoDocument the process more thoroughly
Mark Simulacrum [Tue, 4 Jul 2017 00:20:46 +0000 (18:20 -0600)]
Document the process more thoroughly

6 years agoAdd documentation to Step and related methods on Builder.
Mark Simulacrum [Fri, 7 Jul 2017 17:17:37 +0000 (11:17 -0600)]
Add documentation to Step and related methods on Builder.

6 years agoPacify tidy
Mark Simulacrum [Thu, 6 Jul 2017 15:42:50 +0000 (09:42 -0600)]
Pacify tidy

6 years agoMove code out of macro and into generic method.
Mark Simulacrum [Thu, 6 Jul 2017 15:15:08 +0000 (09:15 -0600)]
Move code out of macro and into generic method.

6 years agoFinish fixing warnings and errors. Bootstrap builds.
Mark Simulacrum [Wed, 5 Jul 2017 17:21:33 +0000 (11:21 -0600)]
Finish fixing warnings and errors. Bootstrap builds.

6 years agoMove cargo() to Builder
Mark Simulacrum [Wed, 5 Jul 2017 17:14:54 +0000 (11:14 -0600)]
Move cargo() to Builder

6 years agoFix tool_cmd
Mark Simulacrum [Wed, 5 Jul 2017 16:54:19 +0000 (10:54 -0600)]
Fix tool_cmd

6 years agoMove tool_cmd to tool.rs
Mark Simulacrum [Wed, 5 Jul 2017 16:48:02 +0000 (10:48 -0600)]
Move tool_cmd to tool.rs

6 years agoFixes warnings and errors introduced while moving code around
Mark Simulacrum [Wed, 5 Jul 2017 16:46:41 +0000 (10:46 -0600)]
Fixes warnings and errors introduced while moving code around

6 years agoAdd Builder and Step definitions.
Mark Simulacrum [Wed, 5 Jul 2017 16:20:20 +0000 (10:20 -0600)]
Add Builder and Step definitions.

6 years agoChange code to work with the new system
Mark Simulacrum [Wed, 5 Jul 2017 12:41:27 +0000 (06:41 -0600)]
Change code to work with the new system

6 years agoMove code into Step trait implementations.
Mark Simulacrum [Wed, 5 Jul 2017 01:41:43 +0000 (19:41 -0600)]
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.

6 years agoMove rule configs out of step
Mark Simulacrum [Tue, 4 Jul 2017 23:53:53 +0000 (17:53 -0600)]
Move rule configs out of step

6 years agoAuto merge of #43281 - mmatyas:remotetest_env, r=alexcrichton
bors [Thu, 20 Jul 2017 13:58:03 +0000 (13:58 +0000)]
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)]

6 years agoAuto merge of #43271 - Nashenas88:nll, r=nikomatsakis
bors [Thu, 20 Jul 2017 11:31:30 +0000 (11:31 +0000)]
Auto merge of #43271 - Nashenas88:nll, r=nikomatsakis

Add empty MIR pass for non-lexical lifetimes

This is the first step for #43234.

6 years agoAuto merge of #43270 - petrochenkov:fixstab, r=alexcrichton
bors [Thu, 20 Jul 2017 09:01:58 +0000 (09:01 +0000)]
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

6 years agoAuto merge of #43260 - zackmdavis:print_target_spec_json_unstable_options_error,...
bors [Thu, 20 Jul 2017 06:38:41 +0000 (06:38 +0000)]
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.

6 years agoAuto merge of #43251 - gaurikholkar:span_reorder, r=nikomatsakis
bors [Thu, 20 Jul 2017 03:36:14 +0000 (03:36 +0000)]
Auto merge of #43251 - gaurikholkar:span_reorder, r=nikomatsakis

Reorder span suggestions to appear below main labels

A fix to #41698

r? @nikomatsakis

6 years agoAuto merge of #43247 - est31:master, r=alexcrichton
bors [Thu, 20 Jul 2017 00:11:40 +0000 (00:11 +0000)]
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

6 years agoexplanatory error on `--print target-spec-json` without unstable options
Zack M. Davis [Sat, 15 Jul 2017 19:32:31 +0000 (12:32 -0700)]
explanatory error on `--print target-spec-json` without unstable options

Resolves #41683.

6 years agoAuto merge of #43178 - zackmdavis:some_suggestion, r=eddyb
bors [Wed, 19 Jul 2017 20:12:56 +0000 (20:12 +0000)]
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.

6 years agoAuto merge of #42859 - eddyb:const-size-and-align-of, r=nikomatsakis
bors [Wed, 19 Jul 2017 16:58:02 +0000 (16:58 +0000)]
Auto merge of #42859 - eddyb:const-size-and-align-of, r=nikomatsakis

Implement const fn {size,align}_of.

Fixes #34078.

r? @nikomatsakis

6 years agoAuto merge of #43333 - Mark-Simulacrum:appveyor-fix, r=alexcrichton
bors [Wed, 19 Jul 2017 14:01:45 +0000 (14:01 +0000)]
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

6 years agoAttempt to fix appveyor
Mark Simulacrum [Wed, 19 Jul 2017 12:57:56 +0000 (06:57 -0600)]
Attempt to fix appveyor

6 years agoAdd empty MIR pass for non-lexical lifetimes
Paul Faria [Sun, 16 Jul 2017 20:26:37 +0000 (16:26 -0400)]
Add empty MIR pass for non-lexical lifetimes

6 years agoImplement const fn {size,align}_of.
Eduard-Mihai Burtescu [Fri, 23 Jun 2017 14:48:29 +0000 (17:48 +0300)]
Implement const fn {size,align}_of.

6 years agoAuto merge of #43170 - kyrias:full-relro, r=alexcrichton
bors [Wed, 19 Jul 2017 05:39:14 +0000 (05:39 +0000)]
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.

6 years agoAuto merge of #43168 - pnkfelix:check-attr-gating, r=aturon
bors [Wed, 19 Jul 2017 03:06:21 +0000 (03:06 +0000)]
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

6 years agoAuto merge of #40989 - matklad:comma-arms, r=petrochenkov
bors [Wed, 19 Jul 2017 00:35:33 +0000 (00:35 +0000)]
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.

6 years agoAuto merge of #43316 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
bors [Tue, 18 Jul 2017 21:59:01 +0000 (21:59 +0000)]
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:

6 years agoRollup merge of #43315 - est31:stabilize_float_bits_conv, r=alexcrichton
Mark Simulacrum [Tue, 18 Jul 2017 15:41:38 +0000 (09:41 -0600)]
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.

6 years agoRollup merge of #43314 - alexcrichton:fail-curl, r=aidanhs
Mark Simulacrum [Tue, 18 Jul 2017 15:41:37 +0000 (09:41 -0600)]
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!

6 years agoRollup merge of #43312 - lu-zero:master, r=alexcrichton
Mark Simulacrum [Tue, 18 Jul 2017 15:41:36 +0000 (09:41 -0600)]
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 :)

6 years agoRollup merge of #43310 - lynn:rc-weak-doc-fix, r=apasel422
Mark Simulacrum [Tue, 18 Jul 2017 15:41:35 +0000 (09:41 -0600)]
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.

6 years agoRollup merge of #43304 - ids1024:path2, r=aturon
Mark Simulacrum [Tue, 18 Jul 2017 15:41:34 +0000 (09:41 -0600)]
Rollup merge of #43304 - ids1024:path2, r=aturon

redox: handle multiple paths in PATH

6 years agoRollup merge of #43294 - insaneinside:std-time-duration-docs, r=aturon
Mark Simulacrum [Tue, 18 Jul 2017 15:41:33 +0000 (09:41 -0600)]
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.)

6 years agoRollup merge of #43292 - kennytm:fix-quasi-quoting-warning-in-rustbuild, r=alexcrichton
Mark Simulacrum [Tue, 18 Jul 2017 15:41:32 +0000 (09:41 -0600)]
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

6 years agoRollup merge of #43290 - nodakai:fix-ref-path-new, r=Mark-Simulacrum
Mark Simulacrum [Tue, 18 Jul 2017 15:41:32 +0000 (09:41 -0600)]
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

6 years agoRollup merge of #43287 - kennytm:travis-ci-adjustments, r=alexcrichton
Mark Simulacrum [Tue, 18 Jul 2017 15:41:31 +0000 (09:41 -0600)]
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)

6 years agoRollup merge of #43282 - feadoor:patch-1, r=nikomatsakis
Mark Simulacrum [Tue, 18 Jul 2017 15:41:30 +0000 (09:41 -0600)]
Rollup merge of #43282 - feadoor:patch-1, r=nikomatsakis

Update merge queue link in CONTRIBUTING.md

6 years agoRollup merge of #42837 - rthomas:29355-error, r=steveklabnik
Mark Simulacrum [Tue, 18 Jul 2017 15:41:29 +0000 (09:41 -0600)]
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

6 years agotravis: Switch `curl -s` to `curl -f`
Alex Crichton [Tue, 18 Jul 2017 14:42:32 +0000 (07:42 -0700)]
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!

6 years agoIgnore pretty-test
Aleksey Kladov [Tue, 18 Jul 2017 12:21:18 +0000 (15:21 +0300)]
Ignore pretty-test

6 years agoAuto merge of #42492 - petrochenkov:methlife, r=nikomatsakis
bors [Tue, 18 Jul 2017 10:20:13 +0000 (10:20 +0000)]
Auto merge of #42492 - petrochenkov:methlife, r=nikomatsakis

Support generic lifetime arguments in method calls

Fixes https://github.com/rust-lang/rust/issues/42403
Fixes https://github.com/rust-lang/rust/issues/42115
Lifetimes in a method call `x.f::<'a, 'b, T, U>()` are treated exactly like lifetimes in the equivalent UFCS call `X::f::<'a, 'b, T, U>`.
In addition, if the method has late bound lifetime parameters (explicit or implicit), then explicitly specifying lifetime arguments is not permitted (guarded by a compatibility lint).
[breaking-change] because previously lifetimes in method calls were accepted unconditionally.

r? @eddyb

6 years agoFix erroneous reference to Arc instead of Rc
Lynn [Tue, 18 Jul 2017 09:31:07 +0000 (11:31 +0200)]
Fix erroneous reference to Arc instead of Rc

6 years agopowerpc: Ignore the stack-probes test
Luca Barbato [Tue, 18 Jul 2017 08:50:58 +0000 (08:50 +0000)]
powerpc: Ignore the stack-probes test

6 years agoChange Travis CI job order.
kennytm [Sat, 15 Jul 2017 16:10:26 +0000 (00:10 +0800)]
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 users' PRs will start testing
   immediately. 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).

6 years agoAuto merge of #43293 - alexcrichton:fail-curl, r=Mark-Simulacrum
bors [Tue, 18 Jul 2017 04:36:12 +0000 (04:36 +0000)]
Auto merge of #43293 - alexcrichton:fail-curl, r=Mark-Simulacrum

travis: Make a few `curl` invocations more resilient

Use the `-f` flag to indicate that, for example, a 500 response code is to be
considered a failure, triggering the normal retry logic. Also ignore errors
where we check the date from google.com, as a failure there shouldn't fail the
build.

6 years agofloat_bits_conv made it into 1.20
est31 [Tue, 18 Jul 2017 03:16:46 +0000 (05:16 +0200)]
float_bits_conv made it into 1.20

6 years agotravis: Make a few `curl` invocations more resilient
Alex Crichton [Mon, 17 Jul 2017 17:55:27 +0000 (10:55 -0700)]
travis: Make a few `curl` invocations more resilient

Use the `-f` flag to indicate that, for example, a 500 response code is to be
considered a failure, triggering the normal retry logic. Also ignore errors
where we check the date from google.com, as a failure there shouldn't fail the
build.

6 years agoredox: handle multiple paths in PATH
Ian Douglas Scott [Tue, 18 Jul 2017 01:37:54 +0000 (18:37 -0700)]
redox: handle multiple paths in PATH

6 years agoCatch expression does not require semicolon to be a statement
Aleksey Kladov [Sat, 1 Apr 2017 15:11:17 +0000 (18:11 +0300)]
Catch expression does not require semicolon to be a statement

6 years agoUnify rules about commas in match arms and semicolons in expressions
Aleksey Kladov [Sat, 1 Apr 2017 08:11:31 +0000 (11:11 +0300)]
Unify rules about commas in match arms and semicolons in expressions

6 years agoImplement FromStr for RelroLevel rather than duplicating the match
Johannes Löthberg [Mon, 17 Jul 2017 23:27:55 +0000 (01:27 +0200)]
Implement FromStr for RelroLevel rather than duplicating the match

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
6 years agoMove relro_level from CodegenOptions to DebuggingOptions
Johannes Löthberg [Mon, 17 Jul 2017 22:18:00 +0000 (00:18 +0200)]
Move relro_level from CodegenOptions to DebuggingOptions

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
6 years agoMake `late_bound_lifetime_arguments` lint warn-by-default
Vadim Petrochenkov [Mon, 17 Jul 2017 21:33:44 +0000 (00:33 +0300)]
Make `late_bound_lifetime_arguments` lint warn-by-default

6 years agoFix incorrect subst index
Vadim Petrochenkov [Tue, 11 Jul 2017 20:12:06 +0000 (23:12 +0300)]
Fix incorrect subst index

Fix treatment of lifetimes defined in nested types during detection of late bound regions in signatures.
Do not replace substs with inference variables when "cannot specify lifetime arguments explicitly..." is reported as a lint.

6 years agoDetect implicitly defined late bound lifetime parameters as well
Vadim Petrochenkov [Sat, 24 Jun 2017 20:30:05 +0000 (23:30 +0300)]
Detect implicitly defined late bound lifetime parameters as well

6 years agoProhibit lifetime arguments in path segments with late bound lifetime parameters
Vadim Petrochenkov [Fri, 23 Jun 2017 21:56:25 +0000 (00:56 +0300)]
Prohibit lifetime arguments in path segments with late bound lifetime parameters

6 years agoSupport generic lifetime arguments in method calls
Vadim Petrochenkov [Tue, 6 Jun 2017 21:17:14 +0000 (00:17 +0300)]
Support generic lifetime arguments in method calls

6 years agoreorder span labels
gaurikholkar [Wed, 5 Jul 2017 16:58:22 +0000 (09:58 -0700)]
reorder span labels

6 years ago`std::time::Duration`: improve _precision_ of terminology in docs
Collin J. Sutton [Mon, 17 Jul 2017 18:08:55 +0000 (11:08 -0700)]
`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.

6 years agoFix "Quasi-quoting is inefficient" warning in incremental rustbuild.
kennytm [Mon, 17 Jul 2017 17:49:40 +0000 (01:49 +0800)]
Fix "Quasi-quoting is inefficient" warning in incremental rustbuild.

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.

Fixing the warning in #40946 will take 12 weeks from now to make into the
next stage0, so it is quicker to workaround it in libcore instead.

6 years agoAuto merge of #42711 - Firstyear:san-on-dylib, r=alexcrichton
bors [Mon, 17 Jul 2017 17:02:18 +0000 (17:02 +0000)]
Auto merge of #42711 - Firstyear:san-on-dylib, r=alexcrichton

Add support for dylibs with Address Sanitizer

Many applications use address sanitizer to assert correct behaviour of their programs. When using Rust with C, it's much more important to assert correct programs with tools like asan/lsan due to the unsafe nature of the access across an ffi boundary. However, previously only rust bin types could use asan. This posed a challenge for existing C applications that link or dlopen .so when the C application is compiled with asan.

This PR enables asan to be linked to the dylib and cdylib crate type. We alter the test to check the proc-macro crate does not work with -Z sanitizer=address. Finally, we add a test that compiles a shared object in rust, then another rust program links it and demonstrates a crash through the call to the library.

This PR is nearly complete, but I do require advice on the change to fix the -lasan that currently exists in the dylib test. This is required because the link statement is not being added correctly to the rustc build when -Z sanitizer=address is added (and I'm not 100% sure why)

Thanks,

6 years agolibstd: remove redundant & from &Path::new(...)
NODA, Kai [Mon, 17 Jul 2017 16:04:46 +0000 (00:04 +0800)]
libstd: remove redundant & from &Path::new(...)

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

Signed-off-by: NODA, Kai <nodakai@gmail.com>
6 years agoAuto merge of #43266 - feadoor:issue-43253-exclusive-range-warning, r=nikomatsakis
bors [Mon, 17 Jul 2017 13:31:37 +0000 (13:31 +0000)]
Auto merge of #43266 - feadoor:issue-43253-exclusive-range-warning, r=nikomatsakis

Fix `range_covered_by_constructor` for exclusive ranges.

This resolves #43253

6 years agoAuto merge of #42033 - oli-obk:suggestions, r=petrochenkov
bors [Mon, 17 Jul 2017 10:58:08 +0000 (10:58 +0000)]
Auto merge of #42033 - oli-obk:suggestions, r=petrochenkov

Change some notes into suggestions

r? @petrochenkov since you commented on the same edits in #39458

6 years agoUpdate merge queue link
Sam Cappleman-Lynes [Mon, 17 Jul 2017 10:57:26 +0000 (11:57 +0100)]
Update merge queue link

6 years agoAllow remote testing remotely when `TEST_DEVICE_ADDR` is set
Mátyás Mustoha [Mon, 3 Jul 2017 09:41:58 +0000 (11:41 +0200)]
Allow remote testing remotely when `TEST_DEVICE_ADDR` is set