Commit graph

90752 commits

Author SHA1 Message Date
ljedrz
47dc349491 adjust intravisit HirIdification 2019-02-20 11:00:43 +01:00
ljedrz
f5bba2c6d7 HirIdification: change some NodeId to HirId calls 2019-02-20 11:00:43 +01:00
ljedrz
36fffa8196 hir: remove parent_node from NodeCollector 2019-02-20 11:00:43 +01:00
ljedrz
56bf2c6316 hir: change HirIdValidator.hir_ids_seen to a set 2019-02-20 11:00:43 +01:00
ljedrz
4a4e5f3897 hir: add and use hir_to_node_id in NodeCollector 2019-02-20 11:00:43 +01:00
ljedrz
6536dbb640 hir: HirId-ify intravisit 2019-02-20 11:00:43 +01:00
Ralf Jung
c52560d788 tweaks 2019-02-20 09:45:28 +01:00
Aleksey Kladov
65622e319e cleanup macro after 2018 transition
We can now use `?`
2019-02-20 10:10:11 +03:00
Aleksey Kladov
abb07c42ec remove a bit of dead code 2019-02-20 09:49:52 +03:00
Paul Dicker
f411852add Refactor Windows stdio and remove stdin double buffering 2019-02-20 06:37:30 +01:00
Paul Dicker
cc20ed678e Remove unused Read implementation on sys::Windows::Stdin 2019-02-20 06:37:30 +01:00
Paul Dicker
06511573f2 Remove sys::*::Stderr Write implementation 2019-02-20 06:37:30 +01:00
kennytm
a1a17f5c66
Rollup merge of #58044 - Lokathor:lokathor, r=alexcrichton
Make overflowing and wrapping negation const

Remember that the signed and unsigned versions are slightly different here, so there's four functions made const instead of just two.
2019-02-20 12:01:58 +08:00
kennytm
8ca56e1e02
Rollup merge of #58576 - SimonSapin:successors, r=Centril
Stabilize iter::successors and iter::from_fn

FCP: https://github.com/rust-lang/rust/issues/58045#issuecomment-464674773, https://github.com/rust-lang/rust/issues/55977#issuecomment-463964234
2019-02-20 11:59:26 +08:00
kennytm
95daca4aaf
Rollup merge of #58569 - kenta7777:reduce-code-repetition, r=oli-obk
Reduce Some Code Repetitions like `(n << amt) >> amt`

This Pull Request is related to [#49937](https://github.com/rust-lang/rust/issues/49937).
This Pull Request has reduced repetition of `(n << amt) >> amt`.
2019-02-20 11:59:23 +08:00
kennytm
2f9fa199d2
Rollup merge of #58568 - benjaminp:driver-trans, r=wesleywiser
Fix a transposition in driver.rs.
2019-02-20 11:59:20 +08:00
kennytm
09c85a1d22
Rollup merge of #58565 - thomaseizinger:typo-future-docs, r=frewsxcv
Fix typo in std::future::Future docs

I am not quite sure if this is actually a typo but

1. to me the sentence doesn't make sense if it says "expect"
2. I hope that `Future`s are not really allowed to cause memory unsafety if they are polled after completion.
2019-02-20 11:59:17 +08:00
kennytm
6e991011dc
Rollup merge of #58562 - dlrobertson:fix_nits, r=alexreg
Fix style nits

Fix style nits discovered in reading code.

r? @alexreg
2019-02-20 11:59:13 +08:00
kennytm
e3a8f7db47
Rollup merge of #58553 - scottmcm:more-ihle, r=Centril
Use more impl header lifetime elision

Inspired by seeing explicit lifetimes on these two:

- https://doc.rust-lang.org/nightly/std/slice/struct.Iter.html#impl-FusedIterator
- https://doc.rust-lang.org/nightly/std/primitive.u32.html#impl-Not

And a follow-up to https://github.com/rust-lang/rust/pull/54687, that started using IHLE in libcore.

Most of the changes in here fall into two big categories:

- Removing lifetimes from common traits that can essentially never user a lifetime from an input (particularly `Drop`, `Debug`, and `Clone`)

- Forwarding impls that are only possible because the lifetime doesn't matter (like `impl<R: Read + ?Sized> Read for &mut R`)

I omitted things that seemed like they could be more controversial, like the handful of iterators that have a `Item: 'static` despite the iterator having a lifetime or the `PartialEq` implementations [where the flipped one cannot elide the lifetime](https://internals.rust-lang.org/t/impl-type-parameter-aliases/9403/2?u=scottmcm).

I also removed two lifetimes that turned out to be completely unused; see https://github.com/rust-lang/rust/issues/41960#issuecomment-464557423
2019-02-20 11:59:10 +08:00
kennytm
ef0aaddf69
Rollup merge of #58551 - ssomers:master, r=oli-obk
Explain a panic in test case net::tcp::tests::double_bind

Those who try to build libstd on the Windows Subsystem for Linux experience a single failing test, where the point of failure is an explicit but anonymous panic, as reported in https://github.com/rust-lang/rust/issues/49367
This commit somewhat explains why and allows diagnosing a little.
2019-02-20 11:59:07 +08:00
kennytm
8368638515
Rollup merge of #58546 - taiki-e:librustc_codegen_llvm-2018, r=Centril
librustc_codegen_llvm => 2018

Transitions `librustc_codegen_llvm` to Rust 2018; cc #58099

r? @Centril
2019-02-20 11:59:04 +08:00
kennytm
fd18e3f35e
Rollup merge of #58545 - emlai:regression-test-for-39448, r=Centril
Add regression test for a specialization-related ICE (#39448)

Closes #39448.

This is my first time contributing, I hope I got everything right. :)
2019-02-20 11:59:02 +08:00
kennytm
717aa46178
Rollup merge of #58544 - TheBiggerGuy:rustc-doc-cli-args, r=TimNN
Fix doc for rustc "-g" flag

The rustc `-g` CLI flag was miss documented to be a synonym of `-C debug-level=2` and not `-C debuglevel=2`. Also add links to the codegen docs for each synonym.

I am unsure of this will conflict with work on #52938
2019-02-20 11:58:58 +08:00
kennytm
c965858e20
Rollup merge of #58539 - aaronstillwell:master, r=Mark-Simulacrum
Add alias methods to PathBuf for underlying OsString (#58234)

Implemented the following methods on PathBuf which forward to the underlying OsString.

- capacity
- with_capacity
- clear
- reserve
- reserve_exact
- shrink_to_fit
- shrink_to

These methods have been documented with reference to the original docs for `OsString`. @Mark-Simulacrum please let me know if you feel this does not suffice.

Further, I've not yet included tests for these definitions - please advise on how comprehensive tests need to be for methods such as these that simply alias other (already tested) methods.

(This PR addresses issue #58234)
2019-02-20 11:58:55 +08:00
kennytm
a68a1c758d
Rollup merge of #58538 - GuillaumeGomez:fmt-examples, r=Centril
Add missing fmt structs examples

r? @rust-lang/docs
2019-02-20 11:58:52 +08:00
kennytm
943fe1ee2c
Rollup merge of #58536 - xfix:remove-ub-in-pointer-tests, r=RalfJung
Remove UB in pointer tests

UB found by Miri.
2019-02-20 11:58:48 +08:00
kennytm
51445830d2
Rollup merge of #58534 - dwijnand:mention-capping-forbid-lints, r=oli-obk
Mention capping forbid lints

I felt the description of forbid was misleading/incomplete without
mentioning how --cap-lints interacts with it.
2019-02-20 11:58:45 +08:00
kennytm
7ef11d4f84
Rollup merge of #58530 - scottmcm:monomorphize-less, r=TimNN
Monomorphize less code in fs::{read|write}

Since the generic-ness is only for the as_refs, might as well have std just compile the important part once instead of on every use.
2019-02-20 11:58:42 +08:00
kennytm
e95297ca15
Rollup merge of #58528 - Zoxc:stmtkind-item, r=oli-obk
Don't use an allocation for ItemId in StmtKind
2019-02-20 11:58:38 +08:00
kennytm
897778ec28
Rollup merge of #58456 - lzutao:nll, r=Centril
Remove no longer accurate diagnostic code about NLL

r? @steveklabnik
2019-02-20 11:58:35 +08:00
kennytm
8d1e4323b3
Rollup merge of #58409 - euclio:impl-trait-wrapping, r=QuietMisdreavus
rustdoc: respect alternate flag when formatting impl trait

Fixes #58226.

Before:
<img width="963" alt="screen shot 2019-02-12 at 3 23 30 pm" src="https://user-images.githubusercontent.com/1372438/52665732-4496ea00-2eda-11e9-9e29-efffe43b2abf.png">

After:
<img width="964" alt="screen shot 2019-02-12 at 3 23 51 pm" src="https://user-images.githubusercontent.com/1372438/52665733-452f8080-2eda-11e9-999a-dd1fb28dee16.png">
2019-02-20 11:58:31 +08:00
kennytm
98a6e720d0
Rollup merge of #58392 - scottmcm:less-shifting-in-net-ip, r=oli-obk
Use less explicit shifting in std::net::ip

Now that we have `{to|from}_be_bytes` the code can be simpler.

(Inspired by PR #57740)
2019-02-20 11:58:26 +08:00
kennytm
07b6d17416
Rollup merge of #58384 - GuillaumeGomez:fix-table-display, r=QuietMisdreavus
Fix tables display

Fixes #58134.

cc @lzutao

r? @QuietMisdreavus
2019-02-20 11:58:22 +08:00
kennytm
d22bb1a8b4
Rollup merge of #58336 - GuillaumeGomez:fix-search-results-interactions, r=oli-obk
Fix search results interactions

The bug is visible when you search for "none": the second tab is empty and therefore it messes with the classes. Then when you try to use arrows on the third tab, it just crashes (because only 2 "search-results" are present and you're on tab 3).

r? @QuietMisdreavus
2019-02-20 11:58:16 +08:00
kennytm
120e9cb70f
Rollup merge of #58303 - GuillaumeGomez:stability-tags-display, r=QuietMisdreavus
Improve stability tags display

The issue was the font color on dark theme. Fixed now:

<img width="352" alt="screenshot 2019-02-08 at 14 15 24" src="https://user-images.githubusercontent.com/3050060/52483276-bd810380-2bb3-11e9-8d46-95368569ac85.png">

r? @QuietMisdreavus
2019-02-20 11:58:11 +08:00
Eric Huss
158f074b08 Update cargo 2019-02-19 17:59:32 -08:00
Ralf Jung
7f5d50e475 update miri 2019-02-19 21:54:49 +01:00
Ralf Jung
7596a10225 update Cargo.lock and miri URL 2019-02-19 21:54:49 +01:00
Ralf Jung
5cf0d7b5f8 update miri 2019-02-19 21:54:49 +01:00
Ralf Jung
9c241aa714 expand Unpin example 2019-02-19 21:27:48 +01:00
Ralf Jung
d5df8a49d7 improve wording 2019-02-19 21:25:39 +01:00
Ralf Jung
2c6981a315 improve linked list -> drop transition 2019-02-19 21:23:53 +01:00
Ralf Jung
11e48ebb29 please the mericless tidy, oh tidy 2019-02-19 21:18:56 +01:00
Ralf Jung
c8f4efc006 mention interaction with Deref in intro 2019-02-19 21:12:48 +01:00
Ralf Jung
c774bc650a examples 2019-02-19 20:54:31 +01:00
Ralf Jung
3040380206 rewrite pin module intro 2019-02-19 20:50:16 +01:00
Ralf Jung
0ba99f62d1 more work on projections and RefCell example 2019-02-19 20:26:42 +01:00
Ralf Jung
442c486736 separate section for doubly-linked list, reword projections intro 2019-02-19 20:17:20 +01:00
Ralf Jung
a8111b7d30
Apply suggestions from code review
Co-Authored-By: RalfJung <post@ralfj.de>
2019-02-19 19:50:43 +01:00
Ralf Jung
a8d18b9560 apply some of the feedback 2019-02-19 19:46:33 +01:00