Commit Graph

73924 Commits

Author SHA1 Message Date
Esteban Küber
be6734a7e7 Move reason for move to label 2018-01-01 21:55:46 -08:00
Corey Farwell
301e457989 Fix panic condition docs for Vec::insert.
Fixes https://github.com/rust-lang/rust/issues/47065.
2018-01-01 19:06:59 -08:00
varkor
3dff918c6c Remove dependency on regex 2018-01-02 01:06:17 +00:00
tinaun
5c25b0c594 prevent generating duplicate stubs 2018-01-01 19:56:40 -05:00
bors
b9cf26c38a Auto merge of #47106 - EdSchouten:compiletest-cloudabi, r=alexcrichton
Tiny fixes to make compiletest work for CloudABI cross builds

I'm currently working toward getting a `src/ci/docker` container working to do isolated/automated builds and testing of `x86_64-unknown-cloudabi`. This is working pretty well, but still requires some fixes to `libtest` and `compiletest`. Here is the first set of fixes that I had to apply.
2018-01-02 00:31:07 +00:00
Robin Kruppe
03936115ef Check all repr hints together when checking for mis-applied attributes
Fixes #47094

Besides fixing that bug, this change has a user-visible effect on the spans in the "incompatible repr hints" warning and another error: they now point at `foo` and/or `bar` in `repr(foo, bar)` instead of the whole attribute. This is sometimes more precise (e.g., `#[repr(C, packed)]` on an enum points at the `packed`) but sometimes not. I moved a compile-fail test to a ui test to illustrate how it now looks in the common case of only one attribute.
2018-01-01 22:05:29 +01:00
Ed Schouten
4fe167adba Use the right TLS model for CloudABI.
CloudABI doesn't do dynamic linking. For this reason, there is no need
to handle any other TLS model than local-exec. CloudABI's C library
doesn't provide a __tls_get_addr() function to do Dynamic TLS.

By forcing local-exec to be used here, we ensure that we don't generate
function calls to __tls_get_addr().
2018-01-01 21:46:22 +01:00
Who? Me?!
05cbe6d7db
Fix typo 2018-01-01 13:17:25 -06:00
bors
b65f0bedd2 Auto merge of #46735 - Manishearth:memchr-find, r=burntsushi
Use memchr for str::find(char)

This is a 10x improvement for searching for characters.

This also contains the patches from https://github.com/rust-lang/rust/pull/46713 . Feel free to land both separately or together.

cc @mystor @alexcrichton

r? @bluss

fixes #46693
2018-01-01 19:04:33 +00:00
Ed Schouten
7b5543d7b6 Move the TestPaths structure from libtest to compiletest.
This structure doesn't seem to be used by libtest itself. It is used by
compiletest, but never passed on to anything externally. This makes it
easier to get the testing framework to work for CloudABI crossbuilds, as
CloudABI currently lacks PathBuf, which is used by TestPaths.
2018-01-01 19:30:19 +01:00
Ed Schouten
79b25c666f Add CloudABI to the list of supported targets in compiletest.
Without this change, compiletest will fail to run when targetting
CloudABI.
2018-01-01 19:27:58 +01:00
matthewjasper
f26c0b41d2 Delay panic for aliasing violation for static items. 2018-01-01 17:53:12 +00:00
matthewjasper
31a4cba010 Delay panic from incoherent drop implementation 2018-01-01 17:51:37 +00:00
bors
5deba220d4 Auto merge of #46278 - MaloJaffre:ci-compiler-docs, r=kennytm
Add compiler docs testing to CI.

Fixes #47025.
I don't know if `x86_64-gnu` is the right builder for this, but there seems to be time left on [Travis](https://travis-ci.org/rust-lang/rust/jobs/307488864).

Remaining problems blocking this PR:
- [x] broken links caused by rustdoc issues:
  - [x] `pub use self::Enum::...`: #46766 and #46767 (fixed by #47050, thanks @ollie27!)
  - [x] `impl Deref for DerefToStdType`: #32129 (ignored in linkchecker)
  - [x] `#[feature(decl_macro)]` and `use std::vec`: #47038 (ignored in linkchecker)
  - [x]  `rustc_data_structures::sync::{Lrc, RwLock}` aliases `std` types: #32130 (ignored in linkchecker)
- [x] markdown differences, in rust repository and in external crates, now failing the build with #46880 merged (all fixed)
- [x] multiple crate updates needed: `rand`, `log`, `parking_lot_core`, `flate2`
  - [x] submodule updates needed to deduplicate dependencies: `rust-installer`, ~`cargo`~ (done by #47052)
  - [x] #44953 test broken by `log` update (removed, this can be controversial)
- [x] Waiting `x86_64-gnu` build results ([done](https://travis-ci.org/rust-lang/rust/builds/323451069))

See individual commits for more details.
2018-01-01 16:22:26 +00:00
Manish Goregaokar
5cf55165fa handle overflow/underflow in index offsets 2018-01-01 19:55:21 +05:30
Malo Jaffré
2449230cce Enable compiler docs testing in x86_64-gnu 2018-01-01 14:44:13 +01:00
Malo Jaffré
cbb32a9418 Fix docs for future pulldown migration 2018-01-01 14:44:12 +01:00
Malo Jaffré
8395798d1a Ignore remaining broken links caused by rustdoc bugs
As pointed out by @ollie27.
2018-01-01 14:44:11 +01:00
Malo Jaffré
7249539de9 Fix broken links in internal docs 2018-01-01 14:44:11 +01:00
Malo Jaffré
8ed13d643a Update crates and submodules to pull doc fixes
Update `rand` crate to `0.3.19`.
Update `log` crate to `0.3.9` and `0.4.1`.
Update `parking_lot_core` crate to `0.2.9`.
Upgrade all flate2 dependencies to `1.0.1`.
- Update `rust-installer` submodule.
2018-01-01 14:44:10 +01:00
Malo Jaffré
0b177b4185 Remove a test blocking the update of the log crate
It tested #44953.
`log` macros in newer versions are no longer recursive, so these duplicated
error messages (about unstable feature uses) previously occurring at each
level of recursion are no longer possible, even with the fix by #45540.
Furthermore this test breaks when multiple versions of `log` are in the
sysroot (`log 0.3.9` depends on`log 0.4.1`)
2018-01-01 14:44:10 +01:00
bors
d5f2745e7c Auto merge of #47098 - estebank:immutable-field, r=nagisa
Reword trying to operate in immutable fields

The previous message ("cannot assign/mutably borrow immutable field")
when trying to modify a field of an immutable binding gave the
(incorrect) impression that fields can be mutable independently of their
ADT's binding. Slightly reword the message to read "cannot
assign/mutably borrow field of immutable binding".

Re #35937.
2018-01-01 12:51:54 +00:00
bors
bc1dda43ec Auto merge of #47095 - leodasvacas:clarify-is-import, r=jseyfried
Clarify where `is_import` is used

So it's not mistaken for dead code.
2018-01-01 10:02:45 +00:00
bors
1bcc6dc7ea Auto merge of #46895 - ricochet1k:macro-lifetimes, r=jseyfried
Allow lifetimes in macros

This is a resurrection of PR #41927 which was a resurrection of #33135, which is intended to fix #34303.

In short, this allows macros_rules! to use :lifetime as a matcher to match 'lifetimes.

Still to do:
- [x]  Feature gate
2018-01-01 07:21:23 +00:00
Hoàng Đức Hiếu
d7cdd56df4
memchr: fix variable name in docstrings 2018-01-01 14:03:49 +07:00
bors
f3ca88cff7 Auto merge of #47064 - kennytm:force-trailing-newlines, r=estebank
Add a tidy check for missing or too many trailing newlines.

I've noticed recently there are lots of review comments requesting to fix trailing newlines. If this is going to be an official style here, it's better to let the CI do this repetitive check.
2018-01-01 04:09:51 +00:00
bors
037bc651e5 Auto merge of #47052 - fschutt:master, r=estebank
Improved error messages for linking failure

Partial fix for #46998

It's unnecessary to print the linker options if there is no linker installed in the first place. Currently, for libraries, the output is still printed, but that should be cleaned up in the future. If you don't have gcc or g++ installed, so that no linker is installed on the system, the output is now this:

```
$ ./rustc hello.rs
error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: aborting due to previous error
```

For libraries, the linker arguments are still printed, but they should be cleaned up in further commits.
2018-01-01 01:00:24 +00:00
Esteban Küber
6384568fdb Reword trying to operate in immutable fields
The previous message ("cannot assign/mutably borrow immutable field")
when trying to modify a field of an immutable binding gave the
(incorrect) impression that fields can be mutable independently of their
ADT's binding. Slightly reword the message to read "cannot
assign/mutably borrow field of immutable binding".
2017-12-31 15:32:41 -08:00
bors
ad30f5476d Auto merge of #47089 - EdSchouten:cloudabi-is-not-unix, r=kennytm
Don't announce CloudABI as being UNIX.

This was originally brought in, because the definitions are based on
those of FreeBSD, Linux, etc. Even though CloudABI is based on POSIX, it
uses a subset that is so small that it's not reasonable to call it POSIX.

Now that I'm porting libstd, I'm running into some spots where I have to
explicitly disable code paths that were enabled by cfg(unix).
2017-12-31 22:21:20 +00:00
Felix Schütt
7c13fa3730 Update cargo 2017-12-31 22:48:33 +01:00
Felix Schütt
3e3536c09c Removed unnecessary output of linker options when linker is not installed
It's unnecessary to print the linker options if there is no linker installed.
Currently, for libraries, the output is still printed, see #46998 for
discussion
2017-12-31 22:48:33 +01:00
leonardo.yvens
f6ff3771e3 Clarify where is_import is used.
So it's not mistaken for dead code.
2017-12-31 17:25:56 -02:00
bors
9389e23a8a Auto merge of #47072 - EdSchouten:cloudabi-jemalloc, r=kennytm
Add CloudABI to the list of systems on which we stub out alloc_jemalloc.

The official jemalloc sources don't build cleanly on CloudABI yet, for
the reason that some of its tracing frameworks try to access the global
filesystem namespace, which CloudABI doesn't provide.

Always make use of the malloc implementation used by the C library,
which already happens to be jemalloc with some tiny build fixes.
2017-12-31 19:25:05 +00:00
bors
8c59418962 Auto merge of #46713 - Manishearth:memchr, r=bluss
Use memchr to speed up [u8]::contains 3x

None
2017-12-31 16:38:10 +00:00
Manish Goregaokar
4ef6847d4d Use memchr for [i8]::contains as well 2017-12-31 20:35:39 +05:30
bors
885011ef1f Auto merge of #47084 - zackmdavis:and_the_case_of_the_bloated_tuple_struct_indices, r=petrochenkov
in which leading zeroes on tuple-struct accesses are abjured

Resolves #47073. If accepted, a point in the compatibility section of the release notes is warranted.
2017-12-31 13:54:24 +00:00
Ed Schouten
c661e385fd Build the right platform module on CloudABI.
After #47089 lands, CloudABI will no longer be considered UNIX. We need
to pick the right allocator flavour now.
2017-12-31 13:21:46 +01:00
bors
e03742368f Auto merge of #47004 - nvzqz:rc-conversions, r=bluss,kennytm
Remove transmute in From<&str> impls for Arc/Rc

Performs conversion via raw pointer casts.
2017-12-31 10:36:28 +00:00
Ed Schouten
4685233122 Don't announce CloudABI as being UNIX.
This was originally brought in, because the definitions are based on
those of FreeBSD, Linux, etc. Even though CloudABI is based on POSIX, it
uses a subset that is so small that it's not reasonable to call it POSIX.

Now that I'm porting libstd, I'm running into some spots where I have to
explicitly disable code paths that were enabled by cfg(unix).
2017-12-31 11:14:38 +01:00
bors
a18dea908c Auto merge of #47079 - varkor:contrib-11, r=Mark-Simulacrum
Fix doc typo for is_ascii_graphic

Fixes #47067.
2017-12-31 07:29:16 +00:00
Zack M. Davis
b0f880ddd9 in which leading zeroes on tuple-struct accesses are abjured
Resolves #47073.
2017-12-30 21:16:16 -08:00
bors
2d74ce292e Auto merge of #47044 - topecongiro:fixed-ices, r=estebank
Add tests on fixed ICEs

Closes #29924. Closes #38857. Closes #39665. Closes #39872.
Closes #41210. Closes #41880. Closes #43483.

Note that compile-fail/E0599.rs is for #41210.
2017-12-31 04:46:26 +00:00
Christopher Durham
077ba8a799 Fix rust-lang/rust#46976 2017-12-30 22:18:39 -05:00
Matt Peterson
8b4bdc2f3f refactor lifetime out of is_lifetime 2017-12-30 21:47:45 -05:00
Christopher Durham
d4077ad621 Hard break for rust-lang/rust#46976 2017-12-30 21:41:58 -05:00
bors
54d7285a34 Auto merge of #47080 - varkor:contrib-12, r=rkruppe
Optimise min/max

Swapping the conditions generates more efficient x86 assembly. See
https://github.com/rust-lang/rust/pull/46926#issuecomment-354567412.

r? @rkruppe
2017-12-31 00:09:18 +00:00
Pietro Albini
9991fdf17a
Fix nested imports not included in the save_analysis output 2017-12-30 22:55:59 +01:00
varkor
fba16d3f0b Optimise min/max
Swapping the conditions generates more efficient x86 assembly. See
https://github.com/rust-lang/rust/pull/46926#issuecomment-354567412.
2017-12-30 21:38:43 +00:00
varkor
e154e33add Fix doc typo for is_ascii_graphic
Fixes #47067.
2017-12-30 21:27:43 +00:00
bors
3f916bd302 Auto merge of #47063 - kennytm:gate-tools-on-update, r=alexcrichton
Requires tools to test-pass if the corresponding submodule is updated.

Follow up of #46554. Breaking a tool would not stop bors from accepting a merge, but this also means when we intend to *fix* a tool but failed, bors will *still* accept the PR. This behavior is not helpful to the tool maintainers.

This PR attempts to fix this by rejecting the tool-update merge when a tool failed. It recognizes a PR as "tool-updating" when the corresponding submodule is changed, compared with the previous commit.
2017-12-30 19:38:24 +00:00