Alex Gurganus
b2a02c8d4a
Fixes #58586 : Make E0505 explain example fail for 2018 edition
2019-02-20 14:46:42 -06:00
Ralf Jung
1b556f16c9
expand pinning projections
2019-02-20 19:38:28 +01:00
gnzlbg
103ed0c347
Search for target_triple.json only if builtin target not found
...
Before this commit, if the builtin target was found, but an error
happened when instantiating it (e.g. validating the target
specification file failed, etc.), then we ignored those errors
and proceeded to try to find a `target_triple.json` file, and if
that failed, reported that as an error.
With this commit, if rustc is supposed to provide the builtin target,
and something fails while instantiating it, that error will
get properly propagated.
2019-02-20 19:37:54 +01:00
Paul Dicker
6464e32ea9
Use standard Read/Write traits in sys::stdio
2019-02-20 19:27:03 +01:00
Paul Dicker
b09803e869
Address review comments
2019-02-20 19:26:56 +01:00
Ralf Jung
06b2affa78
tweak pinning projections
2019-02-20 18:28:12 +01:00
Andre Bogus
8cf3605c50
fix typo
2019-02-20 17:59:17 +01:00
Clint Frederickson
02fe6a7ba6
./x.py test src/test/ui --stage 1 --bless -i --compare-mode=nll
2019-02-20 09:54:10 -07:00
Pietro Albini
703e2361f0
ci: switch appveyor to gce builders to try debugging the 259 failure
2019-02-20 17:01:29 +01:00
Santiago Pastorino
a12982cdc2
Run rustfmt
2019-02-20 12:15:27 -03:00
Santiago Pastorino
801c3f060f
Fix erroneous loop diagnostic in nll
...
This commit fixes the logic of detecting when a use happen in a later
iteration of where a borrow was defined
Fixes #53773
2019-02-20 12:15:08 -03:00
Aaron Power
d072510579
Update RELEASES.md
2019-02-20 15:53:44 +01:00
Aaron Power
262156433e
Update RELEASES.md
2019-02-20 15:51:22 +01:00
Santiago Pastorino
cbc865defd
Use successor_within_block helper
2019-02-20 11:49:18 -03:00
Dale Wijnand
ad096d1a0e
Dedup a rustdoc diagnostic construction
2019-02-20 14:07:07 +00:00
Stjepan Glavina
8e219e7eb5
Turn duration consts into associated consts
2019-02-20 14:21:15 +01:00
ljedrz
404e6435d0
update clippy: partially HirIdify
2019-02-20 13:18:16 +01:00
bors
f66e4697ae
Auto merge of #58578 - kennytm:rollup, r=kennytm
...
Rollup of 24 pull requests
Successful merges:
- #56470 (Modify doctest's auto-`fn main()` to allow `Result`s)
- #58044 (Make overflowing and wrapping negation const)
- #58303 (Improve stability tags display)
- #58336 (Fix search results interactions)
- #58384 (Fix tables display)
- #58392 (Use less explicit shifting in std::net::ip)
- #58409 (rustdoc: respect alternate flag when formatting impl trait)
- #58456 (Remove no longer accurate diagnostic code about NLL)
- #58528 (Don't use an allocation for ItemId in StmtKind)
- #58530 (Monomorphize less code in fs::{read|write})
- #58534 (Mention capping forbid lints)
- #58536 (Remove UB in pointer tests)
- #58538 (Add missing fmt structs examples)
- #58539 (Add alias methods to PathBuf for underlying OsString (#58234 ))
- #58544 (Fix doc for rustc "-g" flag)
- #58545 (Add regression test for a specialization-related ICE (#39448 ))
- #58546 (librustc_codegen_llvm => 2018)
- #58551 (Explain a panic in test case net::tcp::tests::double_bind)
- #58553 (Use more impl header lifetime elision)
- #58562 (Fix style nits)
- #58565 (Fix typo in std::future::Future docs)
- #58568 (Fix a transposition in driver.rs.)
- #58569 (Reduce Some Code Repetitions like `(n << amt) >> amt`)
- #58576 (Stabilize iter::successors and iter::from_fn)
2019-02-20 10:14:28 +00:00
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