Commit Graph

167910 Commits

Author SHA1 Message Date
Michael Goulet
ef949daf03
Rollup merge of #96639 - adpaco-aws:fix-offset-from-typo, r=scottmcm
Fix typo in `offset_from` documentation

Small fix for what I think is a typo in the `offset_from` documentation.

Someone reading this may understand that the distance in bytes is obtained by dividing the distance by `mem::size_of::<T>()`, but here we just want to define "units of T" in terms of bytes (i.e., units of T == bytes / `mem::size_of::<T>()`).
2022-05-05 19:34:23 -07:00
Michael Goulet
87ad928c15
Rollup merge of #96174 - RalfJung:no-run-transmute, r=scottmcm
mark ptr-int-transmute test as no_run

This causes [CI failures in Miri](https://github.com/rust-lang/miri-test-libstd/runs/6062500259?check_suite_focus=true) since ptr-int-transmutes are rejected there (when strict provenance is enabled).
2022-05-05 19:34:22 -07:00
David Wood
3dac70fcc0 typeck: port "unconstrained opaque type" diag
Port the "unconstrained opaque type" diagnostic to using the diagnostic
derive.

Signed-off-by: David Wood <david.wood@huawei.com>
2022-05-06 03:04:30 +01:00
David Wood
80087b98cc bootstrap: bsd platform flags for split debuginfo
Bootstrap currently provides `-Zunstable-options` for OpenBSD when using
split debuginfo - this commit provides it for all BSD targets.

Signed-off-by: David Wood <david.wood@huawei.com>
2022-05-06 03:04:04 +01:00
Joshua Nelson
101f952265 Don't constantly rebuild clippy on x test src/tools/clippy.
This happened because the `SYSROOT` variable was set for `x test`, but not `x build`.
Set it consistently for both to avoid unnecessary rebuilds.
2022-05-05 20:40:01 -05:00
Michael Howell
903aebe318 Fix test case checking for where the JS goes 2022-05-05 18:26:47 -07:00
Joshua Nelson
7443cc2bd6 Enable compiler-docs by default for compiler, codegen, and tools profiles. 2022-05-05 20:05:12 -05:00
Michael Howell
20010d7597 rustdoc: ensure HTML/JS side implementors don't have dups 2022-05-05 17:45:33 -07:00
Scott McMurray
30309db972 Put the 2229 migration errors in alphabetical order
Looks like they were in FxHash order before, so it might just be luck that this used to be consistent across different word lengths.
2022-05-05 17:41:02 -07:00
Peh
e79ba76ec4 Fixing #95444 by only displaying passes that take more than 5 milliseconds
95444: Adding passes that include memory increase

Fix95444: Change the substraction with the abs_diff() method

Fix95444: Change the substraction with abs_diff() method
2022-05-05 23:56:40 +00:00
bors
74cea9fdb9 Auto merge of #96520 - lcnr:general-incoherent-impls, r=petrochenkov
generalize "incoherent impls" impl for user defined types

To allow the move of `trait Error` into core.

continues the work from #94963, finishes https://github.com/rust-lang/compiler-team/issues/487

r? `@petrochenkov` cc `@yaahc`
2022-05-05 23:24:36 +00:00
Yuki Okushi
2ed38cdbdd
Add track_caller to DefId::expect_local() 2022-05-06 07:28:06 +09:00
Yuki Okushi
436c0e129c
Fix an ICE on #96738 2022-05-06 07:15:35 +09:00
est31
4fcbc53820 Implement [OsStr]::join 2022-05-05 21:58:11 +02:00
Mara Bos
21c5f780f4 Remove condvar::two_mutexes test.
We don't guarantee this panics. On most platforms it doesn't anymore.
2022-05-05 21:47:13 +02:00
bors
30f3860875 Auto merge of #96735 - flip1995:clippyup, r=Manishearth
Update Clippy

r? `@Manishearth`
2022-05-05 19:28:41 +00:00
Guillaume Gomez
87b6326d67 Improve settings loading strategy by loading CSS and JS at the same time to prevent the style to be applied afterwards on slow connections 2022-05-05 20:19:40 +02:00
Aaron Hill
40c6d838cd
Don't cache results of coinductive cycle
Fixes #96319

The logic around handling co-inductive cycles in the evaluation cache
is confusing and error prone. Fortunately, a perf run showed that it
doesn't actually appear to improve performance, so we can simplify
this code (and eliminate a source of ICEs) by just skipping caching
the evaluation results for co-inductive cycle participants.

This commit makes no changes to any of the other logic around
co-inductive cycle handling. Thus, while this commit could
potentially expose latent bugs that were being hidden by
caching, it should not introduce any new bugs.
2022-05-05 14:01:35 -04:00
bors
50cf76c24b Auto merge of #96734 - matthiaskrgr:rollup-hng33tb, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #95359 (Update `int_roundings` methods from feedback)
 - #95843 (Improve Rc::new_cyclic and Arc::new_cyclic documentation)
 - #96507 (Suggest calling `Self::associated_function()`)
 - #96635 (Use "strict" mode in JS scripts)
 - #96673 (Report that opaque types are not allowed in impls even in the presence of other errors)
 - #96682 (Show invisible delimeters (within comments) when pretty printing.)
 - #96714 (interpret/validity: debug-check ScalarPair layout information)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-05-05 16:59:54 +00:00
Michael Howell
4c183cd2d4 rustdoc: fix JS error when rendering parse error 2022-05-05 09:39:47 -07:00
Michael Howell
75790fabed rustdoc: add test case assertions for ArrowDown highlight first result 2022-05-05 09:39:47 -07:00
Michael Howell
8b2147b497 rustdoc: fix keyboard shortcuts and console log on search page 2022-05-05 09:39:45 -07:00
Michael Howell
21a121332b rustdoc: change the "In Function Signatures" to context-sensitive
* If it's just `-> a`, use "In Function Return Types"
* If it's just `a b`, use "In Function Parameters"
* Otherwise, still use "In Function Signatures"
2022-05-05 09:37:29 -07:00
Michael Howell
345a580e8d Use STARTS_WITH, since it's more specific
Co-Authored-By: Guillaume Gomez <guillaume1.gomez@gmail.com>
2022-05-05 09:37:29 -07:00
Michael Howell
6c8a2d4715 rustdoc: when running a function-signature search, tweak the tab bar 2022-05-05 09:37:29 -07:00
flip1995
f47d2b3ad6
(Partially) Revert "HACK: Move buggy lints to nursery"
This reverts commit bb01aca86f.

Partial: Keep regression tests
2022-05-05 15:20:07 +01:00
flip1995
463c760aa1
Update Cargo.lock 2022-05-05 15:13:10 +01:00
flip1995
496384531e
Merge commit '7c21f91b15b7604f818565646b686d90f99d1baf' into clippyup 2022-05-05 15:12:52 +01:00
Matthias Krüger
68048199c9
Rollup merge of #96714 - RalfJung:scalar-pair-debug, r=oli-obk
interpret/validity: debug-check ScalarPair layout information

This would have caught https://github.com/rust-lang/rust/issues/96158.
I ran the Miri test suite and it still passes.

r? `@oli-obk`
2022-05-05 15:43:07 +02:00
Matthias Krüger
7a915dd80d
Rollup merge of #96682 - nnethercote:show-invisible-delims, r=petrochenkov
Show invisible delimeters (within comments) when pretty printing.

Because invisible syntax is really hard to work with!

r? `@petrochenkov`
2022-05-05 15:43:05 +02:00
Matthias Krüger
5f8a2f6080
Rollup merge of #96673 - oli-obk:tait_impl_diagnostic, r=petrochenkov
Report that opaque types are not allowed in impls even in the presence of other errors

fixes  #96569

before this PR those useful errors were hidden because either `unused parameter` or `only traits defined in the current crate can be implemented for arbitrary types` got emitted first.
2022-05-05 15:43:05 +02:00
Matthias Krüger
9520641e2a
Rollup merge of #96635 - GuillaumeGomez:js-script-mode, r=notriddle
Use "strict" mode in JS scripts

Part of #93058.

r? `@notriddle`
2022-05-05 15:43:04 +02:00
Matthias Krüger
34bf620ac9
Rollup merge of #96507 - TaKO8Ki:suggest-calling-associated-function, r=lcnr
Suggest calling `Self::associated_function()`

closes #96453
2022-05-05 15:43:03 +02:00
Matthias Krüger
3f07303efe
Rollup merge of #95843 - GuillaumeGomez:improve-new-cyclic-doc, r=m-ou-se
Improve Rc::new_cyclic and Arc::new_cyclic documentation

Fixes https://github.com/rust-lang/rust/issues/95672.

cc `@CAD97` (since I used your explanations)
2022-05-05 15:43:02 +02:00
Matthias Krüger
47801413d9
Rollup merge of #95359 - jhpratt:int_roundings, r=joshtriplett
Update `int_roundings` methods from feedback

This updates `#![feature(int_roundings)]` (#88581) from feedback. All methods now take `NonZeroX`. The documentation makes clear that they panic in debug mode and wrap in release mode.

r? `@joshtriplett`

`@rustbot` label +T-libs +T-libs-api +S-waiting-on-review
2022-05-05 15:43:00 +02:00
Gary Guo
5b5ac28c64 Bless clippy error msg 2022-05-05 14:27:11 +01:00
bors
7c21f91b15 Auto merge of #8788 - flip1995:rustup, r=xFrednet,flip1995
Rustup

r? `@ghost`

changelog: move trait_duplication_in_bounds and type_repetition_in_bounds to nursery temporarily. This could already be reverted before the release. Check the Clippy in the Rust repo beta branch when writing this changelog.
2022-05-05 13:12:09 +00:00
flip1995
006282964f
Fix ICE in EarlyAttribtues lints 2022-05-05 14:10:06 +01:00
flip1995
bb01aca86f
HACK: Move buggy lints to nursery
Those lints are trait_duplication_in_bounds and
type_repetition_in_bounds. I don't think those can be fixed on the
Clippy side alone, but need changes in the compiler. So let's move them
to nursery to get the sync through and then fix them on the rustc side.

Also adds a regression test that has to be fixed before they can be
moved back to pedantic.
2022-05-05 13:32:31 +01:00
flip1995
7e017dbe8d
Bump nightly version -> 2022-05-05 2022-05-05 13:32:18 +01:00
flip1995
3b0c78d283
Merge remote-tracking branch 'upstream/master' into rustup 2022-05-05 13:32:06 +01:00
lcnr
321162b259 update error messages and explicitly mention them in tests 2022-05-05 14:29:24 +02:00
bors
a7d6768e3b Auto merge of #91779 - ridwanabdillahi:natvis, r=michaelwoerister
Add a new Rust attribute to support embedding debugger visualizers

Implemented [this RFC](https://github.com/rust-lang/rfcs/pull/3191) to add support for embedding debugger visualizers into a PDB.

Added a new attribute `#[debugger_visualizer]` and updated the `CrateMetadata` to store debugger visualizers for crate dependencies.

RFC: https://github.com/rust-lang/rfcs/pull/3191
2022-05-05 12:26:38 +00:00
Yuki Okushi
cb131d2b4a
Add a regression test for #64173 and #66152 2022-05-05 20:03:34 +09:00
bors
322a14919d Auto merge of #96649 - tbu-:pr_to_ipv4_loopback_doc, r=m-ou-se
Make it clear that `to_ipv4` returns an IPv4 address for the IPv6 loopback
2022-05-05 09:45:53 +00:00
Guillaume Gomez
13b45aa6c6 Add rotation animation on settings button when loading 2022-05-05 11:08:15 +02:00
Guillaume Gomez
1e204ddb3b Use "strict" mode in JS scripts 2022-05-05 11:07:14 +02:00
Oli Scherer
a75d559e24 Add known bug cases 2022-05-05 09:02:43 +00:00
lcnr
ba0ecbdcd4 forbid empty impls for types with incoherent impls 2022-05-05 10:54:47 +02:00
lcnr
dc184b4e17 remove unnecessary check 2022-05-05 10:53:00 +02:00