Commit Graph

64634 Commits

Author SHA1 Message Date
Mike Lubinets
e6cde9f2a4 Number of filtered out tests in tests summary
Closes #31905
2017-05-11 23:20:09 +03:00
Ariel Ben-Yehuda
b0c80a93e4 remove the #[inline] attribute from drop_in_place
Apparently LLVM has exponential code growth while inlining landing pads
if that attribute is present.

Fixes #41696.
2017-05-11 23:17:11 +03:00
Brian Anderson
084b67f56a Annotate the license exceptions 2017-05-11 19:19:21 +00:00
Nick Cameron
fb7ba4772c Pass crate attributes in visit.rs 2017-05-12 07:15:29 +12:00
Niko Matsakis
2490ee5080 correct various error messages that changed
The new messages seem universally better. I think these result because
we recognize that we are in an invariant context more often.
2017-05-11 14:52:26 -04:00
Niko Matsakis
a4151ff3c4 add a WF obligation if a type variable appears in bivariant position 2017-05-11 14:52:26 -04:00
Niko Matsakis
a950c37394 replace the type generalizer with one based on variance 2017-05-11 14:52:25 -04:00
Martin Glagla
641d05353a Fix typo in size_hint example comment 2017-05-11 20:38:15 +02:00
bors
e40beb3af1 Auto merge of #41913 - nikomatsakis:issue-41849-variance-cycle, r=eddyb
do not fetch variance for items when equating

Fixes #41849. Problem was that evaluating the constant expression
required evaluating a trait, which would equate types, which would
request variance information, which it would then discard. However,
computing the variance information would require determining the type of
a field, which would evaluate the constant expression.

(This problem will potentially arise *later* as we move to more sophisticated
constants, however, where we need to check subtyping. We can tackle that
when we come to it.)

r? @eddyb
2017-05-11 16:56:17 +00:00
Clar Charr
c2c0641444 Add Vec::resize_default. 2017-05-11 12:56:12 -04:00
Jethro Beekman
71de9dbe5b Add test 2017-05-11 09:47:02 -07:00
mandeep
a2a9d1965b Added generic example of std::ops::Add in doc comments
Added blank lines around example

Added comment to Add example referencing the Output type

Removed whitespace from lines 272 and 273

Removed Debug derivation from Add examples

Added Debug derivation
2017-05-11 11:24:20 -05:00
Oliver Schneider
43349e649d Upgrade some comments to doc comments 2017-05-11 16:57:45 +02:00
Niko Matsakis
d22d1feae1 do not fetch variance for items when equating
Fixes #41849. Problem was that evaluating the constant expression
required evaluating a trait, which would equate types, which would
request variance information, which it would then discard. However,
computing the variance information would require determining the type of
a field, which would evaluate the constant expression.

(This problem will potentially arise *later* as we move to more sophisticated
constants, however, where we need to check subtyping. We can tackle that
when we come to it.)
2017-05-11 10:54:19 -04:00
bors
2cc3358e4f Auto merge of #41864 - malbarbo:android-docker, r=alexcrichton
Add disabled android host builders

Introduce the concept of disabled builder. A disabled builder is one that is not run by travis. It is intended to be run by the user who wants a rustc for a tier 2 or 3 platform. Off corse, there is no guarantee that it will work.
2017-05-11 14:05:37 +00:00
Oliver Schneider
644ce5e535 Address PR reviews 2017-05-11 15:26:22 +02:00
bors
fb6f845f33 Auto merge of #41863 - malbarbo:update-android-builder, r=alexcrichton
ci: Update android ndk and sdk

Make install-sdk.sh and install-ndk.sh more generic so future updates can be made directly on Dockerfile. Update ndk to r13b, which will be necessary to make host builds for android (in the future). Update sdk to r25.2.5 (maybe some emulator performance improvement).
2017-05-11 11:27:43 +00:00
bors
24ea08e9b7 Auto merge of #41905 - frewsxcv:rollup, r=frewsxcv
Rollup of 5 pull requests

- Successful merges: #41192, #41724, #41873, #41877, #41889
- Failed merges:
2017-05-11 07:06:58 +00:00
Nick Cameron
67a0d27c65 Ensure we walk the root module of the crate 2017-05-11 17:45:27 +12:00
Tshepang Lekhonkhobe
e42875ce6d doc: break into 2 sentences 2017-05-11 06:27:01 +02:00
Corey Farwell
00f6e3918d Rollup merge of #41889 - est31:master, r=estebank
Remove debug message

It was added by me in #41293. Sorry about that!

Thanks goes to @alexbool for finding it.
2017-05-11 00:21:28 -04:00
Corey Farwell
607320239f Rollup merge of #41877 - eddyb:gdb-force-rust, r=michaelwoerister
compiletest: force GDB to print values in the Rust format.

Based on @nodakai's https://github.com/rust-lang/rust/issues/40557#issuecomment-294368330 and @infinity0's https://github.com/rust-lang/rust/issues/40557#issuecomment-300133591.
Fixes #40557.
2017-05-11 00:21:27 -04:00
Corey Farwell
4ad75b317f Rollup merge of #41873 - michaelwoerister:fix-filemap-hash-lookup, r=nikomatsakis
ICH: Handle case of removed FileMaps.

This PR fixes a bug introduced in #41709 where removing a source file between compilation sessions would cause an ICE:
https://travis-ci.org/rust-icci/crossbeam/jobs/230582234#L633

r? @nikomatsakis
2017-05-11 00:21:26 -04:00
Corey Farwell
183dd9e3c2 Rollup merge of #41724 - achernyak:master, r=nikomatsakis
More Queries for Crate Metadata

This covers a little bit of clean up and the following parts of #41417:
* `fn item_attrs(&self, def_id: DefId) -> Vec<ast::Attribute>;`
* `fn fn_arg_names(&self, did: DefId) -> Vec<ast::Name>;`
* `fn trait_of_item(&self, def_id: DefId) -> Option<DefId>;`
* `fn impl_parent(&self, impl_def_id: DefId) -> Option<DefId>;`
* ` fn is_foreign_item(&self, did: DefId) -> bool;`
* `fn is_exported_symbol(&self, def_id: DefId) -> bool;`

r? @nikomatsakis
2017-05-11 00:21:25 -04:00
Corey Farwell
a00e182053 Rollup merge of #41192 - zackw:eprintln, r=alexcrichton
Add `eprint!` and `eprintln!` macros to the prelude.

These are exactly the same as `print!` and `println!` except that they write to stderr instead of stdout.  Issues #39228 and #40528; previous PR #39229; accepted RFC rust-lang/rfcs#1869; proposed revision to The Book rust-lang/book#615.

I have _not_ revised this any since the original submission; I will do that later this week.  I wanted to get this PR in place since it's been quite a while since the RFC was merged.

Known outstanding review comments:

* [x] @steveklabnik requested a new chapter for the unstable version of The Book -- please see if the proposed revisions to the second edition cover it.
* [x] @nodakai asked if it were possible to merge the internal methods `_print` and `_eprint` - not completely, since they both refer to different internal globals which we don't want to expose, but I will see if some duplication can be factored out.

Please let me know if I missed anything.
2017-05-11 00:21:24 -04:00
bors
1d468400f5 Auto merge of #41900 - nrc:update-rls, r=Mark-Simulacrum
Update RLS

Pulls in crucial dependency updates which fix a serious RLS bug
2017-05-11 04:14:34 +00:00
Nick Cameron
1ffa6b731e Update RLS
Pulls in crucial dependency updates which fix a serious RLS bug
2017-05-11 11:12:28 +12:00
bors
bb8d51c2eb Auto merge of #41862 - GuillaumeGomez:improve-e0477, r=nagisa
Improve E0477 error message

Part of #41816.

r? @nagisa
2017-05-10 21:32:33 +00:00
Zack Weinberg
72588a2b2a Skip print-stdout-eprint-stderr test on emscripten 2017-05-10 15:28:25 -04:00
bors
978d2cfee1 Auto merge of #41887 - steveklabnik:rollup, r=steveklabnik
Rollup of 5 pull requests

- Successful merges: #41531, #41536, #41809, #41854, #41886
- Failed merges:
2017-05-10 17:10:13 +00:00
arthurprs
65d0be3b7b Update jemalloc to 4.5.0 2017-05-10 18:36:24 +02:00
est31
a06f9a66df Remove debug message 2017-05-10 18:20:23 +02:00
Steve Klabnik
19f1146ded Rollup merge of #41886 - RalfJung:unique-doc-typo, r=steveklabnik
fix typo in Unique::empty doc

Subject says it all
2017-05-10 17:18:34 +02:00
Steve Klabnik
42ce11eb5a Rollup merge of #41854 - gamazeps:thread-spawn-doc, r=steveklabnik
[Doc] Improve `thread::spawn` documentation

Part of #29378

- Add two examples to `thread::spawn` doumentation that show common uses of threads.
- Add a link to `thread::Builder` in the `thread::spawn` documentation for configuring threads.
- Add a link to `thread::spawn` in `thread::Builder` in order to avoid documentation duplication.

r? @steveklabnik
2017-05-10 17:18:33 +02:00
Steve Klabnik
ec85859d9a Rollup merge of #41809 - gamazeps:thread-docs, r=steveklabnik
[DOC] Improve the thread::park and thread::unpark documentation

Part of #29378 .

Takes care of the documentation for `park`, `park_duration` and also improves the `unpark` example.

- `park should` have its module documentation inlined here, and cleaned up.
- `park_timeout` could use links to `park`.
2017-05-10 17:18:32 +02:00
Steve Klabnik
a6e1e1fe21 Rollup merge of #41536 - steveklabnik:arc-and-send, r=burntsushi
Improve docs on Arc<T> and Send/Sync

This is something I always forget, so let's actually
explain in the docs.

I didn't fully link up everything here, but I'd like to make sure that the wording is okay before I bother.
2017-05-10 17:18:31 +02:00
Steve Klabnik
2924532232 Rollup merge of #41531 - steveklabnik:gh40159, r=nagisa
Add more ways to create a PathBuf to docs

The best way to do this wasn't in the documentation, and the ways that
were there needed some extra text to elaborate.

Fixes #40159

/cc @nagisa
2017-05-10 17:18:30 +02:00
Ralf Jung
ec141c8c96 fix typo in Unique::empty doc 2017-05-10 17:08:58 +02:00
Oliver Schneider
f859f2585b Update a compile-fail test 2017-05-10 17:05:33 +02:00
Alex Crichton
99f629a931 rustc: Add a new -Z force-unstable-if-unmarked flag
This commit adds a new `-Z` flag to the compiler for use when bootstrapping the
compiler itself. We want to be able to use crates.io crates, but we also want
the usage of such crates to be as ergonomic as possible! To that end compiler
crates are a little tricky in that the crates.io crates are not annotated as
unstable, nor do they expect to pull in unstable dependencies.

To cover all these situations it's intended that the compiler will forever now
bootstrap with `-Z force-unstable-if-unmarked`. This flags serves a dual purpose
of forcing crates.io crates to themselves be unstable while also allowing them
to use other "unstable" crates.io crates. This should mean that adding a
dependency to compiler no longer requires upstream modification with
unstable/staged_api attributes for inclusion!
2017-05-10 07:42:26 -07:00
Zack Weinberg
4ab3bcb9ca Fix up stability annotations per feedback. 2017-05-10 09:52:16 -04:00
Zack Weinberg
07766f675c Revise the eprint(ln)! feature.
* Factor out the nigh-identical bodies of `_print` and `_eprint` to a helper
   function `print_to` (I was sorely tempted to call it `_doprnt`).
 * Update the issue number for the unstable `eprint` feature.
 * Add entries to the "unstable book" for `eprint` and `eprint_internal`.
 * Style corrections to the documentation.
2017-05-10 09:41:42 -04:00
Zack Weinberg
76127275a0 Add eprint! and eprintln! macros to the prelude.
These are exactly the same as `print!` and `println!` except that
they write to stderr instead of stdout.  Issue #39228.
2017-05-10 09:29:16 -04:00
Oliver Schneider
9d51d6bc30 Fix tidy issues 2017-05-10 13:58:41 +02:00
Eduard-Mihai Burtescu
d23a65077a compiletest: force GDB to print values in the Rust format. 2017-05-10 14:37:29 +03:00
bors
25a161765f Auto merge of #41815 - Yamakaky:improve-backtrace-bottom, r=alexcrichton
Improve cleaning of the bottom of the backtrace

Following https://github.com/rust-lang/rust/pull/40264. It only cleans the bottom of the trace (after the main). It handles correctly the normal main, tests, benchmarks and threads.

I kept `skipped_before` since it will be used later for the cleaning of the top.
2017-05-10 11:37:22 +00:00
Oliver Schneider
e2f781c7ea
Example usage of multiple suggestions 2017-05-10 13:20:27 +02:00
Oliver Schneider
67d762d896
Refactor suggestion diagnostic API to allow for multiple suggestions 2017-05-10 13:20:26 +02:00
Michael Woerister
84a40c1443 ICH: Handle case of removed FileMaps. 2017-05-10 12:35:36 +02:00
bors
2b97174ada Auto merge of #41764 - scottmcm:faster-reverse, r=brson
Make [u8]::reverse() 5x faster

Since LLVM doesn't vectorize the loop for us, do unaligned reads of a larger type and use LLVM's bswap intrinsic to do the reversing of the actual bytes.  cfg!-restricted to x86 and x86_64, as I assume it wouldn't help on things like ARMv5.

Also makes [u16]::reverse() a more modest 1.5x faster by loading/storing u32 and swapping the u16s with ROT16.

Thank you ptr::*_unaligned for making this easy :)

Benchmark results (from my i5-2500K):
```text
# Before
test slice::reverse_u8      ... bench:  273,836 ns/iter (+/- 15,592) =  3829 MB/s
test slice::reverse_u16     ... bench:  139,793 ns/iter (+/- 17,748) =  7500 MB/s
test slice::reverse_u32     ... bench:   74,997 ns/iter  (+/- 5,130) = 13981 MB/s
test slice::reverse_u64     ... bench:   47,452 ns/iter  (+/- 2,213) = 22097 MB/s

# After
test slice::reverse_u8      ... bench:   52,170 ns/iter (+/- 3,962) = 20099 MB/s
test slice::reverse_u16     ... bench:   93,330 ns/iter (+/- 4,412) = 11235 MB/s
test slice::reverse_u32     ... bench:   74,731 ns/iter (+/- 1,425) = 14031 MB/s
test slice::reverse_u64     ... bench:   47,556 ns/iter (+/- 3,025) = 22049 MB/s
```

If you're curious about the assembly, instead of doing this
```
movzx	eax, byte ptr [rdi]
movzx	ecx, byte ptr [rsi]
mov	byte ptr [rdi], cl
mov	byte ptr [rsi], al
```
it does this
```
mov	rax, qword ptr [rdx]
mov	rbx, qword ptr [r11 + rcx - 8]
bswap	rbx
mov	qword ptr [rdx], rbx
bswap	rax
mov	qword ptr [r11 + rcx - 8], rax
```
2017-05-10 08:54:50 +00:00