Matthias Krüger
1cdcf508bb
Rollup merge of #100663 - clarfonthey:const-reverse, r=scottmcm
...
Make slice::reverse const
I remember this not being doable for some reason before, but decided to try it again and everything worked out in the tests.
2022-08-21 16:54:01 +02:00
Matthias Krüger
a5c16a5381
Rollup merge of #100556 - Alex-Velez:patch-1, r=scottmcm
...
Clamp Function for f32 and f64
I thought the clamp function could use a little improvement for readability purposes. The function now returns early in order to skip the extra bound checks.
If there was a reason for binding `self` to `x` or if this code is incorrect, please correct me :)
2022-08-21 16:54:01 +02:00
bors
3130203309
Auto merge of #100841 - RalfJung:miri, r=RalfJung
...
update Miri
Fixes https://github.com/rust-lang/rust/issues/100779
2022-08-21 13:54:06 +00:00
Jhonny Bill Mena
c835d9c0d2
ADD - diagnostic lints to rustc_transmute
...
Module is complete because it has zero diagnostics.
2022-08-21 09:17:09 -04:00
Ralf Jung
4df65c3682
update Miri
2022-08-21 08:57:07 -04:00
Xiretza
ffcaa0dee2
Migrate diagnostics in parser/expr to SessionDiagnostic
2022-08-21 14:54:05 +02:00
Maybe Waffle
efef211876
Make use of pointer::is_aligned[_to]
2022-08-21 15:46:03 +04:00
Maybe Waffle
5d5e451618
recover const Tr
bounds (no ~
)
2022-08-21 14:58:42 +04:00
bors
4b695f7c4e
Auto merge of #100765 - Xiretza:session-diagnostic-unification, r=compiler-errors
...
Kind-less SessionDiagnostic derive
From https://github.com/rust-lang/rust/pull/100730#discussion_r949712629 :
> Hm, maybe we should expose some `sess.struct_$SOMETHING` (like `struct_diagnostic`?) that is generic over `EmissionGuarantee`, then make the `SessionDiagnostic` derive generic, i.e.
>
> ```rust
> impl<'tcx> SessionDiagnostic for UnusedGenericParams {
> fn into_diagnostic<T: EmissionGuarantee>( .. ) -> DiagnosticBuilder<'tcx, T> {
> let mut diag = sess.struct_diagnostic(rustc_errors:..);
> ..
> }
> }
> ```
Discussed [on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/147480-t-compiler.2Fwg-diagnostics/topic/.23100717.20translation.20-.20kind-less.20derive ).
2022-08-21 10:04:42 +00:00
Nelson Chen
7abbfa8c41
Make doc for stdin field of process consistent
...
The other fields use this format and example.
2022-08-21 01:56:26 -07:00
Thom Chiovoloni
4ecf87619c
Fix redundant comparison
2022-08-21 01:08:33 -07:00
bors
39a9b88f4e
Auto merge of #100627 - krasimirgg:lto-llvm-16, r=cuviper
...
llvm-wrapper: adapt for LLVM API change
No functional changes intended.
LLVM commit 633f5663c3
removed `createWriteThinLTOBitcodePass`.
This adapts PassWrapper similarly to the example mentioned upstream: 853b57fe80
.
Detected via our experimental rust + llvm @ head bot: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/12768#0182a6be-ed6e-4dc6-a230-7a46f9d3a2c2/205-537
2022-08-21 07:19:49 +00:00
Xiretza
7f3a6fd7f6
Replace #[lint/warning/error] with #[diag]
2022-08-21 09:17:43 +02:00
Xiretza
bd0d3f745d
Disallow #[primary_span] on LintDiagnostics
2022-08-21 09:17:43 +02:00
Xiretza
a960f8304c
Make derived SessionDiagnostics generic on diagnostic level
...
Deriving SessionDiagnostic on a type no longer forces that diagnostic to
be one of warning, error, or fatal. The level is instead decided when
the struct is passed to the respective Handler::emit_*() method.
2022-08-21 09:17:43 +02:00
Xiretza
91ad4e38f5
Add Handler::struct_diagnostic()
...
This unifies the struct_{warn,error,fatal}() methods in one generic
method.
2022-08-21 09:17:43 +02:00
Eric Huss
757913df08
bootstrap: Don't allow rustfmt to fail on dist.
...
When running `x.py dist`, rustfmt was being allowed to fail when
missing-tools is true. This isn't much of an issue in practice
since other CI jobs will fail if rustfmt fails. This code was just
leftovers from when rustfmt was tracked in toolstate, and this removes
it to make it clear that it no longer works that way.
2022-08-20 22:24:31 -07:00
Eric Huss
45e2fc3d4f
Remove Steve from toolstate failure notices.
...
They have not been involved in a while.
2022-08-20 22:11:27 -07:00
Eric Huss
3b1b35bf03
Remove rustfmt from publish_toolstate
...
Rustfmt is no longer tracked in toolstate, so this isn't necessary.
2022-08-20 22:08:50 -07:00
Eric Huss
12386da38a
bootstrap: Remove some unused fields from the tool_extended macro.
2022-08-20 22:07:04 -07:00
bors
aa8e761def
Auto merge of #100624 - GuillaumeGomez:update-minifier-version, r=nnethercote
...
Update minifier version to 0.2.2
Following [this PR](https://github.com/GuillaumeGomez/minifier-rs/pull/98 ), the CSS minification should be much faster now (thanks to `@nnethercote).`
r? `@nnethercote`
2022-08-21 04:21:06 +00:00
Michael Goulet
d577eb09e5
Bless tests after #100769
2022-08-21 04:04:05 +00:00
Maybe Waffle
b2625e24b9
fix nitpicks from review
2022-08-21 06:36:11 +04:00
Michael Goulet
5212ac9dac
Make check for overlapping closure span more accurate
2022-08-21 02:35:11 +00:00
Michael Goulet
d2f54b1990
Adjust messages, address some nits
2022-08-21 02:35:11 +00:00
Michael Goulet
2a16a127a0
More docs
2022-08-21 02:35:11 +00:00
Michael Goulet
8917894fda
Targeted fixes addressing erroneous suggestions
2022-08-21 02:35:11 +00:00
Michael Goulet
6848ba2665
Comment a bit, use find_ancestor_in_same_ctxt to suppress some weird macro notes
2022-08-21 02:35:11 +00:00
Michael Goulet
292ab399b3
Point at struct field if possible
2022-08-21 02:35:11 +00:00
Michael Goulet
c0c6603c79
Deduplicate errors that come from places like normalization, sized
2022-08-21 02:35:11 +00:00
Michael Goulet
24559ce2fe
Prefer non-Self non-method types over Self, first
2022-08-21 02:35:11 +00:00
Michael Goulet
c8746766cb
Rework ambiguity errors
2022-08-21 02:35:11 +00:00
Michael Goulet
70b29f7c2d
Note closure kind mismatch cause
2022-08-21 02:35:11 +00:00
Michael Goulet
52e2065ed4
Revert closure mismatch spans
2022-08-21 02:34:52 +00:00
Michael Goulet
3a1aa3c76e
Do not favor projection type when pointing out arg causing fulfillment error
2022-08-21 02:34:52 +00:00
Michael Goulet
c9cb19d26e
Skip mentioning lang item
2022-08-21 02:34:52 +00:00
Michael Goulet
d05fea6ac4
Account for relative paths
2022-08-21 02:34:52 +00:00
Michael Goulet
c005e760f5
Rework point-at-arg
2022-08-21 02:34:52 +00:00
bors
f2858b5cd3
Auto merge of #100536 - Alexendoo:bootstrap-tls-model, r=Mark-Simulacrum
...
bootstrap: don't apply `-Ztls-model=initial-exec` to proc macros
Potentially fixes #100530
r? `@bjorn3`
2022-08-21 01:34:05 +00:00
bors
fb80d2bfe4
Auto merge of #99967 - Mark-Simulacrum:download-llvm-ci, r=jyn514
...
Download, rather than sccache-cache, LLVM in CI
My hope/expectation is that we can do better than sccache in CI for cached builds -- currently it looks like on macOS those still take upwards of 10-11 minutes, which is a significant amount of time that we could potentially cut.
This enables this mode for all non-dist builders; this should avoid any problems with the artifacts we distribute, while also providing for faster test builders (since they'll make use of PGO'd LLVM on the platforms we do that on, which is hopefully a nice win). It slightly increases the chance of test builders starting to fail only after a PR is merged (if PGO changes runtime behavior), but that should hopefully never happen, so I think this is worthwhile.
Measurements on the PR for apple-1 don't show any noticeable improvement in CI times, but those can be pretty noisy -- I'm inclined to land this since it *should* pretty much always be better and we can reconsider if that ever turns out not to be the case.
2022-08-20 22:49:36 +00:00
Maybe Waffle
3ba393465f
Make some docs nicer wrt pointer offsets
2022-08-21 02:22:20 +04:00
Maybe Waffle
bd1ab72406
Replace most uses of pointer::offset
with add
and sub
2022-08-21 02:21:41 +04:00
Maybe Waffle
e4720e1cf2
Replace most uses of pointer::offset
with add
and sub
2022-08-21 02:21:41 +04:00
Cameron Steffen
17ddcb434b
Improve primitive/std docs separation and headers
2022-08-20 16:50:29 -05:00
Maybe Waffle
ed084ba292
Remove useless pointer cast
2022-08-21 01:32:40 +04:00
scottmcm
03146471b5
Allow other directives before the ret
2022-08-20 21:08:56 +00:00
bors
878aef79dc
Auto merge of #100810 - matthiaskrgr:rollup-xep778s, r=matthiaskrgr
...
Rollup of 9 pull requests
Successful merges:
- #97963 (net listen backlog set to negative on Linux.)
- #99935 (Reenable disabled early syntax gates as future-incompatibility lints)
- #100129 (add miri-test-libstd support to libstd)
- #100500 (Ban references to `Self` in trait object substs for projection predicates too.)
- #100636 (Revert "Revert "Allow dynamic linking for iOS/tvOS targets."")
- #100718 ([rustdoc] Fix item info display)
- #100769 (Suggest adding a reference to a trait assoc item)
- #100777 (elaborate how revisions work with FileCheck stuff in src/test/codegen)
- #100796 (Refactor: remove unnecessary string searchings)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-08-20 20:08:26 +00:00
Nilstrieb
0c3ed968a2
Add /build-rust-analyzer/
to .gitignore
...
To avoid rust-analyzer and rustc having to wait for each other,
the dev guide mentions using another build directory for RA.
We should also put this into the .gitignore, just like the normal `build`.
2022-08-20 21:07:13 +02:00
Matthias Krüger
d793cd266c
Rollup merge of #100796 - TaKO8Ki:remove-unnecessary-string-searching, r=compiler-errors
...
Refactor: remove unnecessary string searchings
This patch removes unnecessary string searchings for checking if function arguments have `&` and `&mut`.
2022-08-20 19:45:17 +02:00
Matthias Krüger
44894a7c51
Rollup merge of #100777 - pnkfelix:expand-codegen-tests-readme, r=TaKO8Ki
...
elaborate how revisions work with FileCheck stuff in src/test/codegen
elaborate how revisions work with FileCheck stuff in src/test/codegen
2022-08-20 19:45:16 +02:00