Commit Graph

95262 Commits

Author SHA1 Message Date
Christian Poveda
e152c38f65 Fix merge issues 2019-06-20 17:01:48 -05:00
Christian Poveda
752a1a4668 Updated tag methods for consistency 2019-06-20 16:52:17 -05:00
Guillaume Gomez
640bdbdb1d Improve theme checker by removing unneeded conditions 2019-06-20 22:59:56 +02:00
Guillaume Gomez
165a95b371 Add test for empty css file check 2019-06-20 22:59:56 +02:00
Guillaume Gomez
cfd754d892 Fix theme-checker failure 2019-06-20 22:59:56 +02:00
bors
1d9981f04e Auto merge of #62006 - Centril:rollup-4my59er, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #61900 (implement Error::source for Box<T: Error>)
 - #61979 (Implement Debug for PlaceBase)
 - #61981 (Closures implement Copy and Clone, generators don't)
 - #61996 (Add unit tests for unescaping raw (byte) strings)
 - #62000 (Add test for issue-54189)

Failed merges:

r? @ghost
2019-06-20 20:55:02 +00:00
Mazdak Farrokhzad
9e5ace6f43
Rollup merge of #62000 - JohnTitor:add-test-issue-54189, r=cramertj
Add test for issue-54189

Closes #54189
2019-06-20 22:14:29 +02:00
Mazdak Farrokhzad
7e9ecfae5a
Rollup merge of #61996 - Xanewok:unescape-raw-strings, r=matklad
Add unit tests for unescaping raw (byte) strings

Adds unit tests for functionality introduced in #60793.

r? @matklad @petrochenkov
2019-06-20 22:14:28 +02:00
Mazdak Farrokhzad
fdbc4ce686
Rollup merge of #61981 - rust-lang:generators-clone-doc, r=cramertj
Closures implement Copy and Clone, generators don't
2019-06-20 22:14:26 +02:00
Mazdak Farrokhzad
4129463683
Rollup merge of #61979 - spastorino:fmt-place-base, r=oli-obk
Implement Debug for PlaceBase

r? @oli-obk

More tiny bits that can be extracted from Place 2.0 PR
2019-06-20 22:14:25 +02:00
Mazdak Farrokhzad
d3898a6731
Rollup merge of #61900 - s3bk:master, r=sfackler
implement Error::source for Box<T: Error>

fixes https://github.com/rust-lang/rust/issues/61899
2019-06-20 22:14:24 +02:00
Christian Poveda
9cc28d4541 Replace MemoryExtra by Memory in intptrcast methods 2019-06-20 14:07:34 -05:00
bors
f693d339f1 Auto merge of #61827 - golddranks:lldb_fix, r=nikomatsakis
Fix rust-lldb wrapper scripts.

Currently the `rust-lldb` wrapper provided by Rust project is broken. The error messages it produces on launch are as follows:
```
warning: ignoring unknown option: --one-line-before-file=command script import "/Users/kon/.rustup/toolchains/nightly-2019-05-02-x86_64-apple-darwin/lib/rustlib/etc/lldb_rust_formatters.py"
warning: ignoring unknown option: --one-line-before-file=type summary add --no-value --python-function lldb_rust_formatters.print_val -x ".*" --category Rust
warning: ignoring unknown option: --one-line-before-file=type category enable Rust
(lldb) target create "target/debug/nagare"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/kon/.rustup/toolchains/nightly-2019-05-02-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/python2.7/site-packages/lldb/__init__.py", line 1481, in <module>
    class SBAddress(object):
  File "/Users/kon/.rustup/toolchains/nightly-2019-05-02-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/python2.7/site-packages/lldb/__init__.py", line 1647, in SBAddress
    __swig_getmethods__["module"] = GetModule
NameError: name '__swig_getmethods__' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
...etc.
```

The errors stem from two regressions: one caused by an LLVM upgrade and one caused by unintended upgrade to SWIG 4.0 (SWIG is a wrapper generator that is used to generate Python bindings for LLVM and LLDB.)

(Edit: found the exact dates) The SWIG breakage happened because of a Homebrew version upgrade on `nightly-2019-05-01-x86_64-apple-darwin` and the LLVM breakage happened on `nightly-2019-01-27-x86_64-apple-darwin` (likely to have been caused by https://github.com/rust-lang/rust/pull/57675 ).

The fix is to update the LLVM parameter syntax and to "downgrade" to SWIG 3.0.x. SWIG 3.0.x is not going to be supported by Homebrew forever, but should be good for now, until LLDB upgrades to  support SWIG 4.0.0. Here's some more info about Homebrew support: https://github.com/Homebrew/homebrew-core/pull/39929 & https://github.com/Homebrew/homebrew-core/pull/40882 I'm going to send a bug & fix to LLDB about SWIG 4.0.0 to get the situation fixed in the future.

It would be good to also backport this to beta, since it's such a small change, and will fix an obvious regression.
2019-06-20 17:57:04 +00:00
Yuki Okushi
127edbac34 Add test for issue-54189 2019-06-21 00:19:11 +09:00
bors
f0c2bdf52e Auto merge of #61998 - eddyb:type-name-params, r=oli-obk
rustc_mir: support type parameters by printing them as `_`.

Fixes #61894.
r? @oli-obk
2019-06-20 15:11:08 +00:00
Eduard-Mihai Burtescu
3606003a5b rustc_mir: support type parameters by printing them as _. 2019-06-20 17:48:02 +03:00
Simonas Kazlauskas
4c8d00a3ec rustdoc: generate implementors for all auto traits
Previously we would only generate a list of synthetic implementations
for two well known traits – Send and Sync. With this patch all the auto
traits known to rustc are considered. This includes such traits like
Unpin and user’s own traits.

Sadly the implementation still iterates through the list of crate items
and checks them against the traits, which for non-std crates containing
their own auto-traits will still not include types defined in std/core.

It is an improvement nontheless.
2019-06-20 17:36:43 +03:00
Santiago Pastorino
f0d9d55138 Implement Debug for PlaceBase 2019-06-20 14:25:58 +02:00
bors
c1a5edd939 Auto merge of #61929 - 95th:master, r=GuillaumeGomez
Fix Into trait docs links

https://doc.rust-lang.org/std/convert/trait.Into.html
2019-06-20 12:18:25 +00:00
ljedrz
73cb9ab526 rename hir::map::get_by_hir_id to get 2019-06-20 12:50:06 +02:00
ljedrz
a64456e48e remove hir::map::get 2019-06-20 12:47:26 +02:00
ljedrz
ae72c91247 make blocks::Code work with HirId 2019-06-20 12:47:26 +02:00
ljedrz
fe044a8bc2 rename hir::map::expect_expr_by_hir_id to expect_expr 2019-06-20 12:47:26 +02:00
ljedrz
2d1e223a0e remove uses of the NodeId hir::map::expr 2019-06-20 12:47:26 +02:00
ljedrz
21e63dddbe remove definitions::def_index_to_node_id (unused) 2019-06-20 12:47:26 +02:00
ljedrz
3ed7585635 make hir::def_kind work with HirId 2019-06-20 12:47:26 +02:00
ljedrz
98cc18a5db rename hir::map::name_by_hir_id to ::name 2019-06-20 12:47:26 +02:00
ljedrz
468647cabb remove hir::map::name 2019-06-20 12:47:25 +02:00
ljedrz
f6eb39203b replace NodeId with HirId in infer::SubregionOrigin 2019-06-20 12:47:25 +02:00
ljedrz
b710e08868 remove TyCtx::expr_span (unused) 2019-06-20 12:47:25 +02:00
ljedrz
44109169a6 replace NodeId with HirId in traits::ObligationCauseCode 2019-06-20 12:47:25 +02:00
Gurwinder Singh
34188fb636 Fix Into trait links 2019-06-20 15:02:27 +05:30
Igor Matuszewski
047421e69e Add unit tests for unescaping raw (byte) strings 2019-06-20 09:51:15 +02:00
bors
4fb77a0398 Auto merge of #61983 - Centril:rollup-wnfo07y, r=Centril
Rollup of 4 pull requests

Successful merges:

 - #60454 (Add custom nth_back to Skip)
 - #60772 (Implement nth_back for slice::{Iter, IterMut})
 - #61782 (suggest tuple struct syntax)
 - #61968 (rustc: disallow cloning HIR nodes.)

Failed merges:

r? @ghost
2019-06-20 07:46:11 +00:00
Mazdak Farrokhzad
942a7fec30
Rollup merge of #61968 - eddyb:hir-noclone, r=petrochenkov
rustc: disallow cloning HIR nodes.

Besides being inefficient, cloning also risks creating broken HIR (without properly recreating all the IDs and whatnot, in which case you might as well reconstruct the entire node without ever `Clone`-ing anything).

We detect *some* detrimental situations (based on the occurrence of `HirId`s, I believe?), but it's better to statically disallow it, IMO.

One of the examples that is fixed by this PR is `tcx.hir().fn_decl{,_by_hir_id}`, which was cloning an entire `hir::FnDecl` *every single time it was called*.

r? @petrochenkov cc @rust-lang/compiler
2019-06-20 08:36:03 +02:00
Mazdak Farrokhzad
2ead0072b6
Rollup merge of #61782 - Electron-libre:suggest_tuple_struct_syntax, r=estebank
suggest tuple struct syntax

refs #57242
2019-06-20 08:36:01 +02:00
Mazdak Farrokhzad
2e7e131b8e
Rollup merge of #60772 - timvermeulen:slice_iter_nth_back, r=scottmcm
Implement nth_back for slice::{Iter, IterMut}

Part of #54054.

I implemented `nth_back` as straightforwardly as I could, and then slightly changed `nth` to match `nth_back`. I believe I did so correctly, but please double-check 🙂

I also added the helper methods `zst_shrink`, `next_unchecked`, and `next_back_unchecked` to get rid of some duplicated code. These changes hopefully make this code easier to understand for new contributors like me.

I noticed the `is_empty!` and `len!` macros which sole purpose seems to be inlining, according to the comment right above them, but the `is_empty` and `len` methods are already marked with `#[inline(always)]`. Does that mean we could replace these macros with method calls, without affecting anything? I'd love to get rid of them.
2019-06-20 08:36:00 +02:00
Mazdak Farrokhzad
3e08f1b57e
Rollup merge of #60454 - acrrd:issues/54054_skip, r=scottmcm
Add custom nth_back to Skip

Implementation of nth_back for Skip.
Part of #54054
2019-06-20 08:35:58 +02:00
Jake Goulding
b0dd7fc9f5
Closures implement Copy and Clone, generators don't 2019-06-19 23:03:33 -04:00
bors
3c805ce183 Auto merge of #60341 - mtak-:macos-tlv-workaround, r=alexcrichton
macos tlv workaround

fixes: #60141

Includes:
* remove dead code: `requires_move_before_drop`. This hasn't been needed for a while now (oops I should have removed it in #57655)
* redox had a copy of `fast::Key` (not sure why?). That has been removed.
* Perform a `read_volatile` on OSX to reduce `tlv_get_addr` calls per `__getit` from (4-2 depending on context) to 1.

`tlv_get_addr` is relatively expensive (~1.5ns on my machine).

Previously, in contexts where `__getit` was inlined, 4 calls to `tlv_get_addr` were performed per lookup. For some reason when `__getit` is not inlined this is reduced to 2x - and performance improves to match.

After this PR, I have only ever seen 1x call to `tlv_get_addr` per `__getit`, and macos now benefits from situations where `__getit` is inlined.

I'm not sure if the `read_volatile(&&__KEY)` trick is working around an LLVM bug, or a rustc bug, or neither.

r? @alexcrichton
2019-06-20 02:36:49 +00:00
bors
7d10761349 Auto merge of #61947 - estebank:ice-ice-revolution, r=matthewjasper
Fix ICE involving mut references

Fix #61623, fix #61944, fix #61751.
2019-06-19 22:23:45 +00:00
bors
2fe7b3383c Auto merge of #61967 - lzutao:clippy-update, r=oli-obk
submodules: Update clippy from 868f168c to 149a988

r? @oli-obk
2019-06-19 19:28:28 +00:00
tyler
b148c25cac fix compile-fail test for targets without thread locals 2019-06-19 11:50:23 -07:00
Oliver Scherer
3dfe017dc3 Pacify tidy 2019-06-19 20:17:09 +02:00
Eduard-Mihai Burtescu
673c3fc23a rustc: disallow cloning HIR nodes. 2019-06-19 21:16:08 +03:00
Eduard-Mihai Burtescu
887feeeaf7 rustc: replace GenericArgs::with_generic_args hack with a plain getter. 2019-06-19 21:16:04 +03:00
Oliver Scherer
cdf5596502 Rename regression test to link it to the corresponding issue 2019-06-19 19:48:03 +02:00
Cedric
b72b1ac062 fix indentation 2019-06-19 19:47:52 +02:00
Oliver Scherer
811b996e58 Change ByRef to a struct variant to clarify its fields via names 2019-06-19 19:43:13 +02:00
Lzu Tao
405f655942 Update clippy from 868f168c to 149a988 2019-06-19 17:30:55 +00:00