]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agorustc: Don't use relative paths for extended errors
Alex Crichton [Wed, 3 Jan 2018 00:21:35 +0000 (16:21 -0800)]
rustc: Don't use relative paths for extended errors

These no longer work now that Cargo changes the cwd of rustc while it's running.
Instead use an absolute path that's set by rustbuild.

6 years agoBump to 1.25.0
Alex Crichton [Tue, 2 Jan 2018 01:53:47 +0000 (17:53 -0800)]
Bump to 1.25.0

* Bump the release version to 1.25
* Bump the bootstrap compiler to the recent beta
* Allow using unstable rustdoc features on beta - this fix has been applied to
  the beta branch but needed to go to the master branch as well.

6 years agoAuto merge of #46735 - Manishearth:memchr-find, r=burntsushi
bors [Mon, 1 Jan 2018 19:04:33 +0000 (19:04 +0000)]
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

6 years agoAuto merge of #46278 - MaloJaffre:ci-compiler-docs, r=kennytm
bors [Mon, 1 Jan 2018 16:22:26 +0000 (16:22 +0000)]
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.

6 years agohandle overflow/underflow in index offsets
Manish Goregaokar [Mon, 1 Jan 2018 14:25:21 +0000 (19:55 +0530)]
handle overflow/underflow in index offsets

6 years agoEnable compiler docs testing in x86_64-gnu
Malo Jaffré [Fri, 29 Dec 2017 15:07:37 +0000 (16:07 +0100)]
Enable compiler docs testing in x86_64-gnu

6 years agoFix docs for future pulldown migration
Malo Jaffré [Sun, 31 Dec 2017 16:17:01 +0000 (17:17 +0100)]
Fix docs for future pulldown migration

6 years agoIgnore remaining broken links caused by rustdoc bugs
Malo Jaffré [Fri, 29 Dec 2017 10:31:13 +0000 (11:31 +0100)]
Ignore remaining broken links caused by rustdoc bugs

As pointed out by @ollie27.

6 years agoFix broken links in internal docs
Malo Jaffré [Sun, 31 Dec 2017 16:08:04 +0000 (17:08 +0100)]
Fix broken links in internal docs

6 years agoUpdate crates and submodules to pull doc fixes
Malo Jaffré [Fri, 29 Dec 2017 10:24:38 +0000 (11:24 +0100)]
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.

6 years agoRemove a test blocking the update of the `log` crate
Malo Jaffré [Sat, 30 Dec 2017 18:58:37 +0000 (19:58 +0100)]
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`)

6 years agoAuto merge of #47098 - estebank:immutable-field, r=nagisa
bors [Mon, 1 Jan 2018 12:51:54 +0000 (12:51 +0000)]
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.

6 years agoAuto merge of #47095 - leodasvacas:clarify-is-import, r=jseyfried
bors [Mon, 1 Jan 2018 10:02:45 +0000 (10:02 +0000)]
Auto merge of #47095 - leodasvacas:clarify-is-import, r=jseyfried

Clarify where `is_import` is used

So it's not mistaken for dead code.

6 years agoAuto merge of #46895 - ricochet1k:macro-lifetimes, r=jseyfried
bors [Mon, 1 Jan 2018 07:21:23 +0000 (07:21 +0000)]
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

6 years agoAuto merge of #47064 - kennytm:force-trailing-newlines, r=estebank
bors [Mon, 1 Jan 2018 04:09:51 +0000 (04:09 +0000)]
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.

6 years agoAuto merge of #47052 - fschutt:master, r=estebank
bors [Mon, 1 Jan 2018 01:00:24 +0000 (01:00 +0000)]
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.

6 years agoReword trying to operate in immutable fields
Esteban Küber [Sun, 31 Dec 2017 23:32:41 +0000 (15:32 -0800)]
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".

6 years agoAuto merge of #47089 - EdSchouten:cloudabi-is-not-unix, r=kennytm
bors [Sun, 31 Dec 2017 22:21:20 +0000 (22:21 +0000)]
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).

6 years agoUpdate cargo
Felix Schütt [Sun, 31 Dec 2017 14:34:29 +0000 (15:34 +0100)]
Update cargo

6 years agoRemoved unnecessary output of linker options when linker is not installed
Felix Schütt [Thu, 28 Dec 2017 19:05:33 +0000 (20:05 +0100)]
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

6 years agoClarify where `is_import` is used.
leonardo.yvens [Sun, 31 Dec 2017 19:25:56 +0000 (17:25 -0200)]
Clarify where `is_import` is used.

So it's not mistaken for dead code.

6 years agoAuto merge of #47072 - EdSchouten:cloudabi-jemalloc, r=kennytm
bors [Sun, 31 Dec 2017 19:25:05 +0000 (19:25 +0000)]
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.

6 years agoAuto merge of #46713 - Manishearth:memchr, r=bluss
bors [Sun, 31 Dec 2017 16:38:10 +0000 (16:38 +0000)]
Auto merge of #46713 - Manishearth:memchr, r=bluss

Use memchr to speed up [u8]::contains 3x

None

6 years agoUse memchr for [i8]::contains as well
Manish Goregaokar [Mon, 18 Dec 2017 18:22:53 +0000 (10:22 -0800)]
Use memchr for [i8]::contains as well

6 years agoAuto merge of #47084 - zackmdavis:and_the_case_of_the_bloated_tuple_struct_indices...
bors [Sun, 31 Dec 2017 13:54:24 +0000 (13:54 +0000)]
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.

6 years agoAuto merge of #47004 - nvzqz:rc-conversions, r=bluss,kennytm
bors [Sun, 31 Dec 2017 10:36:28 +0000 (10:36 +0000)]
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.

6 years agoDon't announce CloudABI as being UNIX.
Ed Schouten [Sun, 31 Dec 2017 10:14:38 +0000 (11:14 +0100)]
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).

6 years agoAuto merge of #47079 - varkor:contrib-11, r=Mark-Simulacrum
bors [Sun, 31 Dec 2017 07:29:16 +0000 (07:29 +0000)]
Auto merge of #47079 - varkor:contrib-11, r=Mark-Simulacrum

Fix doc typo for is_ascii_graphic

Fixes #47067.

6 years agoin which leading zeroes on tuple-struct accesses are abjured
Zack M. Davis [Sun, 31 Dec 2017 05:16:16 +0000 (21:16 -0800)]
in which leading zeroes on tuple-struct accesses are abjured

Resolves #47073.

6 years agoAuto merge of #47044 - topecongiro:fixed-ices, r=estebank
bors [Sun, 31 Dec 2017 04:46:26 +0000 (04:46 +0000)]
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.

6 years agorefactor lifetime out of is_lifetime
Matt Peterson [Sun, 31 Dec 2017 02:47:45 +0000 (21:47 -0500)]
refactor lifetime out of is_lifetime

6 years agoAuto merge of #47080 - varkor:contrib-12, r=rkruppe
bors [Sun, 31 Dec 2017 00:09:18 +0000 (00:09 +0000)]
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

6 years agoOptimise min/max
varkor [Sat, 30 Dec 2017 21:38:43 +0000 (21:38 +0000)]
Optimise min/max

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

6 years agoFix doc typo for is_ascii_graphic
varkor [Sat, 30 Dec 2017 21:27:43 +0000 (21:27 +0000)]
Fix doc typo for is_ascii_graphic

Fixes #47067.

6 years agoAuto merge of #47063 - kennytm:gate-tools-on-update, r=alexcrichton
bors [Sat, 30 Dec 2017 19:38:24 +0000 (19:38 +0000)]
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.

6 years agoAuto merge of #47076 - steveklabnik:update-books, r=frewsxcv
bors [Sat, 30 Dec 2017 17:04:27 +0000 (17:04 +0000)]
Auto merge of #47076 - steveklabnik:update-books, r=frewsxcv

update books for next release

6 years agoupdate books for next release
steveklabnik [Sat, 30 Dec 2017 14:36:15 +0000 (09:36 -0500)]
update books for next release

6 years agoAdd tests on fixed ICEs
Seiichi Uchida [Tue, 26 Dec 2017 13:11:18 +0000 (22:11 +0900)]
Add tests on fixed ICEs

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

6 years agoRequires tools to test-pass if the corresponding submodule is updated.
kennytm [Fri, 29 Dec 2017 16:05:15 +0000 (00:05 +0800)]
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.

6 years agoAdd CloudABI to the list of systems on which we stub out alloc_jemalloc.
Ed Schouten [Sat, 30 Dec 2017 09:00:35 +0000 (10:00 +0100)]
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.

6 years agoAdd a tidy check to ensure all files have 1 or 2 trailing newlines.
kennytm [Sat, 30 Dec 2017 07:47:00 +0000 (15:47 +0800)]
Add a tidy check to ensure all files have 1 or 2 trailing newlines.

6 years agoRemove excessive trailing newlines.
kennytm [Sat, 30 Dec 2017 07:50:33 +0000 (15:50 +0800)]
Remove excessive trailing newlines.

6 years agoAdd trailing newlines to files which have no trailing newlines.
kennytm [Fri, 29 Dec 2017 18:25:40 +0000 (02:25 +0800)]
Add trailing newlines to files which have no trailing newlines.

6 years agoAuto merge of #47026 - EdSchouten:cloudabi-unwind, r=kennytm
bors [Fri, 29 Dec 2017 23:07:42 +0000 (23:07 +0000)]
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.

6 years agoAuto merge of #46327 - Aaronepower:master, r=alexcrichton
bors [Fri, 29 Dec 2017 20:23:02 +0000 (20:23 +0000)]
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)

6 years agoAuto merge of #47049 - eddyb:submodules, r=alexcrichton
bors [Fri, 29 Dec 2017 17:32:17 +0000 (17:32 +0000)]
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

6 years agoAuto merge of #47051 - Xanewok:update-rls, r=kennytm
bors [Fri, 29 Dec 2017 14:02:32 +0000 (14:02 +0000)]
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

6 years agoUpdate rustfmt to 0.3.4
Igor Matuszewski [Fri, 29 Dec 2017 09:12:30 +0000 (10:12 +0100)]
Update rustfmt to 0.3.4

6 years agoAdd proper library dependencies for libstd on CloudABI.
Ed Schouten [Fri, 29 Dec 2017 08:33:26 +0000 (09:33 +0100)]
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.

6 years agoAuto merge of #46883 - QuietMisdreavus:faildown, r=GuillaumeGomez
bors [Fri, 29 Dec 2017 03:23:37 +0000 (03:23 +0000)]
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.

6 years agoAuto merge of #47050 - ollie27:rustdoc_import_links, r=QuietMisdreavus
bors [Fri, 29 Dec 2017 00:41:49 +0000 (00:41 +0000)]
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

6 years agoAuto merge of #47047 - EdSchouten:rt-unused-import, r=estebank
bors [Thu, 28 Dec 2017 21:53:50 +0000 (21:53 +0000)]
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.

6 years agoAuto merge of #47036 - QuietMisdreavus:i-like-big-chars, r=frewsxcv
bors [Thu, 28 Dec 2017 19:06:39 +0000 (19:06 +0000)]
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

6 years agoUpdate RLS
Igor Matuszewski [Thu, 28 Dec 2017 18:46:29 +0000 (19:46 +0100)]
Update RLS

6 years agorustdoc: Don't try to generate links for modules in import paths
Oliver Middleton [Thu, 28 Dec 2017 17:49:36 +0000 (17:49 +0000)]
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.

6 years agoAlways name git submodules by their paths.
Eduard-Mihai Burtescu [Thu, 28 Dec 2017 17:20:19 +0000 (19:20 +0200)]
Always name git submodules by their paths.

6 years agoCleanup
Matt Peterson [Thu, 28 Dec 2017 16:52:50 +0000 (11:52 -0500)]
Cleanup

6 years agoAdd an entry in the unstable book
Matt Peterson [Thu, 21 Dec 2017 20:35:26 +0000 (15:35 -0500)]
Add an entry in the unstable book

6 years agoAdd feature gate macro_lifetime_matcher
Matt Peterson [Thu, 21 Dec 2017 15:44:44 +0000 (10:44 -0500)]
Add feature gate macro_lifetime_matcher

6 years agoCleanup
Matt Peterson [Thu, 21 Dec 2017 13:45:44 +0000 (08:45 -0500)]
Cleanup

6 years agoFix tests
Matt Peterson [Wed, 20 Dec 2017 22:22:37 +0000 (17:22 -0500)]
Fix tests

6 years agoFix build and add a macro lifetime labels test
Matt Peterson [Wed, 20 Dec 2017 20:37:22 +0000 (15:37 -0500)]
Fix build and add a macro lifetime labels test

6 years agoreplace parse_lifetime with expect_lifetime
Michael Hewson [Thu, 11 May 2017 22:59:48 +0000 (22:59 +0000)]
replace parse_lifetime with expect_lifetime
made `parser::Parser::expect_lifetime` public, so it can be called from `macro_parser::parse_nt`

6 years agoResurrecting #33135
Michael Hewson [Wed, 10 May 2017 00:30:47 +0000 (00:30 +0000)]
Resurrecting #33135

Started rebasing @sgrif's PR #33135 off of current master. (Well, actually merging it into a new branch based off current master.)

The following files still need to be fixed or at least reviewed:

- `src/libsyntax/ext/tt/macro_parser.rs`: calls `Parser::parse_lifetime`, which doesn't exist anymore
- `src/libsyntax/parse/parser.rs`: @sgrif added an error message to `Parser::parse_lifetime`. Code has since been refactored, so I just took it out for now.
- `src/libsyntax/ext/tt/transcribe.rs`: This code has been refactored bigtime. Not sure whether @sgrif's changes here are still necessary. Took it out for this commit.

6 years agoAuto merge of #47021 - shssoichiro:46576-Incorrect-Span-Imports, r=estebank
bors [Thu, 28 Dec 2017 16:16:46 +0000 (16:16 +0000)]
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.

6 years agoRemove an unused import for cfg(not(feature = "backtrace")).
Ed Schouten [Thu, 28 Dec 2017 13:49:31 +0000 (14:49 +0100)]
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.

6 years agoAuto merge of #46954 - davidalber:fix-contributor-covenant-link, r=alexcrichton
bors [Thu, 28 Dec 2017 13:24:21 +0000 (13:24 +0000)]
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.

6 years agoAuto merge of #47031 - topecongiro:issue-41719, r=jseyfried
bors [Thu, 28 Dec 2017 10:28:16 +0000 (10:28 +0000)]
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.

6 years agoAuto merge of #47013 - topecongiro:issue-46655, r=petrochenkov
bors [Thu, 28 Dec 2017 06:45:31 +0000 (06:45 +0000)]
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.

6 years agoAuto merge of #47018 - malbarbo:armv4t, r=alexcrichton
bors [Thu, 28 Dec 2017 04:13:24 +0000 (04:13 +0000)]
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

6 years agoPrefer to use attr::contains_name() and attr::find_by_name()
Seiichi Uchida [Tue, 26 Dec 2017 07:52:27 +0000 (16:52 +0900)]
Prefer to use attr::contains_name() and attr::find_by_name()

6 years agoAuto merge of #47017 - topecongiro:issue-33469, r=estebank
bors [Thu, 28 Dec 2017 01:25:38 +0000 (01:25 +0000)]
Auto merge of #47017 - topecongiro:issue-33469, r=estebank

Do not panic on interpolated token inside quote macro

Closes #33469.

6 years agoAuto merge of #47016 - malbarbo:dist-armv5te, r=alexcrichton
bors [Wed, 27 Dec 2017 22:39:00 +0000 (22:39 +0000)]
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).

6 years agoupdate char_indices example to highlight big chars
QuietMisdreavus [Wed, 27 Dec 2017 22:27:57 +0000 (16:27 -0600)]
update char_indices example to highlight big chars

6 years agoAuto merge of #47014 - topecongiro:fixed-ices, r=estebank
bors [Wed, 27 Dec 2017 19:52:26 +0000 (19:52 +0000)]
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.

6 years agobootstrap: pass --deny-render-differences to rustdoc
QuietMisdreavus [Wed, 20 Dec 2017 16:20:23 +0000 (10:20 -0600)]
bootstrap: pass --deny-render-differences to rustdoc

6 years agorustdoc: add option to abort process on markdown differences
QuietMisdreavus [Wed, 20 Dec 2017 16:20:01 +0000 (10:20 -0600)]
rustdoc: add option to abort process on markdown differences

6 years agoReport an error when resolving non-ident macro path failed
topecongiro [Wed, 27 Dec 2017 15:46:27 +0000 (00:46 +0900)]
Report an error when resolving non-ident macro path failed

6 years agoAuto merge of #46479 - bkchr:termination_trait, r=arielb1
bors [Wed, 27 Dec 2017 15:41:51 +0000 (15:41 +0000)]
Auto merge of #46479 - bkchr:termination_trait, r=arielb1

Implements RFC 1937: `?` in `main`

This is the first part of the RFC 1937 that supports new
`Termination` trait in the rust `main` function.

Thanks @nikomatsakis, @arielb1 and all other people in the gitter channel for all your help!

The support for doctest and `#[test]` is still missing, bu as @nikomatsakis said, smaller pull requests are better :)

6 years agoAuto merge of #47009 - eddyb:issue-46855, r=arielb1
bors [Wed, 27 Dec 2017 12:54:25 +0000 (12:54 +0000)]
Auto merge of #47009 - eddyb:issue-46855, r=arielb1

rustc_trans: support ZST indexing involving uninhabited types.

Fixes #46855 in a minimal way. I decided against supporting non-memory `Rvalue::Len` in this PR (see https://github.com/rust-lang/rust/issues/46855#issuecomment-352965807), as `PlaceContext::Inspect` is also used for `Rvalue::Discriminant`.

r? @arielb1

6 years agoAuto merge of #47007 - eddyb:issue-46897, r=arielb1
bors [Wed, 27 Dec 2017 10:19:43 +0000 (10:19 +0000)]
Auto merge of #47007 - eddyb:issue-46897, r=arielb1

rustc: don't use union layouts for tagged union enums.

Fixes #46897, fixes #43517 (AFAICT from the testcases).
This PR doesn't add any testcases, we should try to at least get perf ones (cc @Mark-Simulacrum).
I couldn't find an example in those issues where the choice of LLVM array vs struct (with N identical fields) for padding filler types is still needed, *on top of* this change, to prevent excessive LLVM sinking.

r? @arielb1

6 years agoAuto merge of #46977 - est31:column_fix, r=dtolnay
bors [Wed, 27 Dec 2017 07:11:50 +0000 (07:11 +0000)]
Auto merge of #46977 - est31:column_fix, r=dtolnay

 Make the output of the column! macro 1 based

Fixes  #46868.

I didn't add any regression tests as the change already had to change tests inside the codebase.

r? @dtolnay

6 years agoAuto merge of #46803 - estebank:non-ascii-def-span, r=petrochenkov
bors [Wed, 27 Dec 2017 04:23:10 +0000 (04:23 +0000)]
Auto merge of #46803 - estebank:non-ascii-def-span, r=petrochenkov

Use def span for non-ascii ident feature gate error

6 years agoRevert "New generated main returns void"
Bastian Köcher [Wed, 27 Dec 2017 00:23:28 +0000 (01:23 +0100)]
Revert "New generated main returns void"

This reverts commit 267800a7c0834dd8ca93a82a20cb0cdd9e7dc025.

6 years agoUpdate compiler_builtins
Marco A L Barbosa [Wed, 27 Dec 2017 00:22:21 +0000 (22:22 -0200)]
Update compiler_builtins

6 years agoDon't use `process::exit` as it is an `unreachable` on wasm32
Bastian Köcher [Tue, 26 Dec 2017 22:52:20 +0000 (23:52 +0100)]
Don't use `process::exit` as it is an `unreachable` on wasm32

6 years agoLink against -lunwind on CloudABI.
Ed Schouten [Tue, 26 Dec 2017 22:32:42 +0000 (23:32 +0100)]
Link against -lunwind on CloudABI.

CloudABI makes use of LLVM's libunwind to do stack unwinding. It is
installed under the name libunwind.a.

6 years agorustc: Switch `start_fn` to hidden visibility
Alex Crichton [Tue, 26 Dec 2017 22:26:03 +0000 (14:26 -0800)]
rustc: Switch `start_fn` to hidden visibility

This'll avoid exporting a symbol from binaries unnecessarily and should help the
linker clean things up if it can.

6 years agoAuto merge of #46975 - matthewjasper:mir-moveck-asm, r=arielb1
bors [Tue, 26 Dec 2017 20:47:31 +0000 (20:47 +0000)]
Auto merge of #46975 - matthewjasper:mir-moveck-asm, r=arielb1

[MIR Borrowck] Moveck inline asm statements

Closes #45695

New behavior:
* Input operands to `asm!` are moved, direct output operands are initialized.
* Direct, non-read-write outputs match the assignment changes in #46752 (Shallow writes, end borrows).

6 years agorustc: don't use union layouts for tagged union enums.
Eduard-Mihai Burtescu [Mon, 25 Dec 2017 23:40:48 +0000 (01:40 +0200)]
rustc: don't use union layouts for tagged union enums.

6 years agorustc_trans: support ZST indexing involving uninhabited types.
Eduard-Mihai Burtescu [Tue, 26 Dec 2017 01:20:35 +0000 (03:20 +0200)]
rustc_trans: support ZST indexing involving uninhabited types.

6 years agoPass correct span when lowering grouped imports
Josh Holmer [Thu, 21 Dec 2017 18:15:15 +0000 (13:15 -0500)]
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.

6 years agoAuto merge of #46554 - kennytm:45861-step-4-5-6-7-upload-test-result-and-remove-tools...
bors [Tue, 26 Dec 2017 18:03:00 +0000 (18:03 +0000)]
Auto merge of #46554 - kennytm:45861-step-4-5-6-7-upload-test-result-and-remove-toolstate-toml, r=alexcrichton

[auto-toolstate] Upload the toolstate result to an external git repository, and removes BuildExpectation

This PR consists of 3 commits.

1. (Steps 4–6) The `toolstate.json` output previously collected is now pushed to the https://github.com/rust-lang-nursery/rust-toolstate repository.
2. (Step 7) Revert commit ab018c7, thus removing all traces of `BuildExpectation` and `toolstate.toml`.
3. (Step 8) Adjust CONTRIBUTION.md for the new procedure.

These are the last steps of #45861. After this PR, the toolstate will be automatically computed and published to https://rust-lang-nursery.github.io/rust-toolstate/. There is no need to manage toolstate.toml again.

Closes #45861.

6 years agoUpdating Contributor Covenant links
David Alber [Fri, 22 Dec 2017 21:38:34 +0000 (13:38 -0800)]
Updating Contributor Covenant links

The current link 301s to a new destination.

6 years agoClarify toolstate names. Move publish.py to a more convenient location.
kennytm [Thu, 21 Dec 2017 17:16:21 +0000 (01:16 +0800)]
Clarify toolstate names. Move publish.py to a more convenient location.

6 years agoUpdate CONTRIBUTING.md now that toolstate.toml is gone.
kennytm [Thu, 7 Dec 2017 08:37:06 +0000 (16:37 +0800)]
Update CONTRIBUTING.md now that toolstate.toml is gone.

6 years agoRevert "Add a file to trivially disable tool building or testing"
kennytm [Wed, 6 Dec 2017 21:06:48 +0000 (05:06 +0800)]
Revert "Add a file to trivially disable tool building or testing"

This reverts commit ab018c76e14b87f3c9e0b7384cc9b02d94779cd5.

This also adds the `ToolBuild::is_ext_tool` field to replace the previous
`ToolBuild::expectation` field, to indicate whether a build-failure of
certain tool is essential.

6 years agoUpload the toolstate to the remote repository.
kennytm [Mon, 4 Dec 2017 14:31:57 +0000 (22:31 +0800)]
Upload the toolstate to the remote repository.

6 years agocargo update and add miri as the rustc workspace member.
kennytm [Fri, 15 Dec 2017 19:41:58 +0000 (03:41 +0800)]
cargo update and add miri as the rustc workspace member.

6 years agoAuto merge of #46956 - estebank:incompatible-arm-span-label, r=Zoxc
bors [Tue, 26 Dec 2017 15:15:08 +0000 (15:15 +0000)]
Auto merge of #46956 - estebank:incompatible-arm-span-label, r=Zoxc

"incompatible arm" diagnostic span tweak

Use span label instead of span note for single line spans in
"incompatible arm" diagnostic.