Commit Graph

142161 Commits

Author SHA1 Message Date
Dylan DPC
1cc4b6de3e
Rollup merge of #83707 - exrook:unsafecell, r=m-ou-se
Remove `T: Debug` bound on UnsafeCell Debug impl

Prior art: #65013
2021-04-13 11:10:39 +02:00
Dylan DPC
9191dee5b8
Rollup merge of #83438 - CDirkx:releases, r=Mark-Simulacrum
Update RELEASES.md

A couple of things that were missing in the release notes:

- `Div` and `Rem` by their `NonZero` variant is now implemented for all unsigned integers (#79134)
- Stabilization of `VecDeque::range` and `VecDeque::range_mut` (#79022, stabilization version corrected to 1.51.0 #80448)
- Deprecation of `spin_loop_hint` (#80966)
2021-04-13 11:10:38 +02:00
bors
2e7eb85b1d Auto merge of #84099 - tmiasko:asm-only-x86_64, r=Amanieu
Check for asm support in UI tests that require it

Add `needs-asm-support` compiletest directive, and use it in asm tests
that require asm support without relying on any architecture specific
features.

Closes #84038.
2021-04-13 08:40:12 +00:00
Jacob Hoffman-Andrews
11f854db4f Further consolidate search-related vars and funcs 2021-04-13 00:35:36 -07:00
Jacob Hoffman-Andrews
95d652ebce Consolidate search-related vars and functions.
This allows sharing across main.js and search.js without exporting too
many symbols into the global namespace.
2021-04-13 00:07:01 -07:00
Manish Goregaokar
55b29443db Update attribute tests 2021-04-12 23:03:17 -07:00
bors
23aef90b4e Auto merge of #84086 - m-ou-se:stabilze-is-subnormal, r=dtolnay
Stabilize is_subnormal.

FCP completed here: https://github.com/rust-lang/rust/issues/79288#issuecomment-817201311
2021-04-13 05:59:10 +00:00
Jacob Hoffman-Andrews
276ee6f542 Move search JS into search-index.js
Export a few variables and functions into the global scope because they
are needed both by main.js and search-index.js.
2021-04-12 22:52:16 -07:00
Camelid
dbbbdf1097 Add explanatory note to bare_urls lint
I think the lint is confusing otherwise since it doesn't fully explain
what the problem is.
2021-04-12 20:25:20 -07:00
bors
7ce470fd9b Auto merge of #84082 - andjo403:stabilize_nonzero_leading_trailing_zeros, r=m-ou-se
Stabilize nonzero_leading_trailing_zeros

Stabilizing nonzero_leading_trailing_zeros and due to this also stabilizing the intrinsic cttz_nonzero

FCP finished here: https://github.com/rust-lang/rust/issues/79143#issuecomment-817216153
`@rustbot` modify labels: +T-libs

Closes #79143
2021-04-13 03:18:10 +00:00
bors
d4d7ebf142 Auto merge of #82992 - philippeitis:stabilize_bufreader_seek_relative, r=workingjubilee
Stabilize `bufreader_seek_relative`

This PR marks `BufReader::seek_relative` as stable - the associated issue, #31100, has passed the final comment period without any issues, and from what I understand, the only thing left to stabilize this is to submit a PR marking the method as stable.

Closes #31100.
2021-04-13 00:52:00 +00:00
Tomasz Miąsko
da40e69b60 Check for asm support in UI tests that require it
Add `needs-asm-support` compiletest directive, and use it in asm tests
that require asm support without relying on any architecture specific
features.
2021-04-13 00:00:00 +00:00
James Addison
0174dd6f92 Compiler error messages: reduce assertiveness of message E0384
This message is emitted as guidance by the compiler when a developer attempts to reassign a value to an immutable variable.  Following the message will always currently work, but it may not always be the best course of action; following the 'consider ...' messaging pattern provides a hint to the developer that it could be wise to explore other alternatives.
2021-04-12 23:29:09 +01:00
bors
11d0528483 Auto merge of #82918 - Manishearth:edition-2015-warn, r=oli-obk
Turn old edition lint (anonymous-parameters) into warn-by-default on 2015

This makes `anonymous_parameters` <s>and `keyword_idents` </s>warn-by-default on the 2015 edition. I would also like to do this for `absolute_paths_not_starting_with_crate`, but I feel that case is slightly less clear-cut.

Note that this only affects code on the 2015 edition, such code is illegal in future editions anyway.

This was spurred by https://github.com/dtolnay/syn/issues/972: old edition syntax breaks tooling (like syn), and while the tooling should be free to find its balance on how much to support prior editions, it does seem like we should be nudging such code towards the newer edition, and we can do that by turning this Allow lint into a Warn.

In general, I feel like migration lints from an old edition should be made Warn after a year or so, and idiom lints for the new edition should be made Warn after a couple months.

cc `@m-ou-se,` this is for stuff from the 2015-2018 migration but you might be interested.
2021-04-12 22:26:15 +00:00
Aaron Hill
c6d67f8317
Add fast path when None delimiters are not involved 2021-04-12 17:26:26 -04:00
Manish Goregaokar
5c2820b913 +ignore-tidy-filelength 2021-04-12 13:35:48 -07:00
Camelid
1e2635815f Fix typo in error message
Also tweaked the message a bit by

- removing the hyphen, because in my opinion the hyphen makes the
  message a bit harder to read, especially combined with the backticks;
- adding the word "be", because I think it's a bit clearer that way.
2021-04-12 13:08:15 -07:00
Manish Goregaokar
942ed31c56 Move color to themes 2021-04-12 12:42:13 -07:00
Manish Goregaokar
05d1e723dc & -> && 2021-04-12 12:40:20 -07:00
Manish Goregaokar
97cd30d337 Wrap toggle_open() 2021-04-12 12:27:37 -07:00
Manish Goregaokar
b40bd5a9aa Add test for item hiding 2021-04-12 12:14:41 -07:00
b-naber
4dfaa78433 add test 2021-04-12 21:09:08 +02:00
b-naber
dd54459bfc don't bump in check_mistyped_turbofish_with_multiple_type_params 2021-04-12 21:09:04 +02:00
Manish Goregaokar
01afa07fef should_hide_fields > 12 2021-04-12 11:41:01 -07:00
bors
d0695c9081 Auto merge of #83776 - jyn514:update-stdarch-docs, r=Amanieu
Update stdarch submodule (to before it switched to const generics)

https://github.com/rust-lang/rust/pull/83278#issuecomment-812389823: This unblocks #82539.

Major changes:
- More AVX-512 intrinsics.
- More ARM & AArch64 NEON intrinsics.
- Updated unstable WASM intrinsics to latest draft standards.
- std_detect is now a separate crate instead of a submodule of std.

I double-checked and the first use of const generics looks like 8d5017861e, which isn't included in this PR.

r? `@Amanieu`
2021-04-12 18:29:25 +00:00
Guillaume Gomez
b89c464bed
Improve code example for length comparison 2021-04-12 19:59:52 +02:00
Manish Goregaokar
664c3e71b8 Turn old edition lints (anonymous-parameters, keyword-idents) into warn-by-default on 2015 2021-04-12 09:45:59 -07:00
bors
1284da34da Auto merge of #84103 - calebcartwright:bump-rls-rustfmt, r=Xanewok
update RLS and rustfmt

Fixes #83460 and fixes #83459

cc `@Xanewok`
2021-04-12 15:59:35 +00:00
Aaron Hill
eb7b1a150f
Fix lookahead with None-delimited group 2021-04-12 11:50:16 -04:00
Manish Goregaokar
8e9882dbc4 Add css classes 2021-04-12 08:48:04 -07:00
Jacob Hoffman-Andrews
def144c2e7 Improve CSS for "hide contents, not items"
Introduce a first use of the `<details>` and `<summary>` tags as
replacements for the JS-built toggles. I think this has the potential to
replace all the JS toggles and generally clean up the JS, CSS, and HTML.

Split rendering of attributes into two cases: in the case where they are
rendered as descendents of a `<pre>` tag, where they use indent spaces and
newlines for formatting, matching their surrounding markup. In the case
where they are rendered as descendants of a `<code>` tag, they are
rendered as `<div>`. This let me clean up some fragile CSS that was
adjusting the margin-left of attributes depending on context.

Remove toggles for attributes. With the ALLOWED_ATTRIBUTES filter, it's
rare for an item to have more than one attribute, so hiding attributes
behind a toggle doesn't save any screen space in the common case.

Fix a couple of invocations of `matches!` that didn't compile on my
machine.

Fix a boolean for the JS `createToggle` call that was causing
"Expand description" to show up spuriously on already-expanded
descriptions.

Add JS for auto-hide settings and hide all / show all.

Remove a z-index property and some font color tweaks made unnecessary
by the <details> toggles.

Add CSS for the <details> toggles.
2021-04-12 08:48:01 -07:00
Manish Goregaokar
846a4e9b5c Update src/librustdoc/html/render/print_item.rs
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2021-04-12 08:45:45 -07:00
Manish Goregaokar
e2f59f41f9 Update src/librustdoc/html/render/print_item.rs
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2021-04-12 08:45:45 -07:00
Manish Goregaokar
256e594b0a rustdoc: Add setting for hiding large items 2021-04-12 08:45:45 -07:00
Manish Goregaokar
173cbecc66 rustdoc: smartly hide associated items of traits if there are too many of them 2021-04-12 08:45:45 -07:00
Manish Goregaokar
f146b9701d rustdoc: hide fields of structs/unions > 5 2021-04-12 08:45:45 -07:00
Manish Goregaokar
71c52acf32 rustdoc: hide variants of enums > 5 2021-04-12 08:45:45 -07:00
Manish Goregaokar
c96f86de30 rustdoc: Stop hiding entire item declarations 2021-04-12 08:45:45 -07:00
Mara Bos
b44ae964e2 Mark Duration::is_zero as rustc_const_stable. 2021-04-12 16:32:57 +02:00
Mara Bos
d1e23b8af8 Stabilize duration_zero. 2021-04-12 16:32:56 +02:00
Caleb Cartwright
e2fe4f2c61 update RLS and rustfmt 2021-04-12 09:01:17 -05:00
Joshua Nelson
1b0b7e95be Update stdarch submodule (to before it switched to const generics)
This also includes a cherry-pick of
ec1461905b
and https://github.com/rust-lang/stdarch/pull/1108 to fix a build
failure.

It also adds a re-export of various macros to the crate root of libstd -
previously they would show up automatically because std_detect was defined
in the same crate.
2021-04-12 09:39:04 -04:00
bors
5e73bd1040 Auto merge of #82300 - andersk:libtest-id, r=Amanieu
libtest: Index tests by a unique TestId

This more robustly avoids problems with duplicate `TestDesc`. See #81852 and #82274.

Cc `@Mark-Simulacrum.`
2021-04-12 13:30:30 +00:00
bjorn3
15bfd9da85 Introduce CompileMonoItem DepNode 2021-04-12 13:58:12 +02:00
bors
c18c0ad2bc Auto merge of #84068 - Amanieu:fix_lint, r=lcnr
Add `bad_asm_style` to  HardwiredLints

This was missed when the lint was added, which prevents the lint from being ignored with `#[allow]`.
2021-04-12 10:49:39 +00:00
bors
67e402f946 Auto merge of #84095 - infinity0:master, r=Mark-Simulacrum
bootstrap: check local_rebuild before adding --cfg=bootstrap, closes #84057
2021-04-12 08:03:59 +00:00
Jubilee Young
7baeaa95e2 Stabilize BTree{Map,Set}::retain 2021-04-12 00:01:31 -07:00
bors
d68f7a2f50 Auto merge of #84090 - marmeladema:stabilize-duration-saturating-ops, r=m-ou-se
Stabilize feature `duration_saturating_ops`

FCP here: https://github.com/rust-lang/rust/issues/76416#issuecomment-817201314

Closes #76416

r? `@m-ou-se`
2021-04-12 05:44:25 +00:00
bors
2c56db4e12 Auto merge of #84085 - m-ou-se:stabilize-atomic-fetch-update, r=kennytm
Stabilize atomic_fetch_update methods on AtomicBool and AtomicPtr.

FCP completed here: https://github.com/rust-lang/rust/issues/78639#issuecomment-817201315
2021-04-12 03:13:33 +00:00
bors
e41f378f82 Auto merge of #84112 - Dylan-DPC:rollup-tapsrzz, r=Dylan-DPC
Rollup of 7 pull requests

Successful merges:

 - #83669 (Issue 81508 fix)
 - #84014 (Improve trait/impl method discrepancy errors)
 - #84059 (Bump libc dependency of std to 0.2.93)
 - #84067 (clean up example on read_to_string)
 - #84079 (Improve test for `rustdoc::bare_urls` lint)
 - #84094 (Remove FixedSizeArray)
 - #84101 (rustdoc: Move crate loader to collect_intra_doc_links::early )

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-04-12 00:38:20 +00:00