Commit Graph

137838 Commits

Author SHA1 Message Date
Vadim Petrochenkov
dbdbd30bf2 expand/resolve: Turn #[derive] into a regular macro attribute 2021-02-07 20:08:45 +03:00
bors
ae00b62ceb Auto merge of #81502 - CraftSpider:method-abi, r=jyn514
Add abi field to `Method`

Also bumps version and adds a test (Will conflict with #81500, whichever is merged first)

Rationale: It's possible for methods to have an ABI. This should be exposed in the JSON.
2021-02-07 10:59:41 +00:00
bors
43e1ea29c4 Auto merge of #81498 - thomaseizinger:ice-workaround-56935-rustc-index, r=matthewjasper
Apply workaround from #72003 for #56935 to allow for cross-compilation of `rustc_index` crate

This patch applies the same workaround as #72003 to the `rustc_index` crate. This allows recent versions of rustfmt to compile to wasm again.

Related: #72017.
2021-02-07 08:09:58 +00:00
bors
323fb7113b Auto merge of #81462 - osa1:issue75158, r=Mark-Simulacrum
Add test for #75158

This also shifts some type-size related tests into a new directory, so that we keep the number of files at the root down.

Closes #75158
2021-02-07 05:22:14 +00:00
bors
0961ae83b8 Auto merge of #81821 - nikic:update-wasm32, r=sanxiyn
Upgrade wasm32 image to Ubuntu 20.04

This switches the wasm32 image, which is used to test
wasm32-unknown-emscripten, to Ubuntu 20.04. While at it, enable
most of the excluded tests, as they seem to work fine with some
minor fixes.
2021-02-07 02:36:08 +00:00
bors
08fdbd59b7 Auto merge of #78052 - da-x:path-trimming-type-aliases, r=davidtwco
path trimming: ignore type aliases

Continuation of #73996.
2021-02-06 23:44:42 +00:00
Rune Tynan
ac75fafd1c
Remove accidentally left-behind git mark 2021-02-06 17:37:36 -05:00
bors
a73c2e555c Auto merge of #80883 - GuillaumeGomez:remove-some-function-fields, r=ollie27
Remove some function fields

Same kind as #80845.

This PR removes the `all_types` and `ret_types` from the `clean::Function` type.

Another change that I had to do was implementing the `From` trait to be able to convert `hir::def::DefKind` into `clean::TypeKind` without requiring `DocContext` (and so I updated the `clean` method so that it's taken into account).

The last two commits improve a bit the `get_real_types` function and the `Type::generics` method.

r? `@jyn514`
2021-02-06 20:55:36 +00:00
bors
9a1d6174c9 Auto merge of #81832 - jonas-schievink:rollup-3nw53p0, r=jonas-schievink
Rollup of 7 pull requests

Successful merges:

 - #81402 (tidy: Run tidy style against markdown files.)
 - #81434 (BTree: fix documentation of unstable public members)
 - #81680 (Refactor `PrimitiveTypeTable` for Clippy)
 - #81737 (typeck: Emit structured suggestions for tuple struct syntax)
 - #81738 (Miscellaneous small diagnostics cleanup)
 - #81766 (Enable 'task list' markdown extension)
 - #81812 (Add a test for escaping LLVMisms in inline asm)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-02-06 18:03:37 +00:00
Jonas Schievink
11e7897eae
Rollup merge of #81812 - nagisa:nagisa/escape-the-escape-hatch, r=Amanieu
Add a test for escaping LLVMisms in inline asm

We escape certain LLVM-specific features when passing the inline
assembly string to the LLVM. Until now, however, there was no test
making sure this behaviour stays intact. This commit adds such a test!

r? `@Amanieu`
cc `@joshtriplett`
2021-02-06 17:01:52 +01:00
Jonas Schievink
e143159e75
Rollup merge of #81766 - jyn514:task-lists, r=GuillaumeGomez
Enable 'task list' markdown extension

Closes https://github.com/rust-lang/rust/issues/71183.
2021-02-06 17:01:50 +01:00
Jonas Schievink
96e843ce6a
Rollup merge of #81738 - camelid:misc-small-diag-cleanup, r=lcnr
Miscellaneous small diagnostics cleanup
2021-02-06 17:01:49 +01:00
Jonas Schievink
f631410159
Rollup merge of #81737 - camelid:typeck-structure-sugg, r=lcnr
typeck: Emit structured suggestions for tuple struct syntax

And tuple variant syntax, but that didn't fit in the subject :)

Now the fact that these are suggestions is exposed both to the layout
engine and to IDEs and rustfix for automatic application.
2021-02-06 17:01:47 +01:00
Jonas Schievink
85fb5cdf26
Rollup merge of #81680 - camsteffen:primty, r=oli-obk
Refactor `PrimitiveTypeTable` for Clippy

I removed `PrimitiveTypeTable` and added `PrimTy::ALL` and `PrimTy::from_name` in its place. This allows Clippy to use `PrimTy::from_name` for the `builtin_type_shadow` lint, and a `const` list of primitive types is deleted from Clippy code (the goal). All changes should be a little faster, if anything.
2021-02-06 17:01:45 +01:00
Jonas Schievink
747abb86db
Rollup merge of #81434 - ssomers:btree_drain_filter_doc_update, r=dtolnay
BTree: fix documentation of unstable public members

As rightfully requested in #62924 & #70530.
r? `@Mark-Simulacrum`
2021-02-06 17:01:43 +01:00
Jonas Schievink
7acf9ecf4f
Rollup merge of #81402 - ehuss:md-tidy, r=jyn514
tidy: Run tidy style against markdown files.

This adds tidy checks for markdown files.  I think it is useful to have some style enforcement (for the same reasons the style is enforced on other files).  I think it is worthwhile to avoid `ignore` on rust examples since having broken code in documentation is frustrating.  Avoiding trailing whitespace is good because it has semantic meaning in markdown, which I think should be avoided.
2021-02-06 17:01:42 +01:00
bors
37d067f5d7 Auto merge of #81824 - RalfJung:miri, r=RalfJung
update Miri

Fixes https://github.com/rust-lang/rust/issues/81770
Cc `@rust-lang/miri` r? `@ghost`
2021-02-06 15:14:44 +00:00
Simonas Kazlauskas
243755a13e Add a test for escaping LLVMisms in inline asm
We escape certain LLVM-specific features when passing the inline
assembly string to the LLVM. Until now, however, there was no test
making sure this behaviour stays intact. This commit adds such a test!
2021-02-06 15:18:37 +02:00
Ralf Jung
1ad52a1873 update Miri 2021-02-06 13:18:51 +01:00
Nikita Popov
55e237284f Upgrade wasm32 image to Ubuntu 20.04
This switches the wasm32 image, which is used to test
wasm32-unknown-emscripten to Ubuntu 20.04. While at it, enable
most of the excluded tests, as they seem to work fine with some
minor fixes.
2021-02-06 13:05:56 +01:00
Dan Aloni
64950297e2 path trimming: disable on src/test/run-make-fulldeps/coverage-spanview 2021-02-06 12:03:48 +02:00
Dan Aloni
eaefe4a230 path trimming: ignore type aliases 2021-02-06 12:03:48 +02:00
bors
399b6452b5 Auto merge of #81792 - pietroalbini:bump-nightly, r=Mark-Simulacrum
Bump nightly version to 1.52.0

cc `@rust-lang/release`
2021-02-06 07:55:28 +00:00
Joshua Nelson
9653b601b2 Enable 'task list' markdown extension
- Add documentation about task lists
2021-02-06 00:08:21 -05:00
bors
cfba499271 Auto merge of #81810 - m-ou-se:rollup-q3nborp, r=m-ou-se
Rollup of 7 pull requests

Successful merges:

 - #80011 (Stabilize `peekable_next_if`)
 - #81580 (Document how `MaybeUninit<Struct>` can be initialized.)
 - #81610 (BTreeMap: make Ord bound explicit, compile-test its absence)
 - #81664 (Avoid a hir access inside get_static)
 - #81675 (Make rustdoc respect `--error-format short` in doctests)
 - #81753 (Never MIR inline functions with a different instruction set)
 - #81795 (Small refactor with Iterator::reduce)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-02-06 04:55:09 +00:00
Rune Tynan
30ecde0beb
Add abi field to Method 2021-02-05 22:25:11 -05:00
Stein Somers
f0b8166870 BTreeMap: fix documentation of unstable public members 2021-02-06 00:33:50 +01:00
Mark Rousskov
83c34ea052 Bump clippy version 2021-02-05 18:32:28 -05:00
Mara Bos
51c68034b9
Rollup merge of #81795 - camsteffen:diagnostics-reduce, r=oli-obk
Small refactor with Iterator::reduce
2021-02-06 00:14:17 +01:00
Mara Bos
728c955ac0
Rollup merge of #81753 - tmiasko:inline-instruction-set, r=oli-obk
Never MIR inline functions with a different instruction set
2021-02-06 00:14:16 +01:00
Mara Bos
e8aaa1490f
Rollup merge of #81675 - poliorcetics:respect-shortness, r=jyn514
Make rustdoc respect `--error-format short` in doctests

Note that this will not work with `cargo test`, only with `rustdoc --test`, I'll have to modify `cargo` as well.

Fix #81662.

`@rustbot` label +T-rustdoc +A-doctests
2021-02-06 00:14:14 +01:00
Mara Bos
add80c9d4b
Rollup merge of #81664 - bjorn3:no_codegen_hir, r=lcnr
Avoid a hir access inside get_static

Together with #81056 this ensures that the codegen unit DepNode doesn't have a direct dependency on any part of the hir.
2021-02-06 00:14:13 +01:00
Mara Bos
78be1aa226
Rollup merge of #81610 - ssomers:btree_emphasize_ord_bound, r=dtolnay
BTreeMap: make Ord bound explicit, compile-test its absence

Most `BTreeMap` and `BTreeSet` members are subject to an `Ord` bound but a fair number of methods are not. To better convey and perhaps later tune the `Ord` bound, make it stand out in individual `where` clauses, instead of once far away at the beginning of an `impl` block. This PR does not introduce or remove any bounds.

Also adds compilation test cases checking that the bound doesn't creep in unintended on the historically unbounded methods.
2021-02-06 00:14:11 +01:00
Mara Bos
43b3adb4e2
Rollup merge of #81580 - rodrimati1992:patch-2, r=dtolnay
Document how `MaybeUninit<Struct>` can be initialized.
2021-02-06 00:14:09 +01:00
Mara Bos
cc882fc3be
Rollup merge of #80011 - Stupremee:stabilize-peekable-next-if, r=dtolnay
Stabilize `peekable_next_if`

This PR stabilizes the `peekable_next_if` feature

Resolves #72480
2021-02-06 00:14:06 +01:00
bors
16b805713c Auto merge of #79253 - rcvalle:fix-rustc-sysroot-cas, r=nagisa
Fix rustc sysroot in systems using CAS

Change filesearch::get_or_default_sysroot() to check if sysroot is found using env::args().next() if rustc in argv[0] is a symlink; otherwise, or if it is not found, use env::current_exe() to imply sysroot. This makes the rustc binary able to locate Rust libraries in systems using content-addressable storage (CAS).
2021-02-05 22:58:13 +00:00
David Tolnay
ceda547c68
Bump peekable_next_if to rust 1.51.0 2021-02-05 14:25:21 -08:00
bors
23adf9fd84 Auto merge of #81215 - cjgillot:defkey-mir, r=oli-obk
Encode MIR metadata by iterating on DefId instead of traversing the HIR tree

Split out of https://github.com/rust-lang/rust/pull/80347.

This part only traverses `mir_keys` and encodes MIR according to the def kind.

r? `@oli-obk`
2021-02-05 18:21:47 +00:00
Guillaume Gomez
c92b161df0 Remove unneeded From trait impl for DefKind 2021-02-05 17:23:54 +01:00
Guillaume Gomez
3c8e13aff1 Remove unused cache argument 2021-02-05 17:23:54 +01:00
Guillaume Gomez
076fa63424 Improve code 2021-02-05 17:23:54 +01:00
Guillaume Gomez
8e0d1cefd3 Improve html::render::cache::get_real_types code 2021-02-05 17:23:54 +01:00
Guillaume Gomez
4810910b0b Remove Function all_types and ret_types fields 2021-02-05 17:23:52 +01:00
Guillaume Gomez
d5174a4b0d Explicitly match all DefKind item in conversion to TypeKind 2021-02-05 17:22:27 +01:00
Cameron Steffen
c89b9d97e2 Small refactor with Iterator::reduce 2021-02-05 09:34:40 -06:00
Pietro Albini
c51e432426
bump nightly version to 1.52.0 2021-02-05 16:25:08 +01:00
bors
5605b5d693 Auto merge of #81257 - pnkfelix:issue-80949-short-term-resolution-via-revert-of-pr-78373, r=matthewjasper
Revert 78373 ("dont leak return value after panic in drop")

Short term resolution for issue #80949.

Reopen #47949 after this lands.

(We plan to fine-tune PR #78373 to not run into this problem.)
2021-02-05 14:52:57 +00:00
bors
f9435f4c92 Auto merge of #81784 - m-ou-se:rollup-s23fow7, r=m-ou-se
Rollup of 15 pull requests

Successful merges:

 - #79554 (Generic associated types in trait paths)
 - #80726 (relax adt unsizing requirements)
 - #81307 (Handle `Span`s for byte and raw strings and add more detail )
 - #81318 (rustdoc-json: Fix has_body)
 - #81456 (Make remote-test-server easier to use with new targets)
 - #81497 (rustdoc: Move `display_fn` struct inside `display_fn`)
 - #81500 (Remove struct_type from union output)
 - #81542 (Expose correct symlink API on WASI)
 - #81676 (Add more information to the error code for 'crate not found')
 - #81682 (Add additional bitset benchmarks)
 - #81730 (Make `Allocator` object-safe)
 - #81763 (Cleanup rustdoc pass descriptions a bit)
 - #81767 (Update LayoutError/LayoutErr stability attributes)
 - #81771 (Indicate change in RSS from start to end of pass in time-passes output)
 - #81781 (Fix `install-awscli.sh` error in CI)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-02-05 12:11:05 +00:00
Wesley Wiser
dce5e9e1bf Run x.py fmt to fix tidy issues 2021-02-05 06:35:32 -05:00
Mara Bos
2383cd4b2d
Rollup merge of #81781 - m-ou-se:fix-ci, r=pietroalbini
Fix `install-awscli.sh` error in CI

This fixes the `install-awscli.sh` error about missing `'bdist_wheel'`.
2021-02-05 12:26:10 +01:00