Commit Graph

75006 Commits

Author SHA1 Message Date
Mark Simulacrum
9c80019e6c Fix error-format argument to x.py 2018-02-26 15:07:24 -07:00
Bryan Drewery
279e5b0a48 FreeBSD uses Clang which can return small structs as an integer. 2018-02-26 10:21:55 -08:00
Bryan Drewery
2026453bcf Add specific target option for returning struct as an integer. 2018-02-26 10:21:52 -08:00
Vadim Petrochenkov
9f9183d34d Fix rebase 2018-02-26 21:20:31 +03:00
Vadim Petrochenkov
7ba5fd168a Update UI tests 2018-02-26 20:24:42 +03:00
Vadim Petrochenkov
99b1054d9f Anonymize remaining line numbers at line starts 2018-02-26 20:24:41 +03:00
Vadim Petrochenkov
e650eef8b0 Implement opt-out from UI testing normalization 2018-02-26 20:24:41 +03:00
Vadim Petrochenkov
fa2d9fc4b9 Update UI tests 2018-02-26 20:24:02 +03:00
Vadim Petrochenkov
cdbd8c2f2a Support flag -Z ui-testing for tweaking diagnostic output for UI tests 2018-02-26 20:24:00 +03:00
Mark Simulacrum
5db73fc6db Encode linker arguments as UTF-16 on MSVC platforms 2018-02-26 08:51:39 -08:00
bors
bedbad6119 Auto merge of #48337 - GuillaumeGomez:rustc-explain, r=estebank
Rustc explain

Fixes #48041.

To make the review easier, I separated tests update to code update. Also, I used this script to generate new ui tests stderr:

```python
from os import listdir
from os.path import isdir, isfile, join

PATH = "src/test/ui"

def do_something(path):
    files = [join(path, f) for f in listdir(path)]

    for f in files:
        if isdir(f):
            do_something(f)
            continue
        if not isfile(f) or not f.endswith(".stderr"):
            continue
        x = open(f, "r")
        content = x.read().strip()
        if "error[E" not in content:
            continue
        errors = dict()
        for y in content.splitlines():
            if y.startswith("error[E"):
                errors[y[6:11]] = True
        errors = sorted(errors.keys())
        if len(errors) < 1:
            print("weird... {}".format(f))
            continue
        if len(errors) > 1:
            content += "\n\nYou've got a few errors: {}".format(", ".join(errors))
            content += "\nIf you want more information on an error, try using \"rustc --explain {}\"".format(errors[0])
        else:
            content += "\n\nIf you want more information on this error, try using \"rustc --explain {}\"".format(errors[0])
        content += "\n"
        x = open(f, "w")
        x.write(content)

do_something(PATH)
```
2018-02-26 12:34:52 +00:00
bors
4a70e27219 Auto merge of #48082 - jseyfried:improve_struct_field_hygiene, r=petrochenkov
macros: improve struct constructor field hygiene, fix span bug

Fixes #47311.
r? @nrc
2018-02-26 09:41:33 +00:00
Guillaume Gomez
ce6429af7a Fix new tests 2018-02-26 09:56:00 +01:00
Ryan Cumming
c237d4f859 Add test for #48508
This is named for the issue as it's testing the specific details of that
bug. It's a bit tricky as the ICE requires multiple files and debug info
enabled to trigger.
2018-02-26 19:25:10 +11:00
John Paul Adrian Glaubitz
7c84ba43ce test: Run atomic-lock-free on powerpc-linux-gnuspe 2018-02-26 02:07:24 +01:00
John Paul Adrian Glaubitz
b7683a33ce build-manifest: Add powerpc-unknown-linux-gnuspe target 2018-02-26 02:07:24 +01:00
John Paul Adrian Glaubitz
a22fbf8a9c librustc_back: Add support for powerpc-linux-gnuspe 2018-02-26 02:07:24 +01:00
John Paul Adrian Glaubitz
88de279dca bootstrap: Add openssl configuration for powerpc-unknown-linux-gnuspe 2018-02-26 02:07:24 +01:00
varkor
2466644389 Ensure main() always has external linkage
This ensures that the entry function is never elided due to inlining, even with `inline(always)`. Fixes #47783.

There were a couple of possible ways of addressing this issue; I simply picked the one that seemed most direct. A warning could be appropriate, but considering using inlining hints in other places it doesn't apply also throws no warnings, and it seems like an edge case anyway, I haven't added one for now.
2018-02-25 23:05:06 +00:00
Mark Mansi
7a82da1c4d tidy fix 2018-02-25 15:42:25 -06:00
Mark Mansi
d6f22a2481 Make comment into a doc comment and change readme ref 2018-02-25 15:26:53 -06:00
Mark Mansi
968ce252a8 Change links to readmes 2018-02-25 15:24:14 -06:00
Mikhail Modin
12c7e27330 restore Subslice move out from array after elaborate drops and borrowck 2018-02-25 18:59:16 +03:00
bors
322d7f7b97 Auto merge of #48531 - kennytm:rollup, r=kennytm
Rollup of 17 pull requests

- Successful merges: #47964, #47970, #48076, #48115, #48166, #48281, #48297, #48302, #48362, #48369, #48489, #48491, #48494, #48517, #48529, #48235, #48330
- Failed merges:
2018-02-25 15:04:40 +00:00
kennytm
1aa103511b
Rollup merge of #48330 - frewsxcv:frewsxcv-tests-zero-duration, r=sfackler
Add tests ensuring zero-Duration timeouts result in errors; fix Redox issues.

Part of #48311
2018-02-25 22:47:56 +08:00
Corey Farwell
a554a2f564 Return error if timeout is zero-Duration on Redox. 2018-02-25 08:54:08 -05:00
kennytm
0652af21b5
Rollup merge of #48235 - varkor:parse-float-lonely-exponent, r=alexcrichton
Make ".e0" not parse as 0.0

This forces floats to have either a digit before the separating point, or after. Thus `".e0"` is invalid like `"."`, when using `parse()`. Fixes #40654. As mentioned in the issue, this is technically a breaking change... but clearly incorrect behaviour at present.
2018-02-25 21:36:46 +08:00
kennytm
268b6d6189
Rollup merge of #48529 - remexre:docs/fix/unicode-0021, r=kennytm
Fixes docs for ASCII functions to no longer claim U+0021 is '@'.

Looks like a typo that got copy-pasted without anyone checking on it.
2018-02-25 21:30:53 +08:00
kennytm
eb0ab5e6b2
Rollup merge of #48517 - penpalperson:master, r=Mark-Simulacrum
Added error-format flag to x.py.

Fixes #48475

r? @Mark-Simulacrum
2018-02-25 21:30:51 +08:00
kennytm
4ab2184312
Rollup merge of #48494 - bdrewery:freebsd-omit-frame-pointer, r=eddyb
Workaround abort(2) on compilation error on FreeBSD.

Same problem as OpenBSD, tracking bug #43575.

@semarie @dumbbell
2018-02-25 21:30:50 +08:00
kennytm
1c62067448
Rollup merge of #48491 - glaubitz:s390x-linux, r=sanxiyn
test: Fix s390x-unknown-linux-gnu atomic-lock-free test not run for systemz

The s390-unknown-linux-gnu atomic-lock-free test is currently run for ```LLVM_COMPONENTS == powerpc```. I assume it was meant to be run for ```LLVM_COMPONENTS == systemz```, so let's fix this.
2018-02-25 21:30:48 +08:00
kennytm
266386a10e
Rollup merge of #48489 - glaubitz:x32-linux, r=alexcrichton
bootstrap: Add openssl configuration for x86_64-unknown-linux-gnux32

OpenSSL provides a native configuration for x86_64-unknown-linux-gnux32:

> https://github.com/openssl/openssl/blob/master/Configurations/10-main.conf#L810

Let's use it.
2018-02-25 21:30:47 +08:00
kennytm
c9b6dcaaf9
Rollup merge of #48369 - newpavlov:rdrand, r=nagisa
Rename rdrnd target feature to rdrand

Plus minor cleanup.

Related stdsimd [issue](https://github.com/rust-lang-nursery/stdsimd/issues/325).
2018-02-25 21:30:45 +08:00
kennytm
f28931f767
Rollup merge of #48362 - cuviper:libdir_relative, r=Mark-Simulacrum
rustbuild: Restore Config.libdir_relative

This re-introduces a `Config.libdir_relative` field, now derived from
`libdir` and made relative to `prefix` if necessary.

This fixes a regression from #46592 when `--libdir` is given an absolute
path.  `Builder::sysroot_libdir` should always use a relative path so
its callers don't clobber system locations, and `librustc` also asserts
that `CFG_LIBDIR_RELATIVE` is really relative.
2018-02-25 21:30:44 +08:00
Guillaume Gomez
16fb6b082d Reduce error codes length when too much are thrown 2018-02-25 12:15:05 +01:00
Guillaume Gomez
5747fd6611 Update ui tests 2018-02-25 12:15:05 +01:00
Guillaume Gomez
1dc2015a9d Update tools code 2018-02-25 12:14:43 +01:00
Guillaume Gomez
9b597a1542 Add rustc --explain back 2018-02-25 12:14:43 +01:00
kennytm
6627cbae92
Rollup merge of #48302 - mark-i-m:markim_macro-test, r=aturon
Move macro-at-most-once-rep-ambig test to ui test

I had written this test for the feature. Now moving to ui test.
2018-02-25 15:54:46 +08:00
kennytm
b571155631
Rollup merge of #48297 - glaubitz:sparc-linux, r=estebank
Add missing pieces for sparc-linux-gnu support

I noticed that while Rust has CABI support for 32-bit SPARC, there are still some pieces missing to be able to use Rust on a 32-Bit SPARC system like Gentoo which still defaults to a 32-bit port unlike Debian's sparc64 port.

This PR is an attempt to add the missing pieces. I will send the necessary changes for libc in a separate PR.

CC @jrtc27
2018-02-25 15:54:45 +08:00
kennytm
3e2072e51d
Rollup merge of #48281 - jakllsch:netbsd-powerpc, r=alexcrichton
Add powerpc-unknown-netbsd target
2018-02-25 15:54:44 +08:00
kennytm
b443e57ce6
Rollup merge of #48166 - hedgehog1024:hedgehog1024-stabilize-entry_and_modify, r=alexcrichton
Stabilize 'entry_and_modify' feature

Stabilize `entry_and_modify` feature introduced by #44734.

Closes #44733
2018-02-25 15:54:42 +08:00
kennytm
562626ac3f
Rollup merge of #48115 - Centril:feature/iterator_flatten, r=alexcrichton
Add Iterator::flatten

This adds the trait method `.flatten()` on `Iterator` which flattens one level of nesting from an iterator or (into)iterators. The method `.flat_fmap(f)` is then redefined as `.map(f).flatten()`. The implementation of `Flatten` is essentially that of what it was for `FlatMap` but removing the call to `f` at various places.

Hopefully the type alias approach should be OK as was indicated / alluded to by @bluss and @eddyb in https://github.com/rust-lang/rfcs/pull/2306#issuecomment-361391370.

cc @scottmcm
2018-02-25 15:54:41 +08:00
kennytm
725856d67f
Rollup merge of #48076 - canarysnort01:fix_pie, r=alexcrichton
pass correct pie args to gcc linker

When linking with gcc, run gcc -v to see if --enable-default-pie is
compiled in. If it is, pass -no-pie when necessary to disable pie.
Otherwise, pass -pie when necessary to enable it.

Fixes #48032 and fixes #35061
2018-02-25 15:54:40 +08:00
kennytm
e253224541
Rollup merge of #47970 - vlovich:condvar_wait_until, r=dtolnay
Add Condvar APIs not susceptible to spurious wake

Provide wait_until and wait_timeout_until helper wrappers that aren't susceptible to spurious wake.
Additionally wait_timeout_until makes it possible to more easily write code that waits for a fixed amount of time in face of spurious wakes since otherwise each user would have to do math on adjusting the duration.

Implements #47960.
2018-02-25 15:54:39 +08:00
kennytm
f5116e712f
Rollup merge of #47964 - jcowgill:mips64-abi, r=eddyb
rustc_trans: rewrite mips64 ABI code

This PR rewrites the ABI handling code for 64-bit MIPS and should fix various FFI issues including #47290.

To accomodate the 64-bit ABI I have had to add a new `CastTarget` variant which I've called `Chunked` (though maybe this isn't the best name). This allows an ABI to cast to some arbitrary structure of `Reg` types. This is required on MIPS which might need to cast to a structure containing a mixture of `i64` and `f64` types.
2018-02-25 15:54:38 +08:00
Scott McMurray
e20f7b2ea7 Restrict the Termination impls to simplify stabilization
Make a minimal commitment for stabilization.  More impls are likely in future, but are not necessary at this time.
2018-02-24 23:51:08 -08:00
Manish Goregaokar
0aa753ba30
1.25.0 -> 1.26.- 2018-02-25 14:24:24 +08:00
Nathan Ringo
64236092e5
Fixes docs for ASCII functions to no longer claim U+0021 is '@'. 2018-02-24 23:48:51 -06:00
bors
026339e42b Auto merge of #48520 - Manishearth:rollup, r=Manishearth
Rollup of 15 pull requests

- Successful merges: #47689, #48110, #48197, #48296, #48386, #48392, #48404, #48415, #48441, #48448, #48452, #48481, #48490, #48499, #48503
- Failed merges:
2018-02-25 02:07:14 +00:00