Commit Graph

61822 Commits

Author SHA1 Message Date
Josef Brandl
b70f929396 Make lifetime elision docs clearer 2017-02-27 21:49:05 +01:00
Alex Crichton
ac0521e526 travis: Fix typos in linux-tested-targets
These flags were supposed to be relevant for musl, not for gnu

cc #39979
2017-02-27 12:46:43 -08:00
Alex Crichton
65b46098b7 appveyor: Use sccache on pc-windows-gnu for caching
Now that mozilla/sccache#43 is fixed the caching works for MinGW on Windows. We
still can't use it for MSVC just yet, but I'll try to revive that branch at some
point.
2017-02-27 11:51:44 -08:00
Cengiz Can
e136bf6a4c Format note.rs with rustfmt 2017-02-27 22:30:47 +03:00
Cengiz Can
2f8ef50f7d Lower moved fn's visibility to supermodule 2017-02-27 22:23:00 +03:00
Cengiz Can
d21b0e35e7 Move two large error_reporting fn's to a separate file 2017-02-27 22:09:13 +03:00
bors
4be034e622 Auto merge of #38165 - Yamakaky:better-backtrace, r=petrochenkov
Improve backtrace formating while panicking.

Fixes #37783.

Done:

- Fix alignment of file paths for better readability
- `RUST_BACKTRACE=full` prints all the informations (current behaviour)
- `RUST_BACKTRACE=(short|yes)` is the default and does:
  - Skip irrelevant frames at the beginning and the end
  - Remove function address
  - Remove the current directory from the absolute paths
  - Remove `::hfabe6541873` at the end of the symbols
- `RUST_BACKTRACE=(0|no)` disables the backtrace.
- `RUST_BACKTRACE=<everything else>` is equivalent to `short` for
  backward compatibility.
- doc
- More uniform printing across platforms.

Removed, TODO in a new PR:

- Remove path prefix for libraries and libstd

Example of short backtrace:
```rust
fn fail() {
    panic!();
}

fn main() {
    let closure = || fail();
    closure();
}
```
Short:
```
thread 'main' panicked at 'explicit panic', t.rs:2
Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: t::fail
            at ./t.rs:2
   1: t::main::{{closure}}
            at ./t.rs:6
   2: t::main
            at ./t.rs:7
```
Full:
```
thread 'main' panicked at 'This function never returns!', t.rs:2
stack backtrace:
   0:     0x558ddf666478 - std::sys:👿:backtrace::tracing:👿:unwind_backtrace::hec84c9dd8389cc5d
                               at /home/yamakaky/dev/rust/rust/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1:     0x558ddf65d90e - std::sys_common::backtrace::_print::hfa25f8b31f4b4353
                               at /home/yamakaky/dev/rust/rust/src/libstd/sys_common/backtrace.rs:71
   2:     0x558ddf65cb5e - std::sys_common::backtrace::print::h9b711e11ac3ba805
                               at /home/yamakaky/dev/rust/rust/src/libstd/sys_common/backtrace.rs:60
   3:     0x558ddf66796e - std::panicking::default_hook::{{closure}}::h736d216e74748044
                               at /home/yamakaky/dev/rust/rust/src/libstd/panicking.rs:355
   4:     0x558ddf66743c - std::panicking::default_hook::h16baff397e46ea10
                               at /home/yamakaky/dev/rust/rust/src/libstd/panicking.rs:371
   5:     0x558ddf6682bc - std::panicking::rust_panic_with_hook::h6d5a9bb4eca42c80
                               at /home/yamakaky/dev/rust/rust/src/libstd/panicking.rs:559
   6:     0x558ddf64ea93 - std::panicking::begin_panic::h17dc549df2f10b99
                               at /home/yamakaky/dev/rust/rust/src/libstd/panicking.rs:521
   7:     0x558ddf64ec42 - t::diverges::he6bc43fc925905f5
                               at /tmp/p/t.rs:2
   8:     0x558ddf64ec5a - t::main::h0ffc20356b8a69c0
                               at /tmp/p/t.rs:6
   9:     0x558ddf6687f5 - core::ops::FnOnce::call_once::hce41f19c0db56f93
  10:     0x558ddf667cde - std::panicking::try::do_call::hd4c8c97efb4291df
                               at /home/yamakaky/dev/rust/rust/src/libstd/panicking.rs:464
  11:     0x558ddf698d77 - __rust_try
  12:     0x558ddf698c57 - __rust_maybe_catch_panic
                               at /home/yamakaky/dev/rust/rust/src/libpanic_unwind/lib.rs:98
  13:     0x558ddf667adb - std::panicking::try::h2c56ed2a59ec1d12
                               at /home/yamakaky/dev/rust/rust/src/libstd/panicking.rs:440
  14:     0x558ddf66cc9a - std::panic::catch_unwind::h390834e0251cc9af
                               at /home/yamakaky/dev/rust/rust/src/libstd/panic.rs:361
  15:     0x558ddf6809ee - std::rt::lang_start::hb73087428e233982
                               at /home/yamakaky/dev/rust/rust/src/libstd/rt.rs:57
  16:     0x558ddf64ec92 - main
  17:     0x7fecb869e290 - __libc_start_main
  18:     0x558ddf64e8b9 - _start
  19:                0x0 - <unknown>
```
2017-02-27 17:21:37 +00:00
Hiroki Kobayashi
e998666a77 Remove unnecessary "for" 2017-02-28 00:47:24 +09:00
Yamakaky
6398b2078d
This test is too hard to maintain cross-platform 2017-02-27 10:31:36 -05:00
bors
0ed75e1f47 Auto merge of #40121 - king6cong:fix-typo, r=apasel422
fix typo
2017-02-27 14:58:13 +00:00
Robin Stocker
8079bf35c5 Example for how to provide stdin using std::process::Command
Spawning a child process and writing to its stdin is a bit tricky due to
`as_mut` and having to use a limited borrow. An example for this might
help newer users.
2017-02-27 17:04:18 +11:00
king6cong
c01a6fec8c fix typo 2017-02-27 11:18:11 +08:00
bors
cb1f6492dd Auto merge of #40115 - MajorBreakfast:patch-2, r=steveklabnik
Loop docs: Present perfect instead of simple past

Sounds better with present perfect because there's a link to the present.

I'm not a native speaker, though. So, plz check whether it really is better ;)

r? @steveklabnik
2017-02-27 02:20:29 +00:00
Yamakaky
52bed53e99
Also ignore std::panic 2017-02-26 20:39:08 -05:00
bors
8e08bd61a1 Auto merge of #40102 - pmer:pmer/use-macos-term-in-docs, r=steveklabnik
doc: Use "macOS" terminology consistently

One line in the documentation used the term macOS while the other six used OSX. Be consistent and use the current product brand of macOS.
2017-02-27 00:06:11 +00:00
Yamakaky
d0fe018cd4
Remove unused 2017-02-26 15:53:55 -05:00
bors
60a0edc6c2 Auto merge of #39738 - keeperofdakeys:vec-docs, r=GuillaumeGomez
Add notes about capacity effects to Vec::truncate()

Add notes about the effects of Vec::truncate() and Vec::clear() on the capacity of a vector.
2017-02-26 20:36:10 +00:00
Guillaume Gomez
5ac7a035af Put the const type and value into <code> 2017-02-26 18:55:07 +01:00
bors
44e9e0a6cf Auto merge of #40112 - alexcrichton:fetch-all, r=brson
travis: Make more network requests retryable

This commit attempts to move more network operations to being retryable through
various operations. For example git submodule updates, downloading snapshots,
etc, are now all in retryable steps.

Hopefully this commit can cut down on the number of network failures we've been
seeing!
2017-02-26 15:15:23 +00:00
Guillaume Gomez
081336e8eb Improve associated constant rendering in rustdoc 2017-02-26 15:50:53 +01:00
Vadim Petrochenkov
9e054cf59d Fix tests on Windows in Debug configuration (#4) 2017-02-26 09:39:25 -05:00
Josef Brandl
912ce53604 Loop docs: Present perfect instead of simple past 2017-02-26 15:33:45 +01:00
bors
72e6d40f81 Auto merge of #40111 - alexcrichton:fix-manifests, r=brson
Attempt to fix nightly manifests

Found a few bugs and mistakes with the manifests.

Closes #40106
2017-02-26 12:58:08 +00:00
Alex Crichton
c08f3824cd travis: Make more network requests retryable
This commit attempts to move more network operations to being retryable through
various operations. For example git submodule updates, downloading snapshots,
etc, are now all in retryable steps.

Hopefully this commit can cut down on the number of network failures we've been
seeing!
2017-02-25 21:28:54 -08:00
bors
808dbcc9eb Auto merge of #40078 - tclfs:patch-3, r=GuillaumeGomez
Fix a typo
2017-02-26 05:22:08 +00:00
Alex Crichton
5ed6765fd4 build-manifest: Remove old to_hex function
This was actually just generating invalid hashes for the `rust`
component.
2017-02-25 20:20:09 -08:00
Alex Crichton
476a1cc244 build-manifest: Fix typos with rust-analysis
The name of the package is 'rust-analysis', not 'analysis', and then
name of the channel is 'nightly', not 'rust-nightly'
2017-02-25 20:20:04 -08:00
Paul Merrill
1eb3432673 doc: Use "macOS" terminology consistently
One line in the documentation used the term macOS while the other six
used OSX. Be consistent and use the name current product brand of macOS.
2017-02-25 15:47:41 -08:00
Yamakaky
c8b17427c2
typo 2017-02-25 16:12:51 -05:00
Guillaume Gomez
8c8eda8ecd Fix nightly-only experimental API display 2017-02-25 17:48:09 +01:00
Eduard-Mihai Burtescu
d9f0a949fd rustc_const_eval: demand that the MIR qualify_consts ran on each evaluated body. 2017-02-25 18:35:26 +02:00
Eduard-Mihai Burtescu
e7a48821c0 rustc_const_eval: always demand typeck_tables for evaluating constants. 2017-02-25 18:35:26 +02:00
Eduard-Mihai Burtescu
c832e6f327 rustc_typeck: rework coherence to be almost completely on-demand. 2017-02-25 18:35:26 +02:00
Eduard-Mihai Burtescu
9890e0466d rustc: allow handling cycle errors gracefully in on-demand. 2017-02-25 18:35:25 +02:00
Eduard-Mihai Burtescu
ba11640179 rustc_typeck: hook up collect and item/body check to on-demand. 2017-02-25 18:35:25 +02:00
Eduard-Mihai Burtescu
9c3c306800 rustc_typeck: move the leaves (generics, trait_def, adt_def) to on-demand. 2017-02-25 18:35:25 +02:00
Eduard-Mihai Burtescu
3146ee8672 rustc: simplify tcx.closure_type(...) as it can copy the cached values. 2017-02-25 18:35:25 +02:00
Eduard-Mihai Burtescu
91374f8fe4 rustc: combine BareFnTy and ClosureTy into FnSig. 2017-02-25 17:47:15 +02:00
Eduard-Mihai Burtescu
28f1cf4262 rustc_typeck: don't use Result for get_type_parameter_bounds and ensure_super_predicates. 2017-02-25 17:07:59 +02:00
Eduard Burtescu
4649f7387e rustc_typeck: lift CrateCtxt to TyCtxt. 2017-02-25 17:07:59 +02:00
Eduard-Mihai Burtescu
374ea14412 rustc_mir: expose MIR building through ty::maps::Provider. 2017-02-25 17:07:59 +02:00
Eduard Burtescu
b5c4244c6c rustc: introduce a query system for type information in ty::maps. 2017-02-25 17:07:59 +02:00
Eduard-Mihai Burtescu
cc8a3a93b7 rustc: consolidate dep-tracked hashmaps in tcx.maps. 2017-02-25 17:07:59 +02:00
Eduard-Mihai Burtescu
e96a171453 rustc: move the actual values of enum discriminants into a map. 2017-02-25 17:07:59 +02:00
Eduard-Mihai Burtescu
86e402904a rustc_typeck: simplify AstConv requests as implemented by collect. 2017-02-25 17:07:59 +02:00
Eduard-Mihai Burtescu
e8d01ea4c7 rustc: store type parameter defaults outside of ty::Generics. 2017-02-25 17:07:59 +02:00
Vadim Petrochenkov
53a5d56435 Fix tests on ARM Linux (#3) 2017-02-25 09:18:17 -05:00
bors
1572bf104d Auto merge of #40091 - eddyb:rollup, r=eddyb
Rollup of 28 pull requests

- Successful merges: #39859, #39864, #39888, #39903, #39905, #39914, #39945, #39950, #39953, #39961, #39980, #39988, #39993, #39995, #40019, #40020, #40022, #40024, #40025, #40026, #40027, #40031, #40035, #40037, #40038, #40064, #40069, #40086
- Failed merges: #39927, #40008, #40047
2017-02-25 12:29:32 +00:00
Eduard-Mihai Burtescu
207c763060 Rollup merge of #40086 - danobi:move-compiler_tests, r=brson
Move COMPILER_TESTS.md out of the root directory

See #39896.

r? @brson
2017-02-25 14:13:43 +02:00
Eduard-Mihai Burtescu
49c8d58662 Rollup merge of #40069 - Rufflewind:master, r=steveklabnik
Add Gankro's table to nomicon/src/phantom-data.md

Original: https://github.com/rust-lang/rust/issues/30069#issuecomment-159928136

Testing confirms that:

  - `PhantomData<fn() -> T>` does not actually enable drop checking.
  - `PhantomData<fn(T) -> T>` is neither variant nor contravariant.
2017-02-25 14:13:42 +02:00