Commit Graph

68698 Commits

Author SHA1 Message Date
tinaun
7735f59e80 unstable book: OIBIT 2017-10-10 04:20:49 -04:00
Philipp Oppermann
06b9168d33 Rename test Linux target to avoid conflict with built-in target
It seems like the file wasn't actually used, since there is a built-in target with the same name. See https://github.com/rust-lang/rust/pull/45108#issuecomment-335173165 for more details.
2017-10-10 10:05:29 +02:00
sinkuu
fa14f797f3 Reword 2017-10-10 16:07:58 +09:00
Christopher Vittal
426183c01b Update README and tests for new infrastructure 2017-10-09 23:22:34 -04:00
Christopher Vittal
a5e8a0ea7c Modify MIR testing to require continuous lines
Mir testing now requires that lines be continuous. To achive this,
instead of collecting the expected mir as a string, it is now wrapped in
an `ExpectedLine` enum, that is either `Elision` or `Text(T)` where `T:
AsRef<str>`. `Text` lines must be matched in order, unless separated by
`Elision` lines. Matches occur greedily, that is, an Elision will skip
as few lines as possible.

To add a new elision marker. Put a comment containing only "..." and
whitespace in any MIR testing block. Like so:

```
// fn write_42(_1: *mut i32) -> bool {
//     ...
//     bb0: {
//         Validate(Acquire, [_1: *mut i32]);
//         Validate(Release, [_1: *mut i32]);
//         ...
//         return;
//     }
// }
```

Right now, all input before the line right after `// START` is elided,
and all input after the line right before `// END` is also not tested.

Many tests need to be updated. That will follow in the next commit.

cc #45153
2017-10-09 23:22:28 -04:00
bors
13ae187043 Auto merge of #44822 - frewsxcv:frewsxcv-eprintln, r=Kimundi
Migrate to eprint/eprintln macros where appropriate.

None
2017-10-10 02:54:14 +00:00
Guillaume Gomez
3a65d12df7 Add tabs for search for better information access
Make tabs work
2017-10-09 23:26:10 +02:00
Alex Crichton
5187763cff rustc: Allow target-specific default cgus
Some targets, like msp430 and nvptx, don't work with multiple codegen units
right now for bugs or fundamental reasons. To expose this allow targets to
express a default.

Closes #45000
2017-10-09 13:45:30 -07:00
Vadim Petrochenkov
b434c84bab cleanup: rustc doesn't use an external archiver 2017-10-09 22:36:08 +03:00
Malo Jaffré
679457ad2a Refactor to use debug_struct in several Debug impls
Fixes #44771.
2017-10-09 20:09:08 +02:00
gaurikholkar
29b576e15b Update let-expressions.rs 2017-10-09 23:32:21 +05:30
Vadim Petrochenkov
3e4d9df02b Fix a bug in diagnostics for x as usize < y
Improve diagnostics for `x as usize << y`
2017-10-09 20:02:37 +03:00
bors
692b94ae25 Auto merge of #45111 - aidanhs:aphs-bubble-worker-failures, r=alexcrichton
Don't panic in the coordinator thread, bubble up the failure

Fixes #43402 (take 2)

Followup to #45019, this makes the coordinator thread not panic on worker failures since they can be reported reasonably back in the main thread.

The output also now has no evidence of backtraces at all, unlike the previous PR:
```
$ ./build/x86_64-unknown-linux-gnu/stage1/bin/rustc -o "" x.rs
error: could not write output to : No such file or directory

error: aborting due to previous error
```

r? @alexcrichton
2017-10-09 16:31:15 +00:00
kennytm
6a7785330a
Rollup merge of #45136 - johnthagen:patch-1, r=QuietMisdreavus
Clarify RAM usage during build in README

The sentence wasn't immediately clear if it meant RAM or disk space before reading the next sentence.

I think this helps clarify it.
2017-10-10 00:27:28 +08:00
kennytm
c5ba2d2b57
Rollup merge of #45125 - bleibig:grammar-update, r=alexcrichton
Update grammar to parse current rust syntax

Mainly addressing #32723. This PR updates the bison grammar so that it can parse the current rust syntax, except for feature-gated syntax additions. It has been tested with all the tests in run-pass.

The grammar in this repo doesn't have build logic anymore, but you can test it out in https://github.com/bleibig/rust-grammar, which has all of what's in this PR. If you are interested in having build logic and grammar tests again, I can look into implementing that as well.

I'm aware that things are somewhat undecided as to what an official rust grammar should be from the discussion in #30942. With this PR we can go back to having an up-to-date flex/bison based grammar, but the rustypop grammar looks interesting as well.
2017-10-10 00:27:26 +08:00
kennytm
d7f1a260b9
Rollup merge of #45120 - johnthagen:none-identity-test, r=sfackler
Use identity operator `is` when comparing to None

This is very minor, but idiomatic Python code uses `is` for comparisons to `None`. This is because semantically we want to compare to the "identity" of `None`, not its value.

See [PEP8 for details](https://www.python.org/dev/peps/pep-0008/#programming-recommendations).
2017-10-10 00:27:24 +08:00
kennytm
380b7951ac
Rollup merge of #45118 - johnthagen:fix-section-key-name, r=alexcrichton
Fix variable name reference

As best I can tell, this was a typo due to how similar it looks to the function above it. PyCharm found this as a unbound local variable.
2017-10-10 00:27:23 +08:00
kennytm
743ff73e20
Rollup merge of #45117 - johnthagen:fix-str-raise, r=alexcrichton
Fix raising a bare str as an exception in configure.py

Raising a bare `str` has been [deprecated since Python 2.5](https://docs.python.org/2/whatsnew/2.5.html#pep-352-exceptions-as-new-style-classes).

On Python 2.7 it produces the following error:

```
TypeError: exceptions must be old-style classes or derived from BaseException, not str
```

For maximum compatibility with Python 2.7 and 3.x, we wrap the error message in `RuntimeError` which derives from `Exception`.
2017-10-10 00:27:22 +08:00
kennytm
4c992111a3
Rollup merge of #45106 - Pirh:process_stdio_docs, r=dtolnay
Add links and examples for std::process::Stdio

As per #29370
2017-10-10 00:27:20 +08:00
kennytm
9687c2efbe
Rollup merge of #45091 - kennytm:fix-45086, r=michaelwoerister
debuginfo-test: Fix #45086.

Fixes #45086, where all debuginfo-lldb fails when using LLDB from Xcode 9.
2017-10-10 00:27:19 +08:00
kennytm
9e6b565c61
Rollup merge of #45051 - k0pernicus:master, r=michaelwoerister
Debugger pretty printer files are take into account in test execution time-stamping

This PR is proposed to solve the issue #45022.
2017-10-10 00:27:17 +08:00
kennytm
dad731cc80
Rollup merge of #44962 - shepmaster:no-ignore-result, r=steveklabnik
Don't encourage people to ignore threading errors in the docs
2017-10-10 00:27:16 +08:00
Michael Woerister
eb1006f5cf incr.comp.: Add some documentation to force_from_dep_node(). 2017-10-09 17:29:59 +02:00
johnthagen
49a73d0901 Add __future__ imports to increase compatibility with Python 3. Derive Option from object to make it a new-style class for Python 3 compatibility. 2017-10-09 08:16:18 -07:00
QuietMisdreavus
fcee950660 let rustdoc print the crate version into docs 2017-10-09 09:56:17 -05:00
johnthagen
c3ff62863d Clarify RAM usage during build 2017-10-09 10:02:50 -04:00
bors
72d65019c7 Auto merge of #45075 - alexcrichton:inline-less, r=michaelwoerister
rustc: Don't inline in CGUs at -O0

This commit tweaks the behavior of inlining functions into multiple codegen
units when rustc is compiling in debug mode. Today rustc will unconditionally
treat `#[inline]` functions by translating them into all codegen units that
they're needed within, marking the linkage as `internal`. This commit changes
the behavior so that in debug mode (compiling at `-O0`) rustc will instead only
translate `#[inline]` functions into *one* codegen unit, forcing all other
codegen units to reference this one copy.

The goal here is to improve debug compile times by reducing the amount of
translation that happens on behalf of multiple codegen units. It was discovered
in #44941 that increasing the number of codegen units had the adverse side
effect of increasing the overal work done by the compiler, and the suspicion
here was that the compiler was inlining, translating, and codegen'ing more
functions with more codegen units (for example `String` would be basically
inlined into all codegen units if used). The strategy in this commit should
reduce the cost of `#[inline]` functions to being equivalent to one codegen
unit, which is only translating and codegen'ing inline functions once.

Collected [data] shows that this does indeed improve the situation from [before]
as the overall cpu-clock time increases at a much slower rate and when pinned to
one core rustc does not consume significantly more wall clock time than with one
codegen unit.

One caveat of this commit is that the symbol names for inlined functions that
are only translated once needed some slight tweaking. These inline functions
could be translated into multiple crates and we need to make sure the symbols
don't collideA so the crate name/disambiguator is mixed in to the symbol name
hash in these situations.

[data]: https://github.com/rust-lang/rust/issues/44941#issuecomment-334880911
[before]: https://github.com/rust-lang/rust/issues/44941#issuecomment-334583384
2017-10-09 14:00:12 +00:00
Michael Woerister
4a9df0ec62 incr.comp.: Move macro-export test case to src/test/incremental. 2017-10-09 15:38:51 +02:00
Guillaume Gomez
a28b2465d3 usize index message for vec 2017-10-09 14:45:41 +02:00
k0pernicus
53a648522b New rebase for the issue #45022
Add pretty printer files into test execution time-stamping

Move find_rust_src_path() as a method for Config

Move find_rust_src_path() as a method for Config

Call find_rust_src_path() from Config

Move find_rust_src_path() from common.rs to header.rs

Add pretty printer files as relevant files to get up_to_date information

Remove dead code

Add two pretty printer files to keep a close watch on

Move find_rust_src_path() as a method for Config

Move find_rust_src_path() as a method for Config

Call find_rust_src_path() from Config

Move find_rust_src_path() from common.rs to header.rs

Remove dead code

Add two pretty printer files to keep a close watch on
2017-10-09 13:06:51 +02:00
bors
d7acd29ad5 Auto merge of #45064 - alexcrichton:reduce-codegen-units, r=michaelwoerister
rustc: Reduce default CGUs to 16

Rationale explained in the included comment as well as #44941
2017-10-09 08:49:38 +00:00
bors
b2f67c8d56 Auto merge of #45041 - est31:master, r=alexcrichton
Remove support for the PNaCl target (le32-unknown-nacl)

This removes support for the `le32-unknown-nacl` target which is currently supported by rustc on tier 3. Despite the "nacl" in the name, the target doesn't output native code (x86, ARM, MIPS), instead it outputs binaries in the PNaCl format.

There are two reasons for the removal:

* Google [has announced](https://blog.chromium.org/2017/05/goodbye-pnacl-hello-webassembly.html) deprecation of the PNaCl format. The suggestion is to migrate to wasm. Happens we already have a wasm backend!
* Our PNaCl LLVM backend is provided by the fastcomp patch set that the LLVM fork used by rustc contains in addition to vanilla LLVM (`src/llvm/lib/Target/JSBackend/NaCl`). Upstream LLVM doesn't have PNaCl support. Removing PNaCl support will enable us to move away from fastcomp (#44006) and have a lighter set of patches on top of upstream LLVM inside our LLVM fork. This will help distribution packagers of Rust.

Fixes #42420
2017-10-09 04:59:02 +00:00
bors
dbed066d49 Auto merge of #45035 - alexcrichton:no-empty, r=michaelwoerister
rustc: Don't create empty codegen units

This'll end up just creating a bunch of object files that otherwise wouldn't
exist, so skip that extra work if possible.
2017-10-09 02:42:30 +00:00
Brian Leibig
8240b872e4 Update grammar to parse current rust syntax 2017-10-08 18:46:42 -07:00
Joshua Lockerman
bb7945e2fe Remove Queue::new. 2017-10-08 20:20:32 -04:00
bors
97554e4b28 Auto merge of #45033 - eddyb:capture-me-not, r=nikomatsakis
rustc_trans: do not set NoCapture for anonymous lifetime &T arguments.

This was both unsound (due to lifetime elision & unsafe code) and dead code (we erase lifetimes).

r? @nikomatsakis
2017-10-09 00:18:51 +00:00
johnthagen
a263a78b28 Fix PEP8 style issues in bootstrap code 2017-10-08 20:08:11 -04:00
johnthagen
d9e6703834 Use identity operator is when comparing to None 2017-10-08 19:46:58 -04:00
johnthagen
430e875b26 Fix variable name reference 2017-10-08 19:36:37 -04:00
johnthagen
dee517a286 Fix trying to raise a bare str as an exception. This has been deprecated since Python 2.5 2017-10-08 19:28:21 -04:00
johnthagen
9e569d7671 Fix typo in README 2017-10-08 19:15:17 -04:00
johnthagen
1c4add9c7c Fix typo in comment 2017-10-08 19:11:34 -04:00
JLockerman
41320fa52e cfg out Queue::new for emscripten
Queue::new is only used is tests atm, which causes warnings on emscripten which does not run queue tests.
2017-10-08 18:40:45 -04:00
Pirh
32c4b71471 Link std::process::Output to Command and Child 2017-10-08 22:16:09 +01:00
Aidan Hobson Sayers
911d95bfe3 Don't panic in the coordinator thread, bubble up the failure
Fixes #43402 (take 2)
2017-10-08 21:58:01 +01:00
bors
150b625a07 Auto merge of #45030 - raggi:zircon-handle-t, r=alexcrichton
zircon: the type of zx_handle_t is now unsigned

This is a kernel ABI change that landed today. I noticed some other ABI
issues and have left a note to cleanup once they are better defined.
2017-10-08 20:36:57 +00:00
Paul Faria
35545b36cf Improve newtype_index macro to handle description and constants consistently 2017-10-08 15:20:28 -04:00
bors
650b1b1f3a Auto merge of #45016 - pnkfelix:mir-borrowck-gather-and-signal-move-errors, r=nikomatsakis
MIR-borrowck: gather and signal any move errors

When building up the `MoveData` structure for a given MIR, also accumulate any erroneous actions, and then report all of those errors when the construction is complete.

This PR adds a host of move-related error constructor methods to `trait BorrowckErrors`. I think I got the notes right; but we should plan to audit all of the notes before turning MIR-borrowck on by default.

Fix #44830
2017-10-08 18:12:26 +00:00
Pirh
977200310a Remove ./ prefix from relative URLs
Also remove trailing whitespace to pass tidy checks.
2017-10-08 19:09:16 +01:00
Philipp Oppermann
e8ba32e7a0 Fix data-layout field
The value was generated according to [this comment by @japaric](https://github.com/rust-lang/rust/issues/31367#issuecomment-213595571).
2017-10-08 18:19:51 +02:00