Commit Graph

76534 Commits

Author SHA1 Message Date
bors
cb1f89864e Auto merge of #49418 - frewsxcv:frewsxcv-network-order, r=TimNN
Clarify network byte order conversions for integer / IP address conversions.

Opened primarily to address https://github.com/rust-lang/rust/issues/48819.

Also added a few other conversion docs/examples.
2018-04-01 10:09:58 +00:00
bors
85f0098405 Auto merge of #49545 - alexcrichton:proc-macro-fixes, r=eddyb
proc_macro: Tweak doc comments and negative literals

This commit tweaks the tokenization of a doc comment to use `#[doc = "..."]`
like `macro_rules!` does (instead of treating it as a `Literal` token).
Additionally it fixes treatment of negative literals in the compiler, for
exapmle `Literal::i32(-1)`. The current fix is a bit of a hack around the
current compiler implementation, providing a fix at the proc-macro layer rather
than the libsyntax layer.

Closes #48889
2018-04-01 07:22:28 +00:00
bors
804d8c88d9 Auto merge of #49530 - petrhosek:empty-extra-flags, r=cramertj
Only include space in RUSTFLAGS extra flags if not empty

When the RUSTFLAGS_STAGE_{1,2} is not set, including a space means
the string will always be non-empty and RUSTFLAGS will be always be
reset which breaks other ways of setting these such as through config
in CARGO_HOME.
2018-04-01 05:09:48 +00:00
bors
9ceaa5676b Auto merge of #49522 - mbrubeck:fs_read, r=SimonSapin
Rename fs::read_string to read_to_string and stabilize

As approved in https://github.com/rust-lang/rust/issues/46588#issuecomment-377530365

Closes #46588.
2018-04-01 02:44:45 +00:00
Phlosioneer
7a63900f42 Unignore borrowck test
Unignores a test that has been fixed.

See #44831
2018-03-31 20:35:11 -04:00
bors
2b49944006 Auto merge of #49527 - petrhosek:fast-submodules, r=alexcrichton
Handle fast-submodules option correctly

This option was introduced in 72cb109bec, but it uses two different
spellings (`fast-submodule` in `bootstrap.py` vs `fast-submodules` in
`config.toml.example`) and isn't handled by Rust bootstrap which means
that any attempt to set this flag fails.
2018-04-01 00:22:45 +00:00
Alex Crichton
ec1a8f081f proc_macro: Tweak doc comments and negative literals
This commit tweaks the tokenization of a doc comment to use `#[doc = "..."]`
like `macro_rules!` does (instead of treating it as a `Literal` token).
Additionally it fixes treatment of negative literals in the compiler, for
exapmle `Literal::i32(-1)`. The current fix is a bit of a hack around the
current compiler implementation, providing a fix at the proc-macro layer rather
than the libsyntax layer.
2018-03-31 14:16:05 -07:00
varkor
44ad8fd136 Shorten deprecation note 2018-03-31 21:44:12 +01:00
Phlosioneer
cb3097567f Add ignore reason 2018-03-31 16:23:50 -04:00
Phlosioneer
42bc0712f1 Remove whitespace 2018-03-31 16:08:58 -04:00
bors
517f24025a Auto merge of #49521 - mbrubeck:fs_read_write_bytes, r=TimNN
fs_read_write_bytes stabilized in 1.26.0

Fix the stabilization attributes from #49422 because it merged before 1.26 branched to beta.

r? @TimNN
2018-03-31 17:58:50 +00:00
nabijaczleweli
e1d3c471d7
Open the file as write before trying to flush it
This should be enough and shouldn't require append(true) since we're not
explicitly writing anything so we're not flushing it so we've no risk of
overwriting it
2018-03-31 19:12:29 +02:00
bors
e38eca6cac Auto merge of #49501 - sfackler:unix-epoch-assoc-const, r=alexcrichton
Make UNIX_EPOCH an associated constant of SystemTime

It's not very discoverable as a separate const in the module.

r? @alexcrichton
2018-03-31 15:33:28 +00:00
bors
70248b1fcf Auto merge of #49500 - oli-obk:mir_dep_graph, r=michaelwoerister
Introduce an edge from a const eval to the MIR of all statics it depends on

r? @michaelwoerister
2018-03-31 12:50:13 +00:00
bors
8dd24c8ed4 Auto merge of #49481 - SimonSapin:core-heap, r=alexcrichton
Move the alloc::allocator module to core::heap

This is the `Alloc` trait and its dependencies.
2018-03-31 09:11:21 +00:00
bors
085c4b43b5 Auto merge of #49201 - Phlosioneer:add-trivial-size-hints, r=SimonSapin
Implement some trivial size_hints for various iterators

This also implements ExactSizeIterator where applicable.

Addresses most of the Iterator traits mentioned in #23708.

I intend to do more, but I don't want to make the PR too large.
2018-03-31 06:40:56 +00:00
Scott McMurray
fb7deda274 Add #[must_use] to a few standard library methods
Chosen to start a precedent of using it on ones that are potentially-expensive and where using it for side effects is particularly discouraged.

Discuss :)
2018-03-30 23:06:05 -07:00
Phlosioneer
48e3c961eb Fix tidy trailing newlines 2018-03-31 01:26:02 -04:00
Phlosioneer
5057e3c9e1 Commit code for option size hint 2018-03-31 01:13:02 -04:00
Phlosioneer
fa1d125ae6 Add test for rustdoc ignore test
This will check for regression on issue #32556
2018-03-31 00:59:08 -04:00
bors
3c5f850958 Auto merge of #49472 - nikomatsakis:nll-optimize-constraint-prop-1, r=pnkfelix
optimize NLL constraint propagation a little

Removes a bone-headed hot spot in NLL constant propagation; we were re-allocating the stack vector and hashmap as we repeated the DFS. This change shares those resources across each call.

It also modifies the constraint list to be a linked list; arguably I should revert that, though, as this didn't turn out to be a perf hit and perhaps the old code was clearer? (Still, the new style appeals to me.)

r? @pnkfelix
2018-03-31 04:09:43 +00:00
Petr Hosek
c6bae16dc2 Only include space in RUSTFLAGS extra flags if not empty
When the RUSTFLAGS_STAGE_{1,2} is not set, including a space means
the string will always be non-empty and RUSTFLAGS will be always be
reset which breaks other ways of setting these such as through config
in CARGO_HOME.
2018-03-30 19:37:08 -07:00
bors
1c5283b472 Auto merge of #49459 - GuillaumeGomez:primitive-intra-links, r=QuietMisdreavus
Add primitive intra-links

Part of #43466.

r? @QuietMisdreavus
2018-03-31 01:34:15 +00:00
Petr Hosek
a24811e15a Handle fast-submodules option correctly
This option was introduced in 72cb109bec, but it uses two different
spellings (fast-submodule vs fast-submodules) and isn't handled by
Rust bootstrap which means that any attempt to set this flag fails.
2018-03-30 16:42:57 -07:00
bors
80785a547d Auto merge of #49324 - SimonSapin:unsigned, r=alexcrichton
Deprecate signed std::num::NonZeroI* with a call for use cases

CC https://github.com/rust-lang/rust/issues/49137#issuecomment-375823481
2018-03-30 19:11:15 +00:00
Matt Brubeck
6b7627f8c9 Rename fs::read_string to read_to_string and stabilize 2018-03-30 10:20:58 -07:00
Matt Brubeck
504916c18b fs_read_write_bytes stabilized in 1.26.0 2018-03-30 10:07:40 -07:00
bors
f1c21b0e67 Auto merge of #49518 - SimonSapin:prelude, r=alexcrichton
Revert "Add TryFrom and TryInto to the prelude"

This reverts commit 09008cc23f.

This addition landed in https://github.com/rust-lang/rust/pull/49305 and turned out to break crates that had their own copy of `TryFrom` in order to use it on the Stable channel :(

We’ll explore the possibility of the 2018 edition having a different prelude that includes this traits. However per the editions RFC this requires implementing a warning in the 2015 edition for code that *would* break.
2018-03-30 16:44:15 +00:00
Simon Sapin
cea018f290 Deprecate signed std::num::NonZeroI* with a call for use cases 2018-03-30 18:13:05 +02:00
Guillaume Gomez
d0eeb291dd Add support for variant and types fields for intra links 2018-03-30 16:22:57 +02:00
bors
a6f1c6a3ee Auto merge of #49425 - alexcrichton:disallow-inline-always, r=petrochenkov
rustc: Forbid #[inline(always)] with #[target_feature]

Once a target feature is enabled for a function that means that it in general
can't be inlined into other functions which don't have that target feature
enabled. This can cause both safety and LLVM issues if we were to actually
inline it, so `#[inline(always)]` both can't be respected and would be an error
if we did so!

Today LLVM doesn't inline functions with different `#[target_feature]`
annotations, but it turns out that if one is tagged with `#[inline(always)]`
it'll override this and cause scary LLVM error to arise!

This commit fixes this issue by forbidding these two attributes to be used in
conjunction with one another.

Closes rust-lang-nursery/stdsimd#404
2018-03-30 14:11:35 +00:00
Guillaume Gomez
adaaeeaee3 Add missing anchor for union type fields 2018-03-30 16:10:16 +02:00
Simon Sapin
ba4f310e3f Revert "Add TryFrom and TryInto to the prelude"
This reverts commit 09008cc23f.
2018-03-30 15:54:05 +02:00
Guillaume Gomez
7fdee5deb9 fix targetted value background 2018-03-30 15:43:22 +02:00
Steven Fackler
df2e238d1a Fix doctest 2018-03-30 15:35:36 +02:00
Oliver Schneider
8107b5606d
Add an explanation for the create_depgraph_edges 2018-03-30 13:57:11 +02:00
bors
4379c86fe7 Auto merge of #49403 - oli-obk:try2, r=eddyb
Trim discriminants to their final type size

r? @eddyb

fixes  #49181
2018-03-30 11:48:10 +00:00
Steven Fackler
dfde231eca Make UNIX_EPOCH an associated constant of SystemTime
It's not very discoverable as a separate const in the module.
2018-03-30 12:44:32 +02:00
Oliver Schneider
70c10f1f14
Introduce an edge from a const eval to the MIR of all statics it depends on 2018-03-30 12:31:48 +02:00
Andre Bogus
0f5e419163 Add a generic CAS loop to std::sync::Atomic*
This adds a new method to all numeric `Atomic*` types with a
safe compare-and-set loop, so users will no longer need to write
their own, except in *very* strange circumstances.

This solves #48384 with `x.fetch_max(_)`/`x.fetch_min(_)`. It
also relates to #48655 (which I misuse as tracking issue for now).

*note* This *might* need a crater run because the functions could
clash with third party extension traits.
2018-03-30 12:27:14 +02:00
bors
051050dab9 Auto merge of #49424 - oli-obk:stable_allocid_hash, r=michaelwoerister
Fix stable hashing of AllocIds

r? @michaelwoerister

fixes #49081
2018-03-30 09:11:08 +00:00
Manish Goregaokar
6a5bf5e180 Bump lockfile 2018-03-30 11:08:58 +02:00
Manish Goregaokar
559e0180a3 Update clippy 2018-03-30 11:08:06 +02:00
scalexm
71dc1626bd Tweak Clause definition and HRTBs 2018-03-30 10:29:01 +02:00
bors
696076144d Auto merge of #49422 - mbrubeck:fs_read, r=TimNN
Stabilize fs::read and fs::write

As discussed in https://github.com/rust-lang/rust/issues/46588#issuecomment-373956283
2018-03-30 06:49:33 +00:00
bors
d8a1bc73f7 Auto merge of #49489 - kennytm:rollup, r=kennytm
Rollup of 10 pull requests

- Successful merges: #49443, #49445, #49446, #49463, #49464, #49466, #49468, #49473, #49484, #49486
- Failed merges:
2018-03-30 04:17:05 +00:00
bors
15e8c5d846 Auto merge of #49412 - GuillaumeGomez:hide-type-decl, r=QuietMisdreavus
Hide type declarations by default

I'm not very happy for the moment about the rendering but the bases are here:

<img width="610" alt="screen shot 2018-03-27 at 11 56 27" src="https://user-images.githubusercontent.com/3050060/37960492-0e045954-31b6-11e8-9cea-1ef8a3f980c4.png">

r? @QuietMisdreavus
2018-03-30 01:45:54 +00:00
kennytm
67e0c2b529
Rollup merge of #49486 - oconnor663:releases_typo, r=steveklabnik
correct a typo in RELEASES.md
2018-03-30 01:31:20 +02:00
kennytm
f1642f898c
Rollup merge of #49484 - cuviper:ignore-ibm-stack-probes, r=alexcrichton
Ignore stack-probes tests on powerpc/s390x too

We only support stack probes on x86 and x86_64.
Other arches are already ignored.
2018-03-30 01:31:19 +02:00
kennytm
801deaeea2
Rollup merge of #49473 - joshtriplett:nonnull-size, r=steveklabnik
src/libcore/ptr.rs: Fix documentation for size of `Option<NonNull<T>>`

Seems more useful to say that it has the same size as `*mut T`.
2018-03-30 01:31:18 +02:00