Commit Graph

138108 Commits

Author SHA1 Message Date
The8472
406fd3a277 silence dead code warnings on windows 2021-02-07 09:45:49 +01:00
The8472
55ca27faa7 use rwlock for accessing ENV 2021-02-07 09:12:21 +01: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
Scott McMurray
1b7309edd6 Expand the docs for ops::ControlFlow a bit
Since I was writing some examples for an RFC anyway.
2021-02-06 22:36:05 -08: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
Santiago Pastorino
748b550bf6
Remove treat-err-as-bug err test from run-make-fulldeps 2021-02-07 01:51:04 -03:00
Santiago Pastorino
47644d3d43
Create ui test for -Ztreat-err-as-bug err 2021-02-07 01:50:59 -03: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
Steve Heindel
0488afd967 Fix doc test for Vec::retain(), now passes clippy::eval_order_dependence 2021-02-06 21:20:28 -05:00
Tomasz Miąsko
a14ec1cedf Show MIR bytes separately in -Zmeta-stats output 2021-02-07 00:00:00 +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
bstrie
d2a3c04c37 Add regression test for #29821
Closes #29821
2021-02-06 16:58:52 -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
LeSeulArtichaut
1daddb47d2 Restore linking to itself in implementors section of trait page 2021-02-06 21:05:41 +01:00
Jesus Rubio
ac6c09a980 Typo fix 2021-02-06 19:45:43 +01:00
Jesus Rubio
777582228c References added 2021-02-06 19:44:09 +01:00
Jesus Rubio
023c6d2e04 Comments updated to keep the consistency 2021-02-06 19:41:03 +01: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
Jesus Rubio
0d8a071f98 Improve long explanation for E0546 2021-02-06 18:27:19 +01:00
ortem
9ce070d27d Resolve typedef in HashMap lldb pretty-printer only if possible
Previously, `GetTypedefedType` was invoked unconditionally.
But this did not work in case of `rust-lldb` without Rust patches
since there was no typedef actually.
2021-02-06 20:24:07 +03:00
Jesus Rubio
9be5d2d01f Format fixes 2021-02-06 18:05:21 +01:00
Jesús Rubio
956c81355a
Update compiler/rustc_error_codes/src/error_codes/E0542.md
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2021-02-06 17:39:11 +01: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
Jesus Rubio
be159379f6 Add long error explanation for E0542 2021-02-06 16:42:34 +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
David Hewitt
04a19b93c6 parse_format: treat r" as a literal 2021-02-06 15:01:07 +00:00
Lzu Tao
fb4e734f99 Prefer match intead of combinators to make some Box function inlineable 2021-02-06 15:00:37 +00:00
Hameer Abbasi
b700878eb2 Add option to emit compiler stderr per bitwidth.
See rust-lang/compiler-team#365
2021-02-06 13:43:55 +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
Nixon Enraght-Moony
3e177a8e9d output rdj docs 2021-02-06 09:16:58 +00:00
Stein Somers
9066c736a2 BTreeMap: remove Ord bound where it is absent elsewhere 2021-02-06 09:04:50 +01: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