Commit Graph

72993 Commits

Author SHA1 Message Date
Hoàng Đức Hiếu
d7cdd56df4
memchr: fix variable name in docstrings 2018-01-01 14:03:49 +07: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
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
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
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
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
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
bors
0296b7165b Auto merge of #47076 - steveklabnik:update-books, r=frewsxcv
update books for next release
2017-12-30 17:04:27 +00:00
steveklabnik
28d13f9edf update books for next release 2017-12-30 12:02:53 -05:00
Seiichi Uchida
b3c022db8b Add tests on fixed ICEs
Closes #29924. Closes #38857. Closes #39665. Closes #39872.
Closes #39553. Closes #41210. Closes #41880. Closes #43483.
2017-12-30 19:02:25 +09:00
kennytm
8ed16fe47a
Requires tools to test-pass if the corresponding submodule is updated.
If a PR intends to update a tool but its test has failed, abort the merge
regardless of current channel. This should help the tool maintainers if the
update turns out to be failing due to changes in latest master.
2017-12-30 17:15:40 +08:00
Ed Schouten
df0a2e440e 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-30 10:00:35 +01:00
bors
35681fbc76 Auto merge of #47026 - EdSchouten:cloudabi-unwind, r=kennytm
Link against -lunwind on CloudABI.

CloudABI makes use of LLVM's libunwind to do stack unwinding. It is
installed under the name libunwind.a.
2017-12-29 23:07:42 +00:00
bors
2dad872a2d Auto merge of #46327 - Aaronepower:master, r=alexcrichton
Updated RELEASES.md for 1.23.0

[Rendered](https://github.com/Aaronepower/rust/blob/master/RELEASES.md)
2017-12-29 20:23:02 +00:00
bors
1a7a5b5e38 Auto merge of #47049 - eddyb:submodules, r=alexcrichton
Always name git submodules by their paths.

Two submodules didn't follow the convention and they kept breaking rebases in GitKraken.

r? @alexcrichton
2017-12-29 17:32:17 +00:00
bors
f0e5c953e4 Auto merge of #47051 - Xanewok:update-rls, r=kennytm
Update RLS and Rustfmt

Essentially https://github.com/rust-lang/rust/pull/46929 with only RLS update that fixes the build.

The rls wasn't included in the recent nightlies and a lot of people have been wondering what to do about it, so it'd be good to include the RLS back with the nightly builds as soon as we can.

r? @alexcrichton
2017-12-29 14:02:32 +00:00
Igor Matuszewski
5081b94ac1 Update rustfmt to 0.3.4 2017-12-29 10:42:09 +01:00
Ed Schouten
146fe0ad75 Add proper library dependencies for libstd on CloudABI.
Don't attempt to build libunwind on CloudABI, as libunwind is already
provided by the system by default.
2017-12-29 09:33:26 +01:00
bors
966fdf15e2 Auto merge of #46883 - QuietMisdreavus:faildown, r=GuillaumeGomez
rustdoc: add option to abort the process on markdown differences

In the efforts of keeping the std docs free of markdown warnings, this PR adds a stopgap measure to make sure the CI fails if it detects a markdown difference. It does this by adding a new unstable flag to rustdoc, `--deny-render-differences`, which bootstrap then passes to rustdoc when documenting std and friends.

The implementation is... probably not the cleanest option. It currently adds an extra branch after it prints the markdown warnings, which just prints a final line and calls `::std::process::abort(1)`. I did it like this because if it just panics regularly, it looks like an ICE, an even though `html::render::run` returns a Result, that Result is also just `expect`ed immediately, generating the same problem. This way bypasses the panic handler at the top of the thread and looks like a proper failure. Since i don't have a real error Handler there, this is the best i can do without pulling in a real error system for rustdoc.

This PR is blocked on https://github.com/rust-lang/rust/pull/46853, which will fix the rendering differences that were present on master when i started this branch.
2017-12-29 03:23:37 +00:00
bors
ec9be91e43 Auto merge of #47050 - ollie27:rustdoc_import_links, r=QuietMisdreavus
rustdoc: Don't try to generate links for modules in import paths

The modules may be private or may even be enums so it would generate dead links.

Fixes #29814
Fixes #46766
Fixes #46767
2017-12-29 00:41:49 +00:00
bors
b84385b23b Auto merge of #47047 - EdSchouten:rt-unused-import, r=estebank
Remove an unused import for cfg(not(feature = "backtrace")).

The 'mem' module is not used for this specific code. This was
copy-pasted in by accident when adding RFC 1937 (? in main) support.
2017-12-28 21:53:50 +00:00
bors
77e189cd79 Auto merge of #47036 - QuietMisdreavus:i-like-big-chars, r=frewsxcv
update char_indices example to highlight big chars

There was a comment today in IRC where someone thought `char_indices()` and `chars().enumerate()` were equivalent, so i wanted to put an example in the docs where that wasn't true.

r? @rust-lang/docs
2017-12-28 19:06:39 +00:00
Igor Matuszewski
d332277819 Update RLS 2017-12-28 20:06:29 +01:00
Oliver Middleton
95f9491bc7 rustdoc: Don't try to generate links for modules in import paths
The modules may be private or may even be enums so it would generate dead links.
2017-12-28 17:51:31 +00:00
Eduard-Mihai Burtescu
9863d35cd6 Always name git submodules by their paths. 2017-12-28 19:20:19 +02:00
bors
06c8b385d1 Auto merge of #47021 - shssoichiro:46576-Incorrect-Span-Imports, r=estebank
Pass correct span when lowering grouped imports

Solves incorrect diagnostics for unused or deprecated imports. Closes #46576.

Deprecated imports had an existing test which asserted the incorrect span.
That test has been corrected as part of this commit.
2017-12-28 16:16:46 +00:00
Ed Schouten
bd812d9259 Remove an unused import for cfg(not(feature = "backtrace")).
The 'mem' module is not used for this specific code. This was
copy-pasted in by accident when adding RFC 1937 (? in main) support.
2017-12-28 14:49:31 +01:00
bors
4352c11dd0 Auto merge of #46954 - davidalber:fix-contributor-covenant-link, r=alexcrichton
Updating Contributor Covenant links

The current link 301s to a new destination.

```sh
$ curl -I http://contributor-covenant.org/version/1/3/0/
HTTP/1.1 301 Moved Permanently
Cache-Control: public, max-age=0, must-revalidate
Content-Length: 0
Content-Type: text/plain
Date: Fri, 22 Dec 2017 21:13:09 GMT
Location: https://www.contributor-covenant.org/version/1/3/0/
Age: 1
Connection: keep-alive
Server: Netlify
```

rust-lang/rust-www#994 fixes this in the Rust site.
2017-12-28 13:24:21 +00:00
bors
b24d12e622 Auto merge of #47031 - topecongiro:issue-41719, r=jseyfried
Report an error when resolving non-ident macro path failed

Closes #41719.

Please feel free to bikeshed on the error message.
2017-12-28 10:28:16 +00:00
bors
5f7aeaf6e2 Auto merge of #47013 - topecongiro:issue-46655, r=petrochenkov
Do not expand a derive invocation when derive is not allowed

Closes #46655.

The first commit is what actually closes #46655. The second one is just a refactoring I have done while waiting on a test.
2017-12-28 06:45:31 +00:00
bors
9a8c753d5e Auto merge of #47018 - malbarbo:armv4t, r=alexcrichton
Add armv4t-unknown-linux-gnueabi target

armv4t was left out of https://github.com/rust-lang/rust/pull/37615 (armv5te addition) to be included in a [future PR](https://github.com/rust-lang/rust/pull/37615#issuecomment-259189758).  So this PR adds armv4t target.

armv4t target is useful because the [armel](https://wiki.debian.org/ArmEabiPort) port of Debian targets armv4t
2017-12-28 04:13:24 +00:00
Seiichi Uchida
d882691046 Prefer to use attr::contains_name() and attr::find_by_name() 2017-12-28 12:32:24 +09:00
bors
6c06bfaeba Auto merge of #47017 - topecongiro:issue-33469, r=estebank
Do not panic on interpolated token inside quote macro

Closes #33469.
2017-12-28 01:25:38 +00:00
bors
e687205fd0 Auto merge of #47016 - malbarbo:dist-armv5te, r=alexcrichton
Add dist builder for armv5te-unknown-linux-gnueabi (again)

The dist builder was first add in https://github.com/rust-lang/rust/pull/46498 and later remove in https://github.com/rust-lang/rust/pull/46498 because of https://github.com/rust-lang/rust/issues/46822.

https://github.com/rust-lang/rust/issues/46822 seems to be fixed now (I and @green-s have [tested](https://github.com/rust-lang/rust/pull/46498#issuecomment-353901216) it).
2017-12-27 22:39:00 +00:00
QuietMisdreavus
ac15a2e5a2
update char_indices example to highlight big chars 2017-12-27 16:27:57 -06:00
bors
1abeb436d5 Auto merge of #47014 - topecongiro:fixed-ices, r=estebank
Add tests to fixed ICEs

Closes #27078. Closes #27985. Closes #39848. Closes #42164.
Closes #42479. Closes #45662. Closes #45965. Closes #46152.
2017-12-27 19:52:26 +00:00
QuietMisdreavus
dfbb946649 bootstrap: pass --deny-render-differences to rustdoc 2017-12-27 10:09:23 -06:00
QuietMisdreavus
e766f60c44 rustdoc: add option to abort process on markdown differences 2017-12-27 10:09:22 -06:00
topecongiro
d1b287cf32 Report an error when resolving non-ident macro path failed 2017-12-28 00:46:27 +09:00