]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agonote individual lint name set via lint group attribute in notes
Zack M. Davis [Fri, 6 Jan 2017 02:55:36 +0000 (18:55 -0800)]
note individual lint name set via lint group attribute in notes

Warning or error messages set via a lint group attribute
(e.g. `#[deny(warnings)]`) should still make it clear which individual
lint (by name) was triggered, similarly to how we include "on by
default" language for default lints. This—and, while we're here, the
existing "on by default" language—can be tucked into a note rather than
cluttering the main error message. This occasions the slightest of
refactorings (we now have to get the diagnostic-builder with the main
message first, before matching on the lint source).

This is in the matter of #36846.

7 years agoAuto merge of #39533 - GuillaumeGomez:rollup, r=GuillaumeGomez
bors [Sat, 4 Feb 2017 16:04:08 +0000 (16:04 +0000)]
Auto merge of #39533 - GuillaumeGomez:rollup, r=GuillaumeGomez

Rollup of 3 pull requests

- Successful merges: #39486, #39506, #39517
- Failed merges:

7 years agoRollup merge of #39517 - brson:relnotes-151, r=alexcrichton
Guillaume Gomez [Sat, 4 Feb 2017 13:41:25 +0000 (14:41 +0100)]
Rollup merge of #39517 - brson:relnotes-151, r=alexcrichton

Update relnotes for 1.15.1

I already checked this into stable, but it needs to be on master/beta too.

7 years agoRollup merge of #39506 - GuillaumeGomez:hashmap_docs, r=frewsxcv
Guillaume Gomez [Sat, 4 Feb 2017 13:41:24 +0000 (14:41 +0100)]
Rollup merge of #39506 - GuillaumeGomez:hashmap_docs, r=frewsxcv

Add missing urls in HashMap

r? @frewsxcv

7 years agoRollup merge of #39486 - phungleson:tiny-doc-wording-change, r=alexcrichton
Guillaume Gomez [Sat, 4 Feb 2017 13:41:23 +0000 (14:41 +0100)]
Rollup merge of #39486 - phungleson:tiny-doc-wording-change, r=alexcrichton

Tiny doc wording change

Fix https://github.com/rust-lang/rust/issues/39366

7 years agoAuto merge of #39434 - nikomatsakis:incr-comp-skip-typeck-2, r=eddyb
bors [Sat, 4 Feb 2017 12:38:13 +0000 (12:38 +0000)]
Auto merge of #39434 - nikomatsakis:incr-comp-skip-typeck-2, r=eddyb

Miscellaneous refactors around how lints and typeck interact

This is preparation for making incr. comp. skip typeck. The main gist of is trying to rationalize the outputs from typeck that are not part of tables:

- one bit of output is the `used_trait_imports` set, which becomes something we track for dependencies
- the other big of output are various lints; we used to store these into a table on sess, but this work stores them into the`TypeckTables`, and then makes the lint pass consult that
    - I think it probably makes sense to handle errors similarly, eventually, but that's not necessary now

r? @eddyb

Fixes #39495

7 years agoAuto merge of #39440 - F001:SpecializeCow, r=bluss
bors [Sat, 4 Feb 2017 10:04:06 +0000 (10:04 +0000)]
Auto merge of #39440 - F001:SpecializeCow, r=bluss

std: Add ToString trait specialization for Cow<'a, str> and String

There is a specialized version of ToString for str type in std. I think there are other types can also benefit from specialization. `Cow` and `String` are the most obvious one.

r? @bluss

7 years agoAuto merge of #39425 - jakllsch:netbsd-a, r=alexcrichton
bors [Sat, 4 Feb 2017 07:29:28 +0000 (07:29 +0000)]
Auto merge of #39425 - jakllsch:netbsd-a, r=alexcrichton

Don't build gcc_personality_v0.c on NetBSD either

7 years agoAuto merge of #39399 - clarcharr:iter_rfind, r=alexcrichton
bors [Sat, 4 Feb 2017 04:53:53 +0000 (04:53 +0000)]
Auto merge of #39399 - clarcharr:iter_rfind, r=alexcrichton

Add Iterator::rfind.

I found it weird that `Iterator` has `rpostition` but not `rfind`. This adds that method.

7 years agogo back to the older model of coherence collect
Niko Matsakis [Sat, 4 Feb 2017 02:13:59 +0000 (21:13 -0500)]
go back to the older model of coherence collect

7 years agoAuto merge of #36320 - GuillaumeGomez:rustdoc_test_info, r=alexcrichton
bors [Sat, 4 Feb 2017 01:32:21 +0000 (01:32 +0000)]
Auto merge of #36320 - GuillaumeGomez:rustdoc_test_info, r=alexcrichton

Add information in case of markdown block code test failure

r? @steveklabnik

cc @jonathandturner

7 years agoUpdate relnotes for 1.15.1
Brian Anderson [Sat, 4 Feb 2017 01:12:38 +0000 (01:12 +0000)]
Update relnotes for 1.15.1

I already checked this into stable, but it needs to be on master/beta too.

7 years agoAuto merge of #39463 - alexcrichton:update-bootstrap, r=alexcrichton
bors [Fri, 3 Feb 2017 22:55:28 +0000 (22:55 +0000)]
Auto merge of #39463 - alexcrichton:update-bootstrap, r=alexcrichton

Bump version, upgrade bootstrap

This commit updates the version number to 1.17.0 as we're not on that version of
the nightly compiler, and at the same time this updates src/stage0.txt to
bootstrap from freshly minted beta compiler and beta Cargo.

7 years agoAdd missing urls in HashMap
Guillaume Gomez [Fri, 3 Feb 2017 21:38:44 +0000 (22:38 +0100)]
Add missing urls in HashMap

7 years agoBump version, upgrade bootstrap
Alex Crichton [Wed, 1 Feb 2017 23:57:50 +0000 (15:57 -0800)]
Bump version, upgrade bootstrap

This commit updates the version number to 1.17.0 as we're not on that version of
the nightly compiler, and at the same time this updates src/stage0.txt to
bootstrap from freshly minted beta compiler and beta Cargo.

7 years agoAuto merge of #39356 - krdln:format-with-capacity, r=aturon
bors [Fri, 3 Feb 2017 20:09:36 +0000 (20:09 +0000)]
Auto merge of #39356 - krdln:format-with-capacity, r=aturon

Use `String::with_capacity` in `format!`

Add an `Arguments::estimated_capacity` to estimate the length of formatted text and use it in `std::fmt::format` as the initial capacity of the buffer.

The capacity is calculated based on the literal parts of format string, see the details in the implementation.

Some benches:
```rust
empty:       format!("{}", black_box(""))
literal:     format!("Literal")
long:        format!("Hello Hello Hello Hello, {}!", black_box("world"))
long_rev:    format!("{}, hello hello hello hello!", black_box("world"))
long_rev_2:  format!("{}{}, hello hello hello hello!", 1, black_box("world"))
short:       format!("Hello, {}!", black_box("world"))
short_rev:   format!("{}, hello!", black_box("world"))
short_rev_2: format!("{}{}, hello!", 1, black_box("world"))
surround:    format!("aaaaa{}ccccc{}eeeee", black_box("bbbbb"), black_box("eeeee"))
two_spaced:  format!("{} {}", black_box("bbbbb"), black_box("eeeee"))
worst_case:  format!("{} a long piece...", black_box("and even longer argument. not sure why it has to be so long"))
```
```
 empty        25            28                      3   12.00%
 literal      35            29                     -6  -17.14%
 long         80            46                    -34  -42.50%
 long_rev     79            45                    -34  -43.04%
 long_rev_2   111           66                    -45  -40.54%
 short        73            46                    -27  -36.99%
 short_rev    74            76                      2    2.70%
 short_rev_2  107           108                     1    0.93%
 surround     142           65                    -77  -54.23%
 two_spaced   111           115                     4    3.60%
 worst_case   89            101                    12   13.48%
```

7 years agoMerge remote-tracking branch 'upstream/master' into format-with-capacity
Michał Krasnoborski [Fri, 3 Feb 2017 16:48:07 +0000 (17:48 +0100)]
Merge remote-tracking branch 'upstream/master' into format-with-capacity

7 years agotiny doc wording change
Son [Fri, 3 Feb 2017 13:16:56 +0000 (00:16 +1100)]
tiny doc wording change

7 years agoUpdate to last cargo version
Guillaume Gomez [Fri, 3 Feb 2017 12:55:18 +0000 (13:55 +0100)]
Update to last cargo version

7 years agoAuto merge of #39418 - redox-os:redox_fs_ext, r=brson
bors [Fri, 3 Feb 2017 11:42:32 +0000 (11:42 +0000)]
Auto merge of #39418 - redox-os:redox_fs_ext, r=brson

Add dev and ino to MetadataExt

This adds .dev() and .ino() to MetadataExt on Redox

7 years agoUpdate cargo version to last master
Guillaume Gomez [Thu, 2 Feb 2017 18:53:37 +0000 (19:53 +0100)]
Update cargo version to last master

7 years agoUpdate run-make/issue-22131 to new rustdoc --test format
Guillaume Gomez [Sat, 28 Jan 2017 17:26:37 +0000 (18:26 +0100)]
Update run-make/issue-22131 to new rustdoc --test format

7 years agoSet correct hoedown submodule branch
Guillaume Gomez [Sat, 28 Jan 2017 15:38:12 +0000 (16:38 +0100)]
Set correct hoedown submodule branch

7 years agoCreate new flag to test rustdoc --test
Guillaume Gomez [Mon, 23 Jan 2017 21:46:18 +0000 (22:46 +0100)]
Create new flag to test rustdoc --test

7 years agoMove test from bootstrap to compiletest
Guillaume Gomez [Fri, 20 Jan 2017 22:24:20 +0000 (23:24 +0100)]
Move test from bootstrap to compiletest

7 years agoPut rustdoc --test ui check at the end of docs check
Guillaume Gomez [Fri, 20 Jan 2017 18:03:09 +0000 (19:03 +0100)]
Put rustdoc --test ui check at the end of docs check

7 years agoAdd new rustdoc ui tests
Guillaume Gomez [Thu, 19 Jan 2017 15:47:17 +0000 (16:47 +0100)]
Add new rustdoc ui tests

7 years agoSwitch logic to Span instead of HashMap
Guillaume Gomez [Tue, 17 Jan 2017 22:54:51 +0000 (23:54 +0100)]
Switch logic to Span instead of HashMap

7 years agoMove to my own hoedown repository
Guillaume Gomez [Thu, 12 Jan 2017 19:33:01 +0000 (20:33 +0100)]
Move to my own hoedown repository

7 years agoChange thread name
Guillaume Gomez [Sat, 19 Nov 2016 16:51:25 +0000 (17:51 +0100)]
Change thread name

7 years agoRework rustdoc test output a bit
Guillaume Gomez [Tue, 15 Nov 2016 21:29:46 +0000 (22:29 +0100)]
Rework rustdoc test output a bit

7 years agoTruncate output example to 10 lines
Guillaume Gomez [Sun, 9 Oct 2016 12:14:49 +0000 (14:14 +0200)]
Truncate output example to 10 lines

7 years agoAdd line number and filename in error message
Guillaume Gomez [Sun, 2 Oct 2016 00:11:45 +0000 (02:11 +0200)]
Add line number and filename in error message

7 years agoAdd information in case of markdown block code test failure
ggomez [Wed, 7 Sep 2016 14:43:18 +0000 (16:43 +0200)]
Add information in case of markdown block code test failure

7 years agoAuto merge of #39415 - alexcrichton:fix-upload-dirs, r=brson
bors [Fri, 3 Feb 2017 09:13:06 +0000 (09:13 +0000)]
Auto merge of #39415 - alexcrichton:fix-upload-dirs, r=brson

travis: Really delete the `doc` folder

Got two location to look at, be sure to delete them both.

7 years agoAuto merge of #39329 - petrochenkov:rb2, r=alexcrichton
bors [Fri, 3 Feb 2017 05:58:09 +0000 (05:58 +0000)]
Auto merge of #39329 - petrochenkov:rb2, r=alexcrichton

rustbuild: Build jemalloc and libbacktrace only once (take 2)

This is a rebase of https://github.com/rust-lang/rust/pull/38583 without any additions, but with implemented @alexcrichton's suggestions.
~~This includes `exists(Makefile)` => `cfg(stage0)` suggestion... but it will break cross-compilation, no? Are `libstd/liballoc_jemalloc` cross-compiled for `target != host` built during `stage0`?~~

r? @alexcrichton

7 years agoMove rfind to DoubleEndedIterator, add tracking issue.
Clar Charr [Fri, 3 Feb 2017 04:56:10 +0000 (23:56 -0500)]
Move rfind to DoubleEndedIterator, add tracking issue.

7 years agoAuto merge of #39287 - wesleywiser:move_cell, r=aturon
bors [Fri, 3 Feb 2017 03:23:35 +0000 (03:23 +0000)]
Auto merge of #39287 - wesleywiser:move_cell, r=aturon

Extend Cell to work with non-Copy types

I'm not sure that I did this right but all of the tests pass.

I also had to move the `new()` function so that `Cell`s with non-`Copy` `T`s could be created. That wasn't in the RFC but I assume it needed to be done?

7 years agoprevent multiple writes to a single entry in a `DepTrackingMap`
Niko Matsakis [Thu, 2 Feb 2017 10:26:24 +0000 (05:26 -0500)]
prevent multiple writes to a single entry in a `DepTrackingMap`

7 years agorejigger how we handle used trait imports
Niko Matsakis [Sat, 28 Jan 2017 11:34:07 +0000 (06:34 -0500)]
rejigger how we handle used trait imports

The previous way was not friendly to incremental compilation. The new
plan is to compute, for each body, a set of trait imports used in that
body (slightly subtle: for a closure, we assign the trait imports to the
enclosing fn). Then we walk all bodies and union these sets. The reason
we do this is that we can save the individual sets in the incremental
state, and then recompute only those sets that are needed. Before we
were planning to save only the final union, but in that case if some
components are invalidated we have to recompute *all* of them since we
don't have enough information to "partly" invalidate a result.

In truth, this set probably ought to be part of the `TypeckTables`;
however, I opted not to do that because I don't want to have to
save/restore the entire tables in the incremental state yet (since it
contains a lot of `NodeId` references, and removing those is a
significant refactoring).

7 years agoremove some of the ways to mutate a `DepTrackingMap`
Niko Matsakis [Wed, 1 Feb 2017 21:07:21 +0000 (16:07 -0500)]
remove some of the ways to mutate a `DepTrackingMap`

It is pretty suspect to insert an entry twice.

7 years agostore typeck lints in the `TypeckTables`
Niko Matsakis [Sat, 28 Jan 2017 23:13:21 +0000 (18:13 -0500)]
store typeck lints in the `TypeckTables`

Otherwise they are a "hidden output"

7 years agointroduce `LintTable`
Niko Matsakis [Sat, 28 Jan 2017 12:01:45 +0000 (07:01 -0500)]
introduce `LintTable`

7 years agochange the `used_trait_imports` map to be a `DefIdSet`
Niko Matsakis [Sat, 28 Jan 2017 11:02:28 +0000 (06:02 -0500)]
change the `used_trait_imports` map to be a `DefIdSet`

7 years agodon't use a mutable field where parameter passing will do
Niko Matsakis [Fri, 27 Jan 2017 22:19:02 +0000 (17:19 -0500)]
don't use a mutable field where parameter passing will do

7 years agoAuto merge of #39466 - alexcrichton:fix, r=Manishearth
bors [Fri, 3 Feb 2017 00:47:58 +0000 (00:47 +0000)]
Auto merge of #39466 - alexcrichton:fix, r=Manishearth

std: Fix IntoIter::as_mut_slice's signature

This was intended to require `&mut self`, not `&self`, otherwise it's unsound!

Closes #39465

7 years agoAuto merge of #39470 - GuillaumeGomez:rollup, r=GuillaumeGomez
bors [Thu, 2 Feb 2017 21:58:10 +0000 (21:58 +0000)]
Auto merge of #39470 - GuillaumeGomez:rollup, r=GuillaumeGomez

Rollup of 9 pull requests

- Successful merges: #38823, #39196, #39299, #39319, #39373, #39383, #39416, #39420, #39427
- Failed merges:

7 years agoRollup merge of #39427 - steveklabnik:pliniker-mailmap, r=alexcrichton
Guillaume Gomez [Thu, 2 Feb 2017 21:22:33 +0000 (22:22 +0100)]
Rollup merge of #39427 - steveklabnik:pliniker-mailmap, r=alexcrichton

update mailmap for @pliniker

7 years agoRollup merge of #39420 - oli-obk:sugg, r=pnkfelix
Guillaume Gomez [Thu, 2 Feb 2017 21:22:29 +0000 (22:22 +0100)]
Rollup merge of #39420 - oli-obk:sugg, r=pnkfelix

parser: use suggestions instead of helps with code in them

7 years agoRollup merge of #39416 - tspiteri:ffi-unsafe-icon, r=brson
Guillaume Gomez [Thu, 2 Feb 2017 21:22:28 +0000 (22:22 +0100)]
Rollup merge of #39416 - tspiteri:ffi-unsafe-icon, r=brson

rustdoc: mark FFI functions with unsafety icon

Currently, in the list of functions, unsafe functions are marked with a superscript ⚠, but unsafe FFI functions are not. This patch treats unsafe FFI functions like other unsafe functions in this regard.

7 years agoRollup merge of #39383 - nagisa:mir-uninhabited-destinations, r=pnkfelix
Guillaume Gomez [Thu, 2 Feb 2017 21:22:26 +0000 (22:22 +0100)]
Rollup merge of #39383 - nagisa:mir-uninhabited-destinations, r=pnkfelix

Remove the workaround for gh32959

This workaround is no longer necessary as Rust, and by extension MIR, now support uninhabited type
properly. This removes the workaround for the gh32959 that was introduced in gh33267.

Fixes #32959

7 years agoRollup merge of #39373 - Mark-Simulacrum:remove-toprimitive, r=aturon
Guillaume Gomez [Thu, 2 Feb 2017 21:22:24 +0000 (22:22 +0100)]
Rollup merge of #39373 - Mark-Simulacrum:remove-toprimitive, r=aturon

Remove ToPrimitive trait.

It is no longer used.

7 years agoRollup merge of #39319 - nagisa:remove-rustsetpersonalityfn, r=pnkfelix
Guillaume Gomez [Thu, 2 Feb 2017 21:22:23 +0000 (22:22 +0100)]
Rollup merge of #39319 - nagisa:remove-rustsetpersonalityfn, r=pnkfelix

Remove unnecessary LLVMRustPersonalityFn binding

LLVM Core C bindings provide this function for all the versions back to what we support (3.7), and
helps to avoid this unnecessary builder->function transition every time. Also a negative diff.

Fixes #38462 (although it was pretty much fixed already)

7 years agoRollup merge of #39299 - federicomenaquintero:master, r=GuillaumeGomez
Guillaume Gomez [Thu, 2 Feb 2017 21:22:22 +0000 (22:22 +0100)]
Rollup merge of #39299 - federicomenaquintero:master, r=GuillaumeGomez

In std:rc, clarify the lack of mutability inside an Rc

Also, point to the example in Cell's docs for how to do it.

7 years agoRollup merge of #39196 - apasel422:nomicon, r=petrochenkov
Guillaume Gomez [Thu, 2 Feb 2017 21:22:21 +0000 (22:22 +0100)]
Rollup merge of #39196 - apasel422:nomicon, r=petrochenkov

Update nomicon to describe `#[may_dangle]`

CC #34761
r? @pnkfelix

7 years agoRollup merge of #38823 - Freyskeyd:doc-missingInformationCfgTest, r=steveklabnik
Guillaume Gomez [Thu, 2 Feb 2017 21:22:19 +0000 (22:22 +0100)]
Rollup merge of #38823 - Freyskeyd:doc-missingInformationCfgTest, r=steveklabnik

Improve doc cfg(test) and tests directory

Hi,

I was facing a problem with my code organisation. I was using a tests directory and i defined some `#[cfg(test)]` in my `src/`. But i was not able to use it in my `tests` folder.

```bash
.
├── Cargo.lock
├── Cargo.toml
├── src
│   ├── lib.rs
│   └── test.rs
└── tests
    └── x.rs
```
> src/lib.rs
```rust
pub mod test;

fn tesst() {
    assert!(test::t());
}
```
> src/test.rs
```rust
pub fn t() -> bool { true }
```
> test/x.rs
```rust
extern crate testt;

use testt::test;
fn tesst() {
    assert!(test::t());
}
```

I was unable to compile using `cargo test`:
```bash
error[E0432]: unresolved import `testt::test`
 --> tests/x.rs:3:5
  |
3 | use testt::test;
  |     ^^^^^^^^^^^ no `test` in `testt`
```

If i remove the `tests` directory everything works fine. To use an utils module in your `tests` directory, you need to create a module in the directory (like `tests/utils.rs`). My `tests/x.rs` look like this now:

```rust
extern crate testt;

mod utils;

fn tesst() {
    assert!(utils::t());
}
```

And my tree:
```bash
.
├── Cargo.lock
├── Cargo.toml
├── src
│   └── lib.rs
└── tests
    ├── utils.rs
    └── x.rs
```

I think that thing must be documented in the book.

Ping:
- @badboy : Because he's the one who showed me the path
- @shahn : Because he helped me too to find the solution

Signed-off-by: Freyskeyd <simon.paitrault@iadvize.com>
7 years agoFixup crate versions
Vadim Petrochenkov [Thu, 2 Feb 2017 20:55:42 +0000 (23:55 +0300)]
Fixup crate versions

7 years agoBuild libbacktrace/jemalloc only when their timestamps are older than sources
Vadim Petrochenkov [Tue, 31 Jan 2017 21:27:51 +0000 (00:27 +0300)]
Build libbacktrace/jemalloc only when their timestamps are older than sources

7 years agoFix build in cross-compilation scenarios
Vadim Petrochenkov [Sat, 28 Jan 2017 13:05:13 +0000 (16:05 +0300)]
Fix build in cross-compilation scenarios

7 years agorustbuild: Build jemalloc and libbacktrace only once (take 2)
Vadim Petrochenkov [Thu, 26 Jan 2017 22:57:30 +0000 (01:57 +0300)]
rustbuild: Build jemalloc and libbacktrace only once (take 2)

7 years agostd: Fix IntoIter::as_mut_slice's signature
Alex Crichton [Thu, 2 Feb 2017 19:26:44 +0000 (11:26 -0800)]
std: Fix IntoIter::as_mut_slice's signature

This was intended to require `&mut self`, not `&self`, otherwise it's unsound!

Closes #39465

7 years agoAuto merge of #39411 - tamird:match-arm-statics-ICE, r=alexcrichton
bors [Thu, 2 Feb 2017 18:20:37 +0000 (18:20 +0000)]
Auto merge of #39411 - tamird:match-arm-statics-ICE, r=alexcrichton

statics in match arm: compile with -g

Resubmission of #29700.

r? @alexcrichton

7 years agoAuto merge of #39402 - king6cong:master, r=nrc
bors [Thu, 2 Feb 2017 15:41:19 +0000 (15:41 +0000)]
Auto merge of #39402 - king6cong:master, r=nrc

comment rewording and argument unifying

7 years agoAuto merge of #39386 - tbu-:pr_pipe_less_syscalls, r=alexcrichton
bors [Thu, 2 Feb 2017 13:04:53 +0000 (13:04 +0000)]
Auto merge of #39386 - tbu-:pr_pipe_less_syscalls, r=alexcrichton

Use less syscalls in `anon_pipe()`

Save a `ENOSYS` failure from `pipe2` and don't try again.

Use `cvt` instead of `cvt_r` for `pipe2` - `EINTR` is not an error
`pipe2` can return.

7 years agoAuto merge of #39384 - wesleywiser:fix_fixmes, r=alexcrichton
bors [Thu, 2 Feb 2017 10:40:13 +0000 (10:40 +0000)]
Auto merge of #39384 - wesleywiser:fix_fixmes, r=alexcrichton

Resolve a bunch of fixmes

Resolves 56 fixmes in test code related to `box` syntax.

7 years agoAuto merge of #39116 - mgattozzi:better-string-message, r=nrc
bors [Thu, 2 Feb 2017 07:39:07 +0000 (07:39 +0000)]
Auto merge of #39116 - mgattozzi:better-string-message, r=nrc

Add clearer error message using `&str + &str`

This is the first part of #39018. One of the common things for new users
coming from more dynamic languages like JavaScript, Python or Ruby is to
use `+` to concatenate strings. However, this doesn't work that way in
Rust unless the first type is a `String`. This commit adds a check for
this use case and outputs a new error as well as a suggestion to guide
the user towards the desired behavior. It also adds a new test case to
test the output of the error.

7 years agoAuto merge of #38932 - petrochenkov:privctor, r=jseyfried
bors [Thu, 2 Feb 2017 05:10:40 +0000 (05:10 +0000)]
Auto merge of #38932 - petrochenkov:privctor, r=jseyfried

Privatize constructors of tuple structs with private fields

This PR implements the strictest version of such "privatization" - it just sets visibilities for struct constructors, this affects everything including imports.
```
visibility(struct_ctor) = min(visibility(struct), visibility(field_1), ..., visibility(field_N))
```
Needs crater run before proceeding.

Resolves https://github.com/rust-lang/rfcs/issues/902

r? @nikomatsakis

7 years agoUpdate Cell references in the book
Wesley Wiser [Thu, 2 Feb 2017 03:53:39 +0000 (22:53 -0500)]
Update Cell references in the book

7 years agoUpdate cell docs
Wesley Wiser [Fri, 27 Jan 2017 03:23:32 +0000 (22:23 -0500)]
Update cell docs

7 years agoAuto merge of #38661 - frewsxcv:vec-deque-partial-eq, r=aturon
bors [Thu, 2 Feb 2017 02:42:07 +0000 (02:42 +0000)]
Auto merge of #38661 - frewsxcv:vec-deque-partial-eq, r=aturon

Implement `PartialEq<[A]>` for `VecDeque<A>`.

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

7 years agoremove the wrapping arithmetics
Michał Krasnoborski [Thu, 2 Feb 2017 02:38:12 +0000 (03:38 +0100)]
remove the wrapping arithmetics

7 years agoAdjust heuristics to better handle "{}..." format strings.
Michał Krasnoborski [Wed, 1 Feb 2017 22:47:03 +0000 (23:47 +0100)]
Adjust heuristics to better handle "{}..." format strings.

7 years agostd: Add ToString trait specialization for Cow<'a, str> and String
f001 [Wed, 1 Feb 2017 03:54:36 +0000 (11:54 +0800)]
std: Add ToString trait specialization for Cow<'a, str> and String

r? @bluss

7 years agoRemoves FIXMEs related to #22405
Wesley Wiser [Tue, 31 Jan 2017 02:38:13 +0000 (21:38 -0500)]
Removes FIXMEs related to #22405

7 years agoIn std:rc, clarify the lack of mutability inside an Rc
Federico Mena Quintero [Wed, 25 Jan 2017 19:11:15 +0000 (13:11 -0600)]
In std:rc, clarify the lack of mutability inside an Rc

Also, point to the example in Cell's docs for how to do it.

7 years agoupdate mailmap for @pliniker
Steve Klabnik [Tue, 31 Jan 2017 18:19:03 +0000 (13:19 -0500)]
update mailmap for @pliniker

7 years agoDon't build gcc_personality_v0.c on NetBSD either
Jonathan A. Kollasch [Mon, 23 Jan 2017 16:14:16 +0000 (10:14 -0600)]
Don't build gcc_personality_v0.c on NetBSD either

7 years agouse suggestions instead of helps with code in them
Oliver Schneider [Tue, 31 Jan 2017 13:45:08 +0000 (14:45 +0100)]
use suggestions instead of helps with code in them

7 years agoAuto merge of #39379 - segevfiner:fix-backtraces-on-i686-pc-windows-gnu, r=alexcrichton
bors [Tue, 31 Jan 2017 11:18:22 +0000 (11:18 +0000)]
Auto merge of #39379 - segevfiner:fix-backtraces-on-i686-pc-windows-gnu, r=alexcrichton

Fix backtraces on i686-pc-windows-gnu by disabling FPO

This might have performance implications. But do note that MSVC
disables FPO by default nowadays and it's use is limited in exception
heavy languages like C++.

See discussion in: #39234
Closes: #28218
7 years agoAuto merge of #39354 - alexcrichton:less-output, r=steveklabnik
bors [Tue, 31 Jan 2017 08:44:07 +0000 (08:44 +0000)]
Auto merge of #39354 - alexcrichton:less-output, r=steveklabnik

rustdoc: Suppress warnings/errors with --test

Threads spawned by the test framework have their output captured by default, so
for `rustdoc --test` threads this propagates that capturing to the spawned
thread that we now have.

Closes #39327

7 years agoAuto merge of #38847 - michaelwoerister:gate-on-incr-comp, r=alexcrichton
bors [Tue, 31 Jan 2017 06:13:05 +0000 (06:13 +0000)]
Auto merge of #38847 - michaelwoerister:gate-on-incr-comp, r=alexcrichton

travis: Gate on some minimal support for incremental compilation.

This commit adds a travis job that

1. builds a stage2 compiler in incremental mode (but with empty incremental compilation cache), and
2. builds and runs the run-pass test suite also in incremental mode.

Building incrementally with an empty cache makes sure that the compiler doesn't crash in dependency tracking during bootstrapping. Executing the incrementally built test suite gives some measure of confidence that we generate valid code.

Note, however, that the above does not give strong guarantees about the validity of incremental compilation, it just provides a basis for being able to rely on from-scratch incr. comp. builds as reference values in further tests (which then do actual incremental compilation).

r? @alexcrichton

7 years agoAuto merge of #39250 - cseale:issue_30924, r=est31
bors [Tue, 31 Jan 2017 03:28:12 +0000 (03:28 +0000)]
Auto merge of #39250 - cseale:issue_30924, r=est31

[Gate Tests] - marking feature tests

Removal of the lang feature gate tests whitelist #39059

r? @est31

7 years agoAdd dev and ino to MetadataExt
Jeremy Soller [Tue, 31 Jan 2017 03:19:00 +0000 (20:19 -0700)]
Add dev and ino to MetadataExt

7 years ago[Gate Tests] - marking feature tests
Colm Seale [Sun, 22 Jan 2017 23:35:08 +0000 (23:35 +0000)]
[Gate Tests] - marking feature tests

Removal of the lang feature gate tests whitelist #39059

r? @est31

7 years agoAuto merge of #39230 - petrochenkov:nobox, r=eddyb
bors [Tue, 31 Jan 2017 00:02:15 +0000 (00:02 +0000)]
Auto merge of #39230 - petrochenkov:nobox, r=eddyb

Refactoring TyBox -> TyAdt

r? @eddyb
cc @Manishearth

7 years agorustdoc: mark ffi functions with unsafety icon
Trevor Spiteri [Mon, 30 Jan 2017 23:57:52 +0000 (00:57 +0100)]
rustdoc: mark ffi functions with unsafety icon

7 years agotravis: Really delete the `doc` folder
Alex Crichton [Mon, 30 Jan 2017 23:21:32 +0000 (15:21 -0800)]
travis: Really delete the `doc` folder

Got two location to look at, be sure to delete them both.

7 years agocompiletest: Clear RUSTFLAGS env-var for run-make tests.
Michael Woerister [Mon, 30 Jan 2017 17:28:31 +0000 (12:28 -0500)]
compiletest: Clear RUSTFLAGS env-var for run-make tests.

7 years agoFix debuginfo scope issue with `Box`
Vadim Petrochenkov [Mon, 30 Jan 2017 20:18:29 +0000 (23:18 +0300)]
Fix debuginfo scope issue with `Box`

7 years agocleanup: Refactor away `DtorKind`
Vadim Petrochenkov [Mon, 30 Jan 2017 20:18:22 +0000 (23:18 +0300)]
cleanup: Refactor away `DtorKind`

7 years agoImplement Drop for Box
Vadim Petrochenkov [Sat, 21 Jan 2017 19:44:44 +0000 (22:44 +0300)]
Implement Drop for Box

7 years agoMerge ty::TyBox into ty::TyAdt
Vadim Petrochenkov [Sat, 21 Jan 2017 14:40:31 +0000 (17:40 +0300)]
Merge ty::TyBox into ty::TyAdt

7 years agostatics in match arm: compile with -g
Tamir Duberstein [Sun, 8 Nov 2015 18:39:27 +0000 (13:39 -0500)]
statics in match arm: compile with -g

Closes #24956.

7 years agoAuto merge of #39368 - alexcrichton:fix-upload-dirs, r=aturon
bors [Mon, 30 Jan 2017 19:43:08 +0000 (19:43 +0000)]
Auto merge of #39368 - alexcrichton:fix-upload-dirs, r=aturon

travis: Tweak artifact uploads

* Don't upload `*.wixpdb` files by accident
* Don't upload `doc` dir by accident
* Fix level of indirection on Travis

7 years agotrans::debuginfo: simplify
Tamir Duberstein [Tue, 10 Nov 2015 17:42:37 +0000 (12:42 -0500)]
trans::debuginfo: simplify

7 years agotravis: Tweak artifact uploads
Alex Crichton [Sat, 28 Jan 2017 18:24:42 +0000 (10:24 -0800)]
travis: Tweak artifact uploads

* Don't upload `*.wixpdb` files by accident
* Don't upload `doc` dir by accident
* Fix level of indirection on Travis

7 years agoDon't handle ENOSYS in `anon_pipe()`
Tobias Bucher [Mon, 30 Jan 2017 16:37:49 +0000 (17:37 +0100)]
Don't handle ENOSYS in `anon_pipe()`

We're not calling the raw syscall but a libc function, the libc will
have a compatibility layer.

7 years agoAuto merge of #39407 - GuillaumeGomez:convert_module, r=frewsxcv
bors [Mon, 30 Jan 2017 13:16:57 +0000 (13:16 +0000)]
Auto merge of #39407 - GuillaumeGomez:convert_module, r=frewsxcv

Add missing url in convert module

r? @frewsxcv

7 years agoAuto merge of #39405 - tshepang:nits, r=sfackler
bors [Mon, 30 Jan 2017 06:45:13 +0000 (06:45 +0000)]
Auto merge of #39405 - tshepang:nits, r=sfackler

doc: minor Option improvements

7 years agodoc: minor Option improvements
Tshepang Lekhonkhobe [Mon, 30 Jan 2017 06:39:03 +0000 (08:39 +0200)]
doc: minor Option improvements