Commit Graph

75203 Commits

Author SHA1 Message Date
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
Phlosioneer
e8904f935a Change the example string to something arbitrary
The choice of string is arbitrary, so all references to a number
in the string were removed. The string is now the standard "Hello
world!".
2018-02-25 15:46:17 -05: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
Christian Poveda
397ce8a1ae fixed links 2018-02-25 09:39:21 -05: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
Manish Goregaokar
52047f0ba0 ignore-pretty on dyn trait test 2018-02-24 18:02:33 -08:00
Michael Lamparski
af503be368 ignore-pretty for the macro-comma-support test
include! and the pretty test do not mix
2018-02-24 20:13:07 -05:00
Ryan Cumming
d27fac618d Fix find_width_of_character_at_span bounds check
Commit 0bd96671f0 added bounds checking of our current target byte
position to prevent infinite loops. Unfortunately it was comparing the
file-relative `target` versus the global relative `file_start_pos` and
`file_end_pos`.

The result is failing to detect multibyte characters unless their
file-relative offset fit within their global offset. This causes other
parts of the compiler to generate spans pointing to the middle of a
multibyte character which will ultimately panic in
`bytepos_to_file_charpos`.

Fix by comparing the `target` to the total file size when moving forward
and doing checked subtraction when moving backwards. This should
preserve the intent of the bounds check while removing the offset
confusion.

Fixes #48508
2018-02-25 11:41:08 +11:00
Manish Goregaokar
7ba4afc17a
Rollup merge of #48503 - petrochenkov:nort, r=Mark-Simulacrum
Remove directory `src/rt`
2018-02-24 15:52:20 -08:00
Manish Goregaokar
0a7210166e
Rollup merge of #48499 - dwijnand:patch-1, r=BurntSushi
Fix capitalisation in Path#file_name's docs
2018-02-24 15:52:19 -08:00
Manish Goregaokar
9523c82543
Rollup merge of #48490 - petrochenkov:orpat, r=eddyb
Implement multiple patterns with `|` in `if let` and `while let` (RFC 2175)

cc https://github.com/rust-lang/rust/issues/48215
2018-02-24 15:52:17 -08:00
Manish Goregaokar
7e6829938c
Rollup merge of #48481 - Manishearth:dyn-paren, r=petrochenkov
Allow parentheses in `dyn (Trait)`

r? @eddyb @nikomatsakis
2018-02-24 15:52:16 -08:00
Manish Goregaokar
2dba874d57
Rollup merge of #48452 - varkor:unpacked-kind, r=eddyb
Introduce UnpackedKind

This adds an `UnpackedKind` type as a typesafe counterpart to `Kind`. This should make future changes to kinds (such as const generics!) more resilient, as the type-checker will be able to catch more potential issues.

r? @eddyb
cc @yodaldevoid
2018-02-24 15:52:15 -08:00
Manish Goregaokar
90f21d4377
Rollup merge of #48448 - nikomatsakis:default-binding-mode-issue-46688, r=cramertj
reset default binding mode when we pass through a `&` pattern

Fixes #46688.

r? @cramertj
2018-02-24 15:52:14 -08:00
Manish Goregaokar
69757c5bb9
Rollup merge of #48441 - petrochenkov:exty, r=estebank
Fix parsing of extern paths in types and poly-traits

Fixes https://github.com/rust-lang/rust/issues/48262
2018-02-24 15:52:13 -08:00
Manish Goregaokar
43d1d6e885
Rollup merge of #48415 - QuietMisdreavus:traits-on-traits-on-traits, r=Manishearth
rustdoc: don't crash when an external trait's docs needs to import another trait

Fixes https://github.com/rust-lang/rust/issues/48414

When resolving intra-paths for an item, rustdoc needs to have information about their items on hand, for proper bookkeeping. When loading a path for an external item, it needs to load these items from their host crate, since their information isn't otherwise available. This includes resolving paths for those docs. which can cause this process to recurse. Rustdoc keeps a map of external traits in a `RefCell<HashMap<DefId, Trait>>`, and it keeps a borrow of this active when importing an external trait. In the linked crash, this led to a RefCell borrow error, panic, and ICE.

This PR manually releases the borrow while importing the trait, and also keeps a list of traits being imported at the given moment. The latter keeps rustdoc from infinitely recursing as it tries to import the same trait repeatedly.
2018-02-24 15:52:11 -08:00