Commit Graph

56784 Commits

Author SHA1 Message Date
bors
0f5f325f9a Auto merge of #36344 - sanxiyn:llvm-components, r=alexcrichton
Use LLVM_COMPONENTS to run tests just for supported targets

This is already done for simd-ffi test, but not for atomic-lock-free test.

Fix #35023.
2016-09-11 19:06:35 -07:00
bors
0be88eb794 Auto merge of #36308 - dtolnay:inputitem, r=alexcrichton
Point macros 1.1 errors to the input item

Moved from https://github.com/alexcrichton/rust/pull/6 to continue discussion. Fixes #36218.

Before:

```rust
error[E0106]: missing lifetime specifier
  --> src/main.rs:10:10
   |
10 | #[derive(Serialize, Deserialize)]
   |          ^ expected lifetime parameter

error[E0038]: the trait `T` cannot be made into an object
  --> src/main.rs:15:15
   |
15 | #[derive(Serialize, Deserialize)]
   |          ^^^^^^^^^^ the trait `T` cannot be made into an object
```

After:

```rust
error[E0106]: missing lifetime specifier
  --> src/main.rs:11:1
   |
11 | struct A {
   | ^ expected lifetime parameter

error[E0038]: the trait `T` cannot be made into an object
  --> src/main.rs:16:1
   |
16 | struct B<'a> {
   | ^ the trait `T` cannot be made into an object
```
2016-09-11 15:12:27 -07:00
bors
4812cf392f Auto merge of #36369 - uweigand:s390x, r=alexcrichton
Add s390x support

This adds support for building the Rust compiler and standard
library for s390x-linux, allowing a full cross-bootstrap sequence
to complete.  This includes:

- Makefile/configure changes to allow native s390x builds
- Full Rust compiler support for the s390x C ABI
  (only the non-vector ABI is supported at this point)
- Port of the standard library to s390x
- Update the liblibc submodule to a version including s390x support
- Testsuite fixes to allow clean "make check" on s390x

Caveats:

- Resets base cpu to "z10" to bring support in sync with the default
  behaviour of other compilers on the platforms.  (Usually, upstream
  supports all older processors; a distribution build may then chose
  to require a more recent base version.)  (Also, using zEC12 causes
  failures in the valgrind tests since valgrind doesn't fully support
  this CPU yet.)

- z13 vector ABI is not yet supported.  To ensure compatible code
  generation, the -vector feature is passed to LLVM.  Note that this
  means that even when compiling for z13, no vector instructions
  will be used.  In the future, support for the vector ABI should be
  added (this will require common code support for different ABIs
  that need different data_layout strings on the same platform).

- Two test cases are (temporarily) ignored on s390x to allow passing
  the test suite.  The underlying issues still need to be fixed:
  * debuginfo/simd.rs fails because of incorrect debug information.
    This seems to be a LLVM bug (also seen with C code).
  * run-pass/union/union-basic.rs simply seems to be incorrect for
    all big-endian platforms.

Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
2016-09-11 10:53:24 -07:00
bors
1fca1ab0e7 Auto merge of #36351 - pnkfelix:fix-36278-size-miscalc, r=eddyb
When sizing DST, don't double-count nested struct prefixes.

When computing size of `struct P<T>(Q<T>)`, don't double-count prefix added by `Q`

Fix #36278. Fix #36294.
2016-09-10 13:10:29 -07:00
bors
f8ba7cb863 Auto merge of #36378 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 6 pull requests

- Successful merges: #35691, #36045, #36311, #36314, #36326, #36346
- Failed merges:
2016-09-10 07:03:27 -07:00
Guillaume Gomez
2ded39938a Rollup merge of #36346 - oli-obk:patch-1, r=arielb1
clean up `get_vtable`'s doc comment
2016-09-10 15:57:51 +02:00
Guillaume Gomez
8bfc561752 Rollup merge of #36326 - JDemler:master, r=steveklabnik
Fixed typo in nomicon
2016-09-10 15:57:51 +02:00
Guillaume Gomez
a221ad06f2 Rollup merge of #36314 - tshepang:not-needed, r=GuillaumeGomez
doc: we got coercion going on here, so no need to be this explicit
2016-09-10 15:57:50 +02:00
Guillaume Gomez
30198bf6b6 Rollup merge of #36311 - frewsxcv:instant-elapsed-example, r=GuillaumeGomez
Add doc example for `std::time::Instant::elapsed`.

None
2016-09-10 15:57:50 +02:00
Guillaume Gomez
26315bf015 Rollup merge of #36045 - ollie27:rustdoc_titles3, r=steveklabnik
rustdoc: Add missing item types to page titles

Most pages include the item type in the title such as "Struct std::vec::Vec". However it is missing from the pages for foreign functions, type definitions, macros, statics and constants. This adds them so for example, instead of a title of "std::u32::MAX" it is "Constant std::u32::MAX" to match the others.

[before](https://doc.rust-lang.org/nightly/std/u32/constant.MAX.html) [after](https://ollie27.github.io/rust_doc_test/std/u32/constant.MAX.html)
[before](https://doc.rust-lang.org/nightly/std/io/type.Result.html) [after](https://ollie27.github.io/rust_doc_test/std/io/type.Result.html)

Previous discussions: #34345, #35003
2016-09-10 15:57:50 +02:00
Guillaume Gomez
65af27b000 Rollup merge of #35691 - jaredwy:update-error-63, r=jonathandturner
Update the wording for E0063. This will truncate the fields to 3.

Instead of listing every field it will now show missing `a`, `z`, `b`, and 1 other field
This is for #35218 as part of #35233

r? @jonathandturner
2016-09-10 15:57:50 +02:00
bors
a5f4cc527d Auto merge of #36333 - apasel422:issue-35668, r=eddyb
Handle `ReEmpty` for `impl Trait`

Closes #35668

r? @eddyb
2016-09-10 02:24:27 -07:00
bors
f508ddc547 Auto merge of #36332 - llogiq:static_consts_feature, r=nikomatsakis
add static_in_const feature gate

also updates tests and deletes the spurious .bk files I inadvertently added last time.

r? @nikomatsakis
2016-09-09 21:35:30 -07:00
David Tolnay
fe41520fce Add ExpnId to expanded procedural macro code 2016-09-09 18:50:05 -07:00
Ulrich Weigand
19b84088d7 Add s390x support
This adds support for building the Rust compiler and standard
library for s390x-linux, allowing a full cross-bootstrap sequence
to complete.  This includes:

- Makefile/configure changes to allow native s390x builds
- Full Rust compiler support for the s390x C ABI
  (only the non-vector ABI is supported at this point)
- Port of the standard library to s390x
- Update the liblibc submodule to a version including s390x support
- Testsuite fixes to allow clean "make check" on s390x

Caveats:

- Resets base cpu to "z10" to bring support in sync with the default
  behaviour of other compilers on the platforms.  (Usually, upstream
  supports all older processors; a distribution build may then chose
  to require a more recent base version.)  (Also, using zEC12 causes
  failures in the valgrind tests since valgrind doesn't fully support
  this CPU yet.)

- z13 vector ABI is not yet supported.  To ensure compatible code
  generation, the -vector feature is passed to LLVM.  Note that this
  means that even when compiling for z13, no vector instructions
  will be used.  In the future, support for the vector ABI should be
  added (this will require common code support for different ABIs
  that need different data_layout strings on the same platform).

- Two test cases are (temporarily) ignored on s390x to allow passing
  the test suite.  The underlying issues still need to be fixed:
  * debuginfo/simd.rs fails because of incorrect debug information.
    This seems to be a LLVM bug (also seen with C code).
  * run-pass/union/union-basic.rs simply seems to be incorrect for
    all big-endian platforms.

Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
2016-09-09 22:28:19 +01:00
bors
1284081d33 Auto merge of #36256 - rjgoldsborough:make-configure-detect-nodejs-36207, r=alexcrichton
adding a check to bootstrap script

and a check to the rust config script

refs #36207

first crack at making configure detect nodejs
2016-09-09 14:04:31 -07:00
bors
f1f40f850e Auto merge of #36331 - petrochenkov:tyadt, r=eddyb
Refactor `TyStruct`/`TyEnum`/`TyUnion` into `TyAdt`

r? @eddyb
2016-09-09 04:57:11 -07:00
bors
3344f893a8 Auto merge of #36324 - nrc:save-docs, r=eddyb
save-analysis bits and pieces
2016-09-09 01:43:46 -07:00
Jared Wyles
0e32d11868 Update the wording for E0063. This will truncate the fields to 3.
Instead of listing every field it will now show missing `a`, `z`, `b`, and 1 other field
2016-09-09 18:04:26 +10:00
bors
5440a1fae7 Auto merge of #36322 - uweigand:nonblocking, r=alexcrichton
Fix argument to FIONBIO ioctl

The FIONBIO ioctl takes as argument a pointer to an integer, which
should be either 0 or 1 to indicate whether nonblocking mode is to
be switched off or on.  The type of the pointed-to variable is "int".

However, the set_nonblocking routine in libstd/sys/unix/net.rs passes
a pointer to a libc::c_ulong variable.  This doesn't matter on all
32-bit platforms and on all litte-endian platforms, but it will
break on big-endian 64-bit platforms.

Found while porting Rust to s390x (a big-endian 64-bit platform).

Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
2016-09-08 22:30:12 -07:00
bors
1df64450ec Auto merge of #36321 - uweigand:enum-abi, r=eddyb
Follow target ABI sign-/zero-extension rules for enum types

While attempting to port Rust to s390x, I ran into an ABI violation
(that caused rust_eh_personality to be miscompiled, breaking unwinding).
The problem is that this function returns an enum type, which is
supposed to be sign-extended according to the s390x ABI.  However,
common code would ignore target sign-/zero-extension rules for any
types that do not satisfy is_integral(), which includes enums.

For the general case of Rust enum types, which map to structure types
with a discriminant, that seems correct.  However, in the special case
of simple enums that map directly to C enum types (i.e. LLVM integers),
this is incorrect; we must follow the target extension rules for those.

Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
2016-09-08 19:15:50 -07:00
Jake Goldsborough
89bc13c37d tweaking the nodejs cmd sanity check 2016-09-08 17:51:06 -07:00
bors
378195665c Auto merge of #36173 - petrochenkov:unstat, r=nikomatsakis
Issue deprecation warnings for safe accesses to extern statics

Fixes https://github.com/rust-lang/rust/issues/35112
cc https://github.com/rust-lang/rust/issues/36247
2016-09-08 15:57:02 -07:00
Vadim Petrochenkov
aadbcffb7c Issue deprecation warnings for safe accesses to extern statics 2016-09-09 01:07:01 +03:00
Andre Bogus
76a2f9f454 fix feature error, test fallout 2016-09-08 22:59:21 +02:00
Vadim Petrochenkov
553d5f0a38 Address comments 2016-09-08 23:37:32 +03:00
Vadim Petrochenkov
f2b672d556 Refactor TyStruct/TyEnum/TyUnion into TyAdt 2016-09-08 22:17:53 +03:00
David Tolnay
707a40f206
Point compile-fail errors to the input item instead of the derive 2016-09-08 10:42:31 -07:00
bors
ea45edf0ee Auto merge of #35745 - jroesch:soundness-fix-29859, r=nikomatsakis
Fix soundness bug described in #29859

This is an attempt at fixing the problems described in #29859 based on an IRC conversation between @nikomatsakis and I today. I'm waiting on a full build to come back, otherwise both tests trigger the correct error.
2016-09-08 10:40:31 -07:00
Felix S. Klock II
dd570d64be For size of struct P<T>(Q<T>), don't double-count the prefix added by Q.
Fix #36278. Fix #36294.
2016-09-08 19:18:07 +02:00
bors
c615b21533 Auto merge of #36048 - GuillaumeGomez:code_clean, r=brson
Clean code a bit
2016-09-08 07:20:51 -07:00
Oliver Schneider
a3f05cec76 clean up get_vtable's doc comment 2016-09-08 12:58:05 +02:00
Seo Sanghyeon
8c9571279d Use LLVM_COMPONENTS to run tests just for supported targets 2016-09-08 18:43:21 +09:00
bors
0b02ae02bb Auto merge of #36316 - jseyfried:custom_derive_internal_unstable, r=eddyb
Avoid instaiblity errors in code generated by `syntax_ext::deriving::call_intrinsic()`

r? @eddyb
2016-09-08 01:44:51 -07:00
Andre Bogus
df611a62bb added feature description to reference 2016-09-08 07:34:41 +02:00
bors
a5dbf8a0f8 Auto merge of #36310 - jstnlef:remove-extraneous-not-equal-impl, r=sfackler
Removing the extraneous not_equal implementation for slices

Happened to stumble upon this one awhile back. Seemed a bit silly to have both the equals and not equals implementation when they're so similar.
2016-09-07 22:30:48 -07:00
Andre Bogus
2859177ea0 added feature gate test 2016-09-08 07:29:37 +02:00
Andre Bogus
e0eea8b7c1 warning → error, lowercase 2016-09-08 07:26:55 +02:00
bors
4a26286216 Auto merge of #36214 - jseyfried:stackless_expansion, r=nrc
macros: stackless expansion

After this PR, macro expansion cannot overflow the stack unless the expanded crate is too deep to fold.
Everything but the stackless placeholder expansion commit is also groundwork for macro modularization.

r? @nrc or @eddyb
2016-09-07 19:02:51 -07:00
Jared Roesch
a25428269d Fix duplicate error code 2016-09-07 17:22:19 -07:00
bors
a7b2232d20 Auto merge of #36292 - japaric:musl-root, r=alexcrichton
rustbuild: per target musl-root

config.toml now accepts a target.$TARGET.musl-root key that lets you
override the "build" musl-root value, which is set via the --musl-root
flag or via the build.musl-root key.

With this change, it's now possible to compile std for several musl
targets at once. Here's are the sample commands to do such thing:

```
$ configure \
    --enable-rustbuild \
    --target=x86_64-unknown-linux-musl,arm-unknown-linux-musleabi \
    --musl-root=/musl/x86_64-unknown-linux-musl/

$ edit config.toml && tail config.toml
[target.arm-unknown-linux-musleabi]
musl-root = "/x-tools/arm-unknown-linux-musleabi/arm-unknown-linux-musleabi/sysroot/usr"

$ make
```

r? @alexcrichton
With this we should be able to start producing releases of std for arm musl targets
2016-09-07 15:45:14 -07:00
Jeffrey Seyfried
9ac91fa48b Improve directory computation during invocation collection. 2016-09-07 22:42:17 +00:00
Jeffrey Seyfried
2d759046ba Implement stackless placeholder expansion. 2016-09-07 22:42:17 +00:00
Jeffrey Seyfried
d76bf3ed80 Strip unconfigured nodes in the InvocationCollector fold. 2016-09-07 22:41:35 +00:00
Andrew Paseltiner
d951d5dec4
Handle ReEmpty for impl Trait
Closes #35668
2016-09-07 18:26:53 -04:00
Jeffrey Seyfried
3af0c6572e Refactor code out of the folder implementation for StripUnconfigured. 2016-09-07 22:12:30 +00:00
Andre Bogus
41d1cd7196 add static_in_const feature gate
also updates tests and deletes the spurious .bk files I inadvertently
added last time.
2016-09-07 23:18:46 +02:00
Jakob Demler
f6aab5b9e5 Fixed typo in nomicon 2016-09-07 22:15:32 +02:00
Jake Goldsborough
7e46f2ceaa moving nodejs detection logic to configure and adding
a nodejs cmd sanity check
2016-09-07 13:13:37 -07:00
bors
9627e9ef6e Auto merge of #36266 - Sawyer47:issue-35169, r=alexcrichton
rustdoc: Filter more incorrect methods inherited through Deref

Old code filtered out only static methods. This code also excludes &mut self methods if there is no DerefMut implementation.

Fixes #35169
2016-09-07 12:30:03 -07:00