Commit Graph

61243 Commits

Author SHA1 Message Date
Guillaume Gomez
d81b440e92 Rollup merge of #39486 - phungleson:tiny-doc-wording-change, r=alexcrichton
Tiny doc wording change

Fix https://github.com/rust-lang/rust/issues/39366
2017-02-04 14:41:23 +01:00
bors
e4eea73306 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
2017-02-04 12:38:13 +00:00
Niko Matsakis
b3096e25c0 pacify the mercilous tidy, improve cycle unit test 2017-02-04 06:09:19 -05:00
Dylan McKay
b4e6f70eda [llvm] Use 32-bits for alignment
LLVM 4.0 changes this. This change is fine to make for LLVM 3.9 as we
won't have alignments greater than 2^32-1.
2017-02-04 23:51:10 +13:00
Tim Neumann
112a5a00e8 ignore more gdb versions with buggy rust support 2017-02-04 11:44:29 +01:00
Dylan McKay
768c6c081e Support a debug info API change for LLVM 4.0
Instead of directly creating a 'DIGlobalVariable', we now have to create
a 'DIGlobalVariableExpression' which itself contains a reference to a
'DIGlobalVariable'.

This is a straightforward change.

In the future, we should rename 'DIGlobalVariable' in the FFI
bindings, assuming we will only refer to 'DIGlobalVariableExpression'
and not 'DIGlobalVariable'.
2017-02-04 23:22:05 +13:00
bors
8568fdc499 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
2017-02-04 10:04:06 +00:00
king6cong
b4ef361a8c README path correction 2017-02-04 16:44:23 +08:00
Andrew Cann
a1f42cd893 Uninhabited while-let pattern fix 2017-02-04 16:27:45 +08:00
bors
7df5c0f17b Auto merge of #39425 - jakllsch:netbsd-a, r=alexcrichton
Don't build gcc_personality_v0.c on NetBSD either
2017-02-04 07:29:28 +00:00
Alex Crichton
f98f6c717a Pass -fPIC to native compiles on 32-bit
This is apparently a regression from 1.14.0 to 1.15.0. Previously we
passed `-fPIC` to C compilers on i686 targets, but the `gcc` crate
apparently [explicitly] didn't do this. I don't recall why that was
avoided but it was [previously passed by the makefiles][mk] and this
seems to have [caused a regression][regression] in Firefox, so this
commit reverts back to passing `-fPIC`.

[explicitly]: https://github.com/alexcrichton/gcc-rs/commit/362bdf20
[mk]: https://github.com/rust-lang/rust/blob/c781fc4a/mk/cfg/i686-unknown-linux-gnu.mk#L11
[regression]: https://bugzilla.mozilla.org/show_bug.cgi?id=1336155
2017-02-03 22:18:32 -08:00
Andrew Cann
42f3ac5ea6 Expand defaulted unit test 2017-02-04 14:17:58 +08:00
Andrew Cann
7444d07154 Fix test 2017-02-04 14:03:28 +08:00
bors
1b5c7ac833 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.
2017-02-04 04:53:53 +00:00
Simonas Kazlauskas
206ee20258 Unignore stage0/1 i128 tests as well 2017-02-04 06:12:23 +02:00
Simonas Kazlauskas
87ace0d720 More snap cleanup 2017-02-04 04:53:09 +02:00
king6cong
5a21f42cb7 run rustfmt for librustc/util/fs.rs 2017-02-04 10:37:09 +08:00
Vadim Chugunov
7504897e6b Don't link "nobundle" libs which had already been included in upstream crate. 2017-02-03 18:25:45 -08:00
Niko Matsakis
2fc15868a2 go back to the older model of coherence collect 2017-02-03 21:13:59 -05:00
est31
3c161393b7 Don't use "unadjusted" ABI on non windows platforms
We introduced the unadjusted ABI to work around wrong
(buggy) ABI expectations by LLVM on Windows [1].
Therefore, it should be solely used on Windows and not
on other platforms, like right now is the case.

[1]: see this comment for details https://github.com/rust-lang/rust/pull/38482#issuecomment-269074031
2017-02-04 02:42:38 +01:00
bors
c781fc4a6a Auto merge of #36320 - GuillaumeGomez:rustdoc_test_info, r=alexcrichton
Add information in case of markdown block code test failure

r? @steveklabnik

cc @jonathandturner
2017-02-04 01:32:21 +00:00
Brian Anderson
d650cf5c38 Update relnotes for 1.15.1
I already checked this into stable, but it needs to be on master/beta too.
2017-02-04 01:12:39 +00:00
Tobias Bucher
efeb42be28 Use less syscalls in FileDesc::set_{nonblocking,cloexec}
Only set the flags if they differ from what the OS reported, use
`FIONBIO` to atomically set the non-blocking IO flag on Linux.
2017-02-04 01:10:12 +01:00
Son
34f444de5d Extract libcore benchmarks to a separate folder 2017-02-04 10:04:22 +11:00
bors
0648517faf 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.
2017-02-03 22:55:28 +00:00
Vadim Petrochenkov
d14b268b9d libbacktrace: Fix uninitialized variable 2017-02-04 01:18:10 +03:00
Guillaume Gomez
2a8ee8c804 Add missing urls in HashMap 2017-02-03 22:38:44 +01:00
Alex Crichton
626e754473 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.
2017-02-03 13:25:46 -08:00
Emilio Cobos Álvarez
e866d07f55
lint/ctypes: Don't warn on non-unsized structs with PhantomData.
Fixes #34798
2017-02-03 22:00:40 +01:00
bors
86d9ed6c82 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%
```
2017-02-03 20:09:36 +00:00
Michael Woerister
14191eed41 Let the ICH testing framework check that all #[rustc_dirty] attrs have been actually checked. 2017-02-03 15:08:42 -05:00
Niko Matsakis
7abab8aee0 add a comment about optimality that somehow got removed 2017-02-03 12:42:18 -05:00
Michał Krasnoborski
0267529681 Merge remote-tracking branch 'upstream/master' into format-with-capacity 2017-02-03 17:48:07 +01:00
Son
3c020df3e9 tiny doc wording change 2017-02-04 00:16:56 +11:00
Guillaume Gomez
b7f1d7a4bd Update to last cargo version 2017-02-03 13:55:18 +01:00
Son
4ddb56bf4d Simplify wording & fix test src/doc 2017-02-03 23:51:50 +11:00
bors
aed6410a7b 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
2017-02-03 11:42:32 +00:00
Niko Matsakis
afbf6c8246 s/in_index/input_index/ 2017-02-03 06:09:47 -05:00
Niko Matsakis
ef9ae8581f make dirty process O(dirty)
The old algorithm was O(graph)
2017-02-03 06:08:27 -05:00
Andrew Cann
40c9538d2c Fix test 2017-02-03 18:48:15 +08:00
Andrew Cann
6a99573513 Fix test 2017-02-03 18:48:15 +08:00
Andrew Cann
5c90dd7978 Use a proper future-compatibility lint 2017-02-03 18:48:15 +08:00
Andrew Cann
085f046c28 Add is_defaulted_unit helper method 2017-02-03 18:48:15 +08:00
Andrew Cann
5dbaefb608 Hash TyTuple's defaulted flag 2017-02-03 18:48:15 +08:00
Andrew Cann
c570cd6636 Fix make tidy 2017-02-03 18:48:15 +08:00
Andrew Cann
2cc84df44c Add warning for () to ! switch 2017-02-03 18:48:15 +08:00
Guillaume Gomez
723eed3228 Update cargo version to last master 2017-02-03 11:08:20 +01:00
Guillaume Gomez
7c4b79c80a Update run-make/issue-22131 to new rustdoc --test format 2017-02-03 11:08:20 +01:00
Guillaume Gomez
f144795058 Set correct hoedown submodule branch 2017-02-03 11:08:20 +01:00
Guillaume Gomez
6756b72a1d Create new flag to test rustdoc --test 2017-02-03 11:08:20 +01:00