Commit Graph

142395 Commits

Author SHA1 Message Date
Smitty
05121a22e6 fix is_module check 2021-04-20 19:10:00 -04:00
Smitty
a9ff7ac9c3 Merge mod-title and item-title tests 2021-04-20 18:57:26 -04:00
Smitty
7cf4f4276f Rename pushname to is_module 2021-04-20 18:53:15 -04:00
marmeladema
1ef760d88e Add test for issue #70303 2021-04-20 23:49:35 +01:00
marmeladema
25cb1af7b2 Add test for issue #78671 2021-04-20 23:42:48 +01:00
marmeladema
19e51aaef7 Add test for issue #79636 2021-04-20 23:42:41 +01:00
marmeladema
b6647b5692 Add test for issue #79949 2021-04-20 23:42:21 +01:00
Smitty
0c193f82e7 Write Rustdoc titles like "x in crate::mod - Rust"
This makes Rustdoc titles for items read like
"x in cratename::blah::foo - Rust". Title for modules and other
non-items are unchanged, and still read like
"doccratenameconst::blah::foo - Rust". This makes managing several open
Rustdoc tabs easier.

Closes #84371.
2021-04-20 17:31:18 -04:00
Stephen Albert-Moore
c968594456
Fix broken doc link 2021-04-20 17:10:20 -04:00
Jack Huey
9891582897 Remove TraitRefHackInner and use the concatenating functionality instead of trait_ref_hack 2021-04-20 16:43:04 -04:00
Jack Huey
457c4c133a Add BinderScopeType to replace binder_depth and from_poly_trait_ref 2021-04-20 16:42:46 -04:00
Jack Huey
32942ab807 A non-minimal set of TraitRefBoundarys to work on removing from_poly_trait_ref 2021-04-20 16:41:54 -04:00
Jack Huey
ba3d22ed66 Precompute inverse binder depth 2021-04-20 16:41:54 -04:00
Tor Hovland
a10d01be22 Uses flex to fix formatting of h1 at any width. 2021-04-20 22:31:48 +02:00
Christiaan Dirkx
d45e1314f3 Change uses of never type 2021-04-20 20:53:07 +02:00
Christiaan Dirkx
389fef3b30 Replace Void with never type 2021-04-20 20:53:07 +02:00
bors
6df26f897c Auto merge of #84353 - estebank:as-ref-mir, r=davidtwco
Suggest `.as_ref()` on borrow error involving `Option`/`Result`

When encountering a E0382 borrow error involving an `Option` or `Result`
provide a suggestion to use `.as_ref()` on the prior move location to
avoid the move.

Fix #84165.
2021-04-20 14:05:12 +00:00
Oli Scherer
85b1c67910 Limit test to 64 bit systems to keep the sizes in the diagnostics stable 2021-04-20 09:30:28 -04:00
Oli Scherer
6e988c0613 Typo 2021-04-20 09:30:28 -04:00
Oli Scherer
a46bc5664a Tidy 2021-04-20 09:30:28 -04:00
Oli Scherer
a2f2179026 Add an attribute to be able to configure the limit 2021-04-20 09:30:28 -04:00
Oli Scherer
e9696c8b62 Implement a lint that highlights all moves larger than 1000 bytes 2021-04-20 09:30:21 -04:00
bors
7d0132ae90 Auto merge of #84363 - Dylan-DPC:rollup-ink2wyq, r=Dylan-DPC
Rollup of 4 pull requests

Successful merges:

 - #84337 (Clarify the difference between insert and get_or_insert)
 - #84340 (rustdoc: Show nag box on IE11)
 - #84345 (Remove comment about doc hack.)
 - #84347 (rustdoc: Simplify some document functions)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-04-20 11:19:31 +00:00
Edd Barrett
8cc918a3dc Improve the docstrings of the Lto struct. 2021-04-20 10:28:17 +01:00
Dylan DPC
868de80ac2
Rollup merge of #84347 - Swatinem:simplify-document-fns, r=jyn514
rustdoc: Simplify some document functions

* Remove `prefix` param of `document_short/full`, `render_markdown`, as its always an empty string.
* Remove `Option` wrapping of `document_short` `parent`, as its always `Some`.
2021-04-20 11:08:30 +02:00
Dylan DPC
61f6cfb79b
Rollup merge of #84345 - ehuss:remove-core-core-comment, r=Mark-Simulacrum
Remove comment about doc hack.

I neglected to remove this comment in #83955.
2021-04-20 11:08:29 +02:00
Dylan DPC
5cc3994654
Rollup merge of #84340 - notriddle:patch-4, r=GuillaumeGomez
rustdoc: Show nag box on IE11

Rustdoc doesn't work on IE11. It's been broken for months, it isn't supported by the [tiered browser support list], it's even more severely broken on other Rust websites, and IE11 doesn't support the `<details>` tag that we want to use.

In the interest of honesty, let's give an actual error message for anyone on IE11.

[tiered browser support list]: https://github.com/rust-lang/rfcs/blob/master/text/1985-tiered-browser-support.md
2021-04-20 11:08:28 +02:00
Dylan DPC
9f03385499
Rollup merge of #84337 - matklad:insert_or_insert, r=jyn514
Clarify the difference between insert and get_or_insert

Took me a while to realize that the two are actually different.
2021-04-20 11:08:27 +02:00
bors
6af1e632a9 Auto merge of #84323 - richkadel:uncovered-functions, r=tmandry
coverage of async function bodies should match non-async

This fixes some missing coverage within async function bodies.

Commit 1 demonstrates the problem in the fixed issue, and commit 2 corrects it.

Fixes: #83985
2021-04-20 08:33:51 +00:00
bors
ec38ea1ac1 Auto merge of #7097 - yawara:fix/7069, r=llogiq
Fixed inconsistent_struct_constructor triggers in macro-generated code

fixes #7069

changelog: `inconsistent_struct_constructor`: Fix FP in macro expansion.
2021-04-20 08:26:21 +00:00
Laurențiu Nicola
e85f19bbc8 ⬆️ rust-analyzer 2021-04-20 09:25:34 +03:00
bors
a70fbf6620 Auto merge of #83900 - torhovland:issue-83832, r=jyn514
Add stability tags to ImportItem.

Fixes #83832.
2021-04-20 06:03:15 +00:00
Yawara ISHIDA
6eae905808 Add a test for FP in macro expansion 2021-04-20 13:34:30 +09:00
bors
b2c20b51ed Auto merge of #84295 - richkadel:continue-coverage, r=tmandry
Add coverage to continue statements

`continue` statements were missing coverage. This was particularly
noticeable in a match pattern that contained only a `continue`
statement, leaving the branch appear uncounted. This PR addresses the
problem and adds tests to prove it.

r? `@tmandry`
cc: `@wesleywiser`
2021-04-20 03:08:24 +00:00
Jacob Hoffman-Andrews
569096cbaf rustdoc: use details tag for trait implementors
This switches from JS-generated toggles to using the HTML <details> tag
for expanding and collapsing entries in the "Implementors" section.
2021-04-19 19:46:51 -07:00
bors
e888a57da8 Auto merge of #84334 - klensy:typo-compiler, r=jyn514
fix few typos in comments
2021-04-20 00:16:45 +00:00
Esteban Küber
2763a0541c Suggest .as_ref() on borrow error involving Option/Result
When encountering a E0382 borrow error involving an `Option` or `Result`
provide a suggestion to use `.as_ref()` on the prior move location to
avoid the move.

Fix #84165.
2021-04-19 17:14:37 -07:00
bors
b7c12f3aab Auto merge of #7092 - basavesh:fix#7066, r=giraffate
useless use of format! should return function directly

fixes #7066

changelog: [`useless_format`] wraps the content in the braces when it's needed.

r? `@giraffate`
2021-04-19 23:06:21 +00:00
Arpad Borsos
d93d77b713
rustdoc: Simplify some document functions
* Remove `prefix` param of `document_short/full`, `render_markdown`, as its always an empty string.
* Remove `Option` wrapping of `document_short` `parent`, as its always `Some`.
2021-04-19 23:42:09 +02:00
Michael Howell
20c3627052 Use onEachLazy to iterate DOMTokenList 2021-04-19 14:12:40 -07:00
Eric Huss
0502bccde7 Remove comment about doc hack. 2021-04-19 14:06:36 -07:00
bors
9d9c2c92b8 Auto merge of #84342 - Dylan-DPC:rollup-5b40142, r=Dylan-DPC
Rollup of 7 pull requests

Successful merges:

 - #84123 (Introduce CompileMonoItem DepNode)
 - #84126 (Enable sanitizers for x86_64-unknown-linux-musl)
 - #84168 (Lower async fn in traits.)
 - #84256 (doc: use U+2212 for minus sign in floating-point -0.0 remarks)
 - #84291 (fix aliasing violations in thread_local_const_init)
 - #84313 (fix suggestion for unsized function parameters)
 - #84330 (Remove unused footer section)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-04-19 20:49:27 +00:00
Cameron Steffen
c9c14d0c1f Small refactor 2021-04-19 15:40:21 -05:00
Cameron Steffen
98a11e01e5 Remove closure_tree 2021-04-19 15:40:20 -05:00
Michael Howell
9b624071d3 rustdoc: Show nag box on IE10
Rustdoc doesn't work on IE11. It's been broken for months, it isn't supported
by the [tiered browser support list], it's even more severely broken on other
Rust websites, and IE11 doesn't support the `<details>` tag that we want
to use.

In the interest of honesty, let's give an actual error message for anyone
on IE11.

[tiered browser support list]: https://github.com/rust-lang/rfcs/blob/master/text/1985-tiered-browser-support.md
2021-04-19 13:39:48 -07:00
Guillaume Gomez
e2e104b993 Add lint to check for boolean comparison in assert macro calls 2021-04-19 22:15:51 +02:00
Dylan DPC
a23fd1694d
Rollup merge of #84330 - GuillaumeGomez:remove-footer, r=jyn514
Remove unused footer section

I realized yesterday while working on docs.rs that rustdoc was generating a "footer"section that it doesn't use. No need to keep it then.

r? `@jyn514`
2021-04-19 22:00:11 +02:00
Dylan DPC
349fae3a32
Rollup merge of #84313 - lcnr:sized-err-msg, r=petrochenkov
fix suggestion for unsized function parameters

taken from `@fasterthanlime's` article https://fasterthanli.me/articles/whats-in-the-box
2021-04-19 22:00:10 +02:00
Dylan DPC
761243572e
Rollup merge of #84291 - RalfJung:thread-local-const-init, r=alexcrichton
fix aliasing violations in thread_local_const_init

Fixes https://github.com/rust-lang/rust/pull/83416#discussion_r615364774

r? `@alexcrichton` `@sfackler`
2021-04-19 22:00:09 +02:00
Dylan DPC
fb78dc05e4
Rollup merge of #84256 - tspiteri:pretty-minus-zero, r=workingjubilee
doc: use U+2212 for minus sign in floating-point -0.0 remarks

Also remove plus sign in `-0.0 == +0.0` to make it a valid expression.
2021-04-19 22:00:08 +02:00