Commit Graph

75351 Commits

Author SHA1 Message Date
gnzlbg
f173a4c064 add missing min-llvm-version 2018-03-15 18:42:53 +01:00
gnzlbg
19b81f6114 error via bug! instead of stderr+terminate 2018-03-15 16:51:58 +01:00
gnzlbg
4fe6acf972 add compile fail tests 2018-03-15 16:36:02 +01:00
gnzlbg
8478fa2007 add min-llvm version to reduction tests 2018-03-15 10:10:16 +01:00
gnzlbg
3125a30759 error on vector reduction usage if LLVM version is < 5.0 2018-03-15 10:08:22 +01:00
gnzlbg
c990fa0d88 add dummy symbols for LLVM<6 2018-03-14 22:12:38 +01:00
gnzlbg
51832c36b7 fix style 2018-03-14 20:14:47 +01:00
gnzlbg
07ce659dd0 expose ordered/unordered/nanless intirnsics 2018-03-14 17:22:40 +01:00
gnzlbg
01cc5b3e19 add intrinsics for portable packed simd vector reductions 2018-03-13 16:47:48 +01:00
bors
e5acb0c8f6 Auto merge of #48799 - alexcrichton:more-osx-cores, r=Mark-Simulacrum
travis: Upgrade OSX builders

This upgrades the OSX builders to the `xcode9.3-moar` image which has 3 cores as
opposed to the 2 that our builders currently have. Should help make those OSX
builds a bit speedier!
2018-03-11 09:43:50 +00:00
bors
cd6e30bc0b Auto merge of #48908 - varkor:bss-undefined-globals, r=alexcrichton
Merge LLVM fix for undefined bss globals

This fixes #41315.

r? @japaric
2018-03-11 07:05:00 +00:00
bors
ae379bd1c7 Auto merge of #48691 - Zoxc:profq-chan, r=michaelwoerister
Move PROFQ_CHAN to a Session field

r? @michaelwoerister
2018-03-11 04:34:07 +00:00
bors
0bae326f6d Auto merge of #48419 - bobtwinkles:fix_late_bound_reg_self, r=nikomatsakis
Use free regions when determining self type in `compare_impl_method`

The ExplicitSelf::determine function expects to be able to compare regions. However, when the compare_self_type error reporting code runs we haven't resolved bound regions yet. Thus we replace them with free regions first. Fixes #48276
2018-03-10 23:34:11 +00:00
bors
2f0e6a3ba5 Auto merge of #48388 - kyrias:relro-level-cg, r=alexcrichton
Add relro-level tests

The `relro-level` debugging flag was added in #43170 which was merged in July 2017.  This PR moves this flag to be a proper codegen flag.
2018-03-10 13:31:06 +00:00
varkor
108c56660a Merge LLVM fix for undefined bss globals
This fixes #41315.
2018-03-10 12:38:41 +00:00
bors
87344aa59a Auto merge of #47574 - zilbuz:issue-14844, r=nikomatsakis
Show the used type variable when issuing a "can't use type parameters from outer function" error message

Fix #14844

r? @estebank
2018-03-10 10:52:07 +00:00
bors
948e3a30e6 Auto merge of #48755 - GuillaumeGomez:rustdoc-fixes, r=QuietMisdreavus
Multiple rustdoc fixes

Fixes #48733.

r? @QuietMisdreavus
2018-03-10 08:24:08 +00:00
bors
3edb3cc26c Auto merge of #48901 - alexcrichton:j1-install, r=Mark-Simulacrum
rustbuild: Pass `-j1` to OpenSSL `make install`

We explicitly do this when compiling OpenSSL itself due to weird racy issues in
its build system, and now we've started seeing issues in the `make install` step
so let's try and see what ratcheting down the parallelism does here...
2018-03-10 03:38:19 +00:00
Alex Crichton
30437237a8 rustbuild: Pass -j1 to OpenSSL make install
We explicitly do this when compiling OpenSSL itself due to weird racy issues in
its build system, and now we've started seeing issues in the `make install` step
so let's try and see what ratcheting down the parallelism does here...
2018-03-09 18:49:28 -08:00
bors
89115c098f Auto merge of #48891 - alexcrichton:dist-osx-9.3, r=kennytm
travis: Upgrade dist builders for OSX

This commit upgrades the dist builders for OSX to Travis's new `xcode9.3-moar`
image which has 3 cores available to it instead of 2. This should help us
provide speedier builds on OSX and hit timeouts less in theory!

Note that historically the dist builders for OSX have been a different version
than the ones that are running tests. I had forgotten why this was the case and
digging around brought up 307615567 where apparently Xcode 8 wasn't able to
compile LLVM with `MACOSX_DEPLOYMENT_TARGET=10.7` which we desired. On a whim I
gave this PR a spin and it [looks like][green] this has since been fixed (maybe
in LLVM?). In any case those green builds should hopefully mean that we can
safely upgrade and get faster infrastructure to boot.

This commit also includes an upgrade of OpenSSL. This is not done for security
reasons but rather build system reasons. Originally builds with the new image
[did not succeed][red] due to weird build failures in OpenSSL, but upgrading
seems to have made the spurious errors go away to here's to also hoping that's
fixed!

[green]: https://travis-ci.org/rust-lang/rust/builds/351353412
[red]: https://travis-ci.org/rust-lang/rust/builds/350969248
2018-03-09 21:46:58 +00:00
Alex Crichton
d65dfd13ec travis: Upgrade dist builders for OSX
This commit upgrades the dist builders for OSX to Travis's new `xcode9.3-moar`
image which has 3 cores available to it instead of 2. This should help us
provide speedier builds on OSX and hit timeouts less in theory!

Note that historically the dist builders for OSX have been a different version
than the ones that are running tests. I had forgotten why this was the case and
digging around brought up 307615567 where apparently Xcode 8 wasn't able to
compile LLVM with `MACOSX_DEPLOYMENT_TARGET=10.7` which we desired. On a whim I
gave this PR a spin and it [looks like][green] this has since been fixed (maybe
in LLVM?). In any case those green builds should hopefully mean that we can
safely upgrade and get faster infrastructure to boot.

This commit also includes an upgrade of OpenSSL. This is not done for security
reasons but rather build system reasons. Originally builds with the new image
[did not succeed][red] due to weird build failures in OpenSSL, but upgrading
seems to have made the spurious errors go away to here's to also hoping that's
fixed!

[green]: https://travis-ci.org/rust-lang/rust/builds/351353412
[red]: https://travis-ci.org/rust-lang/rust/builds/350969248
2018-03-09 13:03:13 -08:00
bors
257ec08e10 Auto merge of #48757 - alexcrichton:fix-msbuild-build, r=Mark-Simulacrum
rustbuild: Fix MSBuild location of `llvm-config.exe`

For LLD integration the path to `llvm-config` needed to change to inside the
build directory itself (for whatever reason) but the build directory is
different on MSBuild than it is on `ninja` for MSVC builds, so the path to
`llvm-config.exe` was actually wrong and not working!

This commit removes the `Build::llvm_config` function in favor of the source of
truth, the `Llvm` build step itself. The build step was then updated to find the
right build directory for MSBuild as well as `ninja` for where `llvm-config.exe`
is located.

Closes #48749
2018-03-09 19:02:13 +00:00
Guillaume Gomez
89f4f1bca1 Fix anchor not always being put at the right place 2018-03-09 17:45:44 +01:00
Guillaume Gomez
9e0ccc5a47 Fix escape not working when searchbar selected 2018-03-09 17:45:44 +01:00
Guillaume Gomez
6235ef0422 Add missing items in the sidebar for functions 2018-03-09 17:45:44 +01:00
Alex Crichton
be902e7168 rustbuild: Fix MSBuild location of llvm-config.exe
For LLD integration the path to `llvm-config` needed to change to inside the
build directory itself (for whatever reason) but the build directory is
different on MSBuild than it is on `ninja` for MSVC builds, so the path to
`llvm-config.exe` was actually wrong and not working!

This commit removes the `Build::llvm_config` function in favor of the source of
truth, the `Llvm` build step itself. The build step was then updated to find the
right build directory for MSBuild as well as `ninja` for where `llvm-config.exe`
is located.

Closes #48749
2018-03-09 07:29:08 -08:00
Johannes Löthberg
1dbce4b0af Make the default relro level be doing nothing at all
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2018-03-09 14:53:15 +01:00
bors
fedce67cd2 Auto merge of #48326 - RalfJung:generic-bounds, r=petrochenkov
Warn about ignored generic bounds in `for`

This adds a new lint to fix #42181. For consistency and to avoid code duplication, I also moved the existing "bounds in type aliases are ignored" here.

Questions to the reviewer:
* Is it okay to just remove a diagnostic error code like this? Should I instead keep the warning about type aliases where it is? The old code provided a detailed explanation of what's going on when asked, that information is now lost. On the other hand, `span_warn!` seems deprecated (after this patch, it has exactly one user left!).
* Did I miss any syntactic construct that can appear as `for` in the surface syntax? I covered function types (`for<'a> fn(...)`), generic traits (`for <'a> Fn(...)`, can appear both as bounds as as trait objects) and bounds (`for<'a> F: ...`).
* For the sake of backwards compatibility, this adds a warning, not an error. @nikomatsakis suggested an error in https://github.com/rust-lang/rust/issues/42181#issuecomment-306924389, but I feel that can only happen in a new epoch -- right?

Cc @eddyb
2018-03-09 10:45:29 +00:00
John Kåre Alsaker
184fd32a03 Move PROFQ_CHAN to a Session field 2018-03-09 08:04:31 +01:00
bors
2079a084df Auto merge of #48860 - Manishearth:rollup, r=Manishearth
Rollup of 5 pull requests

- Successful merges: #48527, #48588, #48801, #48856, #48857
- Failed merges:
2018-03-09 03:59:42 +00:00
Manish Goregaokar
b65b171f44
Rollup merge of #48857 - Songbird0:improve_column_macro_documentation, r=joshtriplett
Modify part of `column!` documentation.

Just like `line!` documentation, I've replaced:

> The returned column is not the invocation of the `column!` macro itself

By

> The returned column is *not necessarily* the line of the `column!` invocation itself

See #46997.
2018-03-08 17:25:59 -08:00
Manish Goregaokar
5ab485599d
Rollup merge of #48856 - Songbird0:improve_line_macro_documentation, r=joshtriplett
Modify part of `line!` documentation.

In accordance with #46997, I've replaced:

> The returned line is not the invocation of the line! macro itself [...]

By

> The returned line is *not necessarily* the line of the `line!` invocation itself [...]
2018-03-08 17:25:58 -08:00
Manish Goregaokar
68e7282aa8
Rollup merge of #48801 - Manishearth:epoch-features, r=nikomatsakis
Add functionality for gating feature flags on epochs ; rejigger epoch lints

fixes #48794

r? @nikomatsakis
2018-03-08 17:25:57 -08:00
Manish Goregaokar
b0bc601dcc
Rollup merge of #48588 - alexcrichton:termcolor, r=BurntSushi
rustc: Migrate to `termcolor` crate from `term`

This crate moves the compiler's error reporting to using the `termcolor` crate
from crates.io. Previously rustc used a super-old version of the `term` crate
in-tree which is basically unmaintained at this point, but Cargo has been using
`termcolor` for some time now and tools like `rg` are using `termcolor` as well,
so it seems like a good strategy to take!

Note that the `term` crate remains in-tree for libtest. Changing libtest will be
a bit tricky due to how the build works, but we can always tackle that later.

cc #45728
2018-03-08 17:25:56 -08:00
Manish Goregaokar
b228b053ec
Rollup merge of #48527 - zackmdavis:and_the_social_construction_of_tuples, r=estebank
in which parentheses are suggested for should-have-been-tuple-patterns

![destructure_suggest_parens](https://user-images.githubusercontent.com/1076988/36638335-48b082d4-19a7-11e8-9726-0d043544df2f.png)

Programmers used to working in some other languages (such as Python or
Go) might expect to be able to destructure values with comma-separated
identifiers but no parentheses on the left side of an assignment.

Previously, the first name in such code would get parsed as a
single-indentifier pattern—recognizing, for example, the
`let a` in `let a, b = (1, 2);`—whereupon we would have a fatal syntax
error on seeing an unexpected comma rather than the expected semicolon
(all the way nearer to the end of `parse_full_stmt`).

Instead, let's look for that comma when parsing the pattern, and if we
see it, make-believe that we're parsing the remaining elements in a
tuple pattern, so that we can suggest wrapping it all in parentheses. We
need to do this in a separate wrapper method called on a "top-level"
pattern, rather than within
`parse_pat` itself, because `parse_pat` gets called recursively to parse
the sub-patterns within a tuple pattern.

~~We could also do this for `match` arms, `if let`, and `while let`, but
we elect not to in this patch, as it seems less likely for users to make
the mistake in those contexts.~~

Resolves #48492.

r? @petrochenkov
2018-03-08 17:25:55 -08:00
Manish Goregaokar
a08cfc4cb6 Add rust_2018_idioms lint group 2018-03-08 17:10:06 -08:00
Manish Goregaokar
667973204d Note the future epoch for epoch lints 2018-03-08 17:10:06 -08:00
Manish Goregaokar
fbe57cf13e Make bare_trait_object not be an epoch lint 2018-03-08 17:10:06 -08:00
Manish Goregaokar
ae5ae846cd Make tyvar_behind_raw_pointer an epoch lint 2018-03-08 17:10:05 -08:00
Manish Goregaokar
29542ec85a Add test 2018-03-08 17:10:05 -08:00
Manish Goregaokar
197f35c3e0 Make bare_trait_lint allow for now 2018-03-08 17:10:05 -08:00
Manish Goregaokar
b88a61e36e Make it possible to ungate features by epoch 2018-03-08 17:10:05 -08:00
Manish Goregaokar
c3fe3a56c2 Allow mentioning an optional epoch on features 2018-03-08 17:10:05 -08:00
Manish Goregaokar
4338bd178d Move epochs to libsyntax 2018-03-08 17:10:03 -08:00
Anthony Defranceschi
a0758cdcff Modify part of column! documentation.
Just like `line!` documentation, I've replaced:

> The returned column is not the invocation of the `column!` macro itself

By

> The returned column is *not necessarily* the line of the `column!` invocation itself

See #46997.
2018-03-09 00:43:54 +01:00
Anthony Defranceschi
2d7472fadc Modify part of line! documentation.
In accordance with #46997, I've replaced:

> The returned line is not the invocation of the line! macro itself [...]

By

> The returned line is *not necessarily* the line of the `line!` invocation itself [...]
2018-03-09 00:36:07 +01:00
bors
604d4ce757 Auto merge of #48849 - Manishearth:rollup, r=Manishearth
Rollup of 7 pull requests

- Successful merges: #48292, #48682, #48699, #48738, #48752, #48789, #48808
- Failed merges:
2018-03-08 22:08:21 +00:00
Basile Desloges
0e68bb9728 Update tests 2018-03-08 22:28:52 +01:00
Basile Desloges
48ba50e10c Update "type parameters from outer function" error messages 2018-03-08 22:28:51 +01:00
Basile Desloges
b3164f3ab4 Add codemap functions to retrieve the source before a given span 2018-03-08 22:28:50 +01:00