Commit Graph

75110 Commits

Author SHA1 Message Date
David Alber
ca1c91bc65 Synchronizing with code of conduct in rust-www
This is propagated from rust-lang/rust-www#1062.
2018-03-07 08:58:57 -08:00
bors
4cdbac639a Auto merge of #48642 - alexcrichton:compile-cargo-once, r=michaelwoerister
Update env_logger to 0.5.4

It looks like this cuts down on the number of dependencies in env_logger and
notably cuts out a difference between a shared dependency of rls/cargo. My goal
here is to ensure that when we compile the RLS/Cargo on CI we only compile Cargo
once, and this is one step towards that!
2018-03-06 22:40:15 +00:00
Alex Crichton
87f3dda514 Update env_logger to 0.5.4
It looks like this cuts down on the number of dependencies in env_logger and
notably cuts out a difference between a shared dependency of rls/cargo. My goal
here is to ensure that when we compile the RLS/Cargo on CI we only compile Cargo
once, and this is one step towards that!
2018-03-06 12:37:28 -08:00
bors
2789b067da Auto merge of #48768 - kennytm:rollup, r=kennytm
Rollup of 14 pull requests

- Successful merges: #48403, #48432, #48546, #48573, #48590, #48657, #48727, #48732, #48753, #48754, #48761, #48474, #48507, #47463
- Failed merges:
2018-03-06 15:01:21 +00:00
kennytm
8e3493d459
Rollup merge of #47463 - bluss:fused-iterator, r=alexcrichton
Stabilize FusedIterator

FusedIterator is a marker trait that promises that the implementing
iterator continues to return `None` from `.next()` once it has returned
`None` once (and/or `.next_back()`, if implemented).

The effects of FusedIterator are already widely available through
`.fuse()`, but with stable `FusedIterator`, stable Rust users can
implement this trait for their iterators when appropriate.

Closes #35602
2018-03-06 20:52:37 +08:00
kennytm
ebc6d6e24f
Rollup merge of #48507 - GuillaumeGomez:cstr-note, r=steveklabnik
Add new warning for CStr::from_ptr

Fixes #48401.
2018-03-06 20:52:36 +08:00
kennytm
ee9425214b
Rollup merge of #48474 - christianpoveda:new_cell_docs, r=steveklabnik
New Cell docs

This fixes https://github.com/rust-lang/rust/issues/44061
2018-03-06 20:52:35 +08:00
kennytm
fa374f91a1
Rollup merge of #48761 - frewsxcv:frewsxcv-rm-python, r=alexcrichton
Remove seemingly unused sugarise-doc-comments Python script.

This Python script converts documentation comments from the
`#[doc = "..."]` attribute to the `///` syntax. It was added six
years ago, presumably to help with the transition when `///` was
implemented and hasn't really been touched since. I don't think there's
much value in keeping it around at this point.
2018-03-06 20:52:34 +08:00
kennytm
b691c521bb
Rollup merge of #48754 - leodasvacas:while-let-all-the-things, r=rkruppe
while let all the things
2018-03-06 20:52:32 +08:00
kennytm
7dc3f17ef9
Rollup merge of #48753 - tbu-:pr_hashmap_isize, r=BurntSushi
Remove a couple of `isize` references from hashmap docs

Also fix a spelling mistake.
2018-03-06 20:52:31 +08:00
kennytm
178b2c4b48
Rollup merge of #48732 - debris:remove_powerpc64, r=alexcrichton
Remove useless powerpc64 entry from ARCH_TABLE

Hope, I understood the scope of the fix correctly. closes #47737
2018-03-06 20:52:30 +08:00
kennytm
57cfbeaf64
Rollup merge of #48727 - leodasvacas:refactor-contrived-match, r=rkruppe
Refactor contrived match.
2018-03-06 20:52:29 +08:00
kennytm
46d629a1d7
Rollup merge of #48657 - sinkuu:opt_str_repeat, r=dtolnay
Optimize str::repeat

Improves the performance of `str::repeat` by bulk copying. Here is the benchmarks of `"abcde".repeat(n)`:

|`n`|old [ns/iter]|new [ns/iter]|diff [%]|
---|---|---|---
|1|27.205|27.421|+0.794|
|2|27.500|27.516|+0.0581|
|3|27.923|27.648|-0.985|
|4|31.206|30.145|-3.40|
|5|35.144|31.861|-9.34|
|7|43.131|34.621|-19.7|
|10|54.945|36.203|-34.1|
|100|428.31|52.895|-87.7|
2018-03-06 20:52:28 +08:00
bors
b977e044a7 Auto merge of #48611 - michaelwoerister:share-generics2, r=alexcrichton
Don't recompute SymbolExportLevel for upstream crates.

The data collected in #48373 suggests that we can avoid generating up to 30% of the LLVM definitions by only instantiating function monomorphizations once with a given crate graph. Some more data, collected with a [proof-of-concept implementation](https://github.com/michaelwoerister/rust/commits/share-generics) of re-using monomorphizations, which is less efficient than the MIR-only RLIB approach, suggests that it's still around 25% LLVM definitions that we can save.

So far, this PR only cleans up handling of symbol export status. Too early to review still.
2018-03-06 11:52:16 +00:00
Michael Woerister
f5ab4d4cdd Don't show crate metadata symbol as exported symbol to downstream crates. 2018-03-06 09:58:47 +01:00
Michael Woerister
9f6d554638 Fix export level of plugin and procmacro registrars. 2018-03-06 09:58:47 +01:00
Michael Woerister
8bc005c8bb Don't recompute SymbolExportLevel for upstream crates. 2018-03-06 09:58:47 +01:00
Michael Woerister
aec6c85b0c Compute symbol names more lazily. 2018-03-06 09:47:43 +01:00
Michael Woerister
33d5da1ee4 Clean up handling of symbol export information. 2018-03-06 09:47:43 +01:00
Michael Woerister
e5ee01143b Rename exported_symbol_ids query to something more explicit and document what it is doing. 2018-03-06 09:47:43 +01:00
kennytm
6b8984dfc8
Rollup merge of #48590 - tshepang:more-simple, r=frewsxcv
doc: no need for the reference

Also, we are well within line length limit
2018-03-06 16:25:33 +08:00
kennytm
fe77f5d764
Rollup merge of #48573 - Amanieu:bitreverse2, r=sfackler
Add functions for reversing the bit pattern in an integer

I'm reviving PR #32798 now that the LLVM issues have been resolved.

> This adds the bitreverse intrinsic and adds a reverse_bits function to all integer types.
2018-03-06 16:25:32 +08:00
kennytm
e3451f8cd7
Rollup merge of #48546 - GuillaumeGomez:raw-string-error-note, r=estebank
Raw string error note

Fixes #48395.

I think this note should be helpful enough to solve the issue.
2018-03-06 16:25:31 +08:00
kennytm
813ac2c36b
Rollup merge of #48432 - flip1995:lit_diag, r=oli-obk
Suggest type for overflowing bin/hex-literals

Fixes #48073

For hexadecimal and binary literals, which overflow, it gives an additional note to the warning message, like in this [comment](https://github.com/rust-lang/rust/issues/48073#issuecomment-365370113).

Additionally it will suggest a type (`X < Y`):
- `iX`: if literal fits in `uX` => `uX`, else => `iY`
- `-iX` => `iY`
- `uX` => `uY`

Exceptions: `isize`, `usize`. I don't think you can make a good suggestion here. The programmer has to figure it out on it's own in this case.

r? @oli-obk
2018-03-06 16:25:30 +08:00
kennytm
43de95ca5b
Rollup merge of #48403 - lukaslueg:casted, r=steveklabnik
Fix spelling s/casted/cast/

r? @GuillaumeGomez
2018-03-06 16:25:28 +08:00
bors
6f2100b92c Auto merge of #48509 - Phlosioneer:option-doc-change, r=TimNN
Slight modification to the as_ref example of std::option::Option

A user in a reddit thread was confused by the name of the variable
"num_as_int"; they thought the example was trying to convert the
string "10" as if it were binary 2 by calling str::len(). In reality,
the example is simply demonstrating how to take an immutable reference
to the value of an Option. The confusion comes from the coincidence
that the length of the string "10" is also its binary representation,
and the implication from the variable names that a conversion was
occuring ("num_as_str" to "num_as_int").

This PR changes the example number to 12 instead of 10, and changes
the variable name from "num_as_int" to "num_length" to better
communicate what the example is doing.

The reddit thread:
https://www.reddit.com/r/rust/comments/7zpvev/notyetawesome_rust_what_use_cases_would_you_like/dur39xw/
2018-03-06 06:14:11 +00:00
Amanieu d'Antras
88aec91017 Add i128 tests for intrinsics 2018-03-06 03:31:56 +00:00
Amanieu d'Antras
24fb4b7669 Add reverse_bits to integer types 2018-03-06 03:31:53 +00:00
Corey Farwell
2ec47e07ee Remove seemingly unused sugarise-doc-comments Python script.
This Python script converts documentation comments from the
`#[doc = "..."]` attribute to the `///` syntax. It was added six
years ago, presumably to help with the transition when `///` was
implemented and hasn't really been touched since. I don't think there's
much value in keeping it around at this point.
2018-03-05 20:27:02 -05:00
bors
1733a61141 Auto merge of #48456 - mark-i-m:whitelist, r=alexcrichton
Whitelist rustc dependencies

As per https://internals.rust-lang.org/t/rustc-dependency-policy/6537/8?u=nikomatsakis

cc @alexcrichton @nikomatsakis
2018-03-06 00:44:21 +00:00
Who? Me?!
e5d292013b Add ena to whitelist 2018-03-05 14:43:44 -06:00
Who? Me?!
1423da8b9a Uncomment whitelist 2018-03-05 14:43:44 -06:00
Mark Mansi
bb01f3126d Do check the deps of path deps 2018-03-05 14:43:44 -06:00
Mark Mansi
6180a3f7da enable whitelist 2018-03-05 14:43:44 -06:00
Mark Mansi
1fca9e0430 Don't check in-tree deps 2018-03-05 14:43:44 -06:00
Mark Mansi
18f0533c4c different versions may have different deps 2018-03-05 14:43:44 -06:00
Mark Mansi
0fc5daebfb Add a few missing deps 2018-03-05 14:43:44 -06:00
Mark Mansi
489f2f1206 Remove spurious whitespace 2018-03-05 14:43:44 -06:00
Mark Mansi
f89abd63ca uncomment whitelist 2018-03-05 14:43:44 -06:00
Mark Mansi
e3a374ac7d Fix alexcrichton's comments 2018-03-05 14:43:44 -06:00
Mark Mansi
50876d1ca4 Only check the whitelist for some crates 2018-03-05 14:43:44 -06:00
Mark Mansi
b9b1c378c5 Get the path to cargo from rustbuild 2018-03-05 14:43:44 -06:00
Mark Mansi
6e016c587f Trying to get paths right... 2018-03-05 14:43:44 -06:00
Mark Mansi
3570b9df6a MAKE IT FAILgit statusgit status 2018-03-05 14:43:44 -06:00
Mark Mansi
d62621839a Comments 2018-03-05 14:43:44 -06:00
Mark Mansi
3ee410498d Start adding a whitelist for rustc dependencies 2018-03-05 14:43:44 -06:00
Mark Mansi
2cb8c5fff6 Run rustfmt on tidy/src/deps.rs 2018-03-05 14:43:44 -06:00
leonardo.yvens
2e7e68b762 while let all the things 2018-03-05 15:58:54 -03:00
bors
c9334404f0 Auto merge of #48208 - michaelwoerister:track-features, r=petrochenkov
Turn feature-gate table into a query so it is covered by dependency tracking.

Turn access to feature gates into a query so we handle them correctly during incremental compilation.

Features are still available via `Session` through `features_untracked()`. I wish we had a better way of hiding untracked information. It would be great if we could remove the `sess` field from `TyCtxt`.

Fixes #47003.
2018-03-05 18:39:40 +00:00
Tobias Bucher
88f32d15af Remove a couple of isize references from hashmap docs
Also fix a spelling mistake.
2018-03-05 18:37:05 +01:00