Commit Graph

199060 Commits

Author SHA1 Message Date
bors
9af618b62e Auto merge of #101239 - oli-obk:tracing_cleanup, r=estebank
Tracing cleanup

r? `@ghost`
2022-09-01 16:25:32 +00:00
Oli Scherer
3f1f694ca5 Adjust stderr file 2022-09-01 14:54:27 +00:00
Oli Scherer
1fc9ef1edd tracing::instrument cleanup 2022-09-01 14:54:27 +00:00
Oli Scherer
ee3c835018 Always import all tracing macros for the entire crate instead of piecemeal by module 2022-09-01 14:54:27 +00:00
Oli Scherer
d3b22c7267 Directly use the instrument macro instead of its full path 2022-09-01 14:53:46 +00:00
Takayuki Maeda
78e9bea598 do not suggest adding move to closure when move is already used 2022-09-01 23:50:51 +09:00
Vadim Petrochenkov
a0e21ff105 rustc_target: Refactor internal linker flavors slightly
Remove one unstable user-facing linker flavor (l4-bender)
2022-09-01 16:54:52 +03:00
Vadim Petrochenkov
7dc186ff7e rustc_target: Add a compatibility layer to separate internal and user-facing linker flavors 2022-09-01 16:54:52 +03:00
bors
fb888117da Auto merge of #100606 - cuviper:upgrade-linux-ci, r=Mark-Simulacrum
ci: Upgrade non-dist Linux testers from ubuntu:16.04 to 22.04

The main goal of updating to 22.04 is to get away from `llvm.allow-old-toolchain`.
A side benefit is that they can also use the system `cmake` instead of building one.
2022-09-01 13:21:03 +00:00
Guillaume Gomez
68d0094305 Add regression test for #101129 2022-09-01 14:31:41 +02:00
Guillaume Gomez
fb14ad06fa Correctly merge impl block cfg attributes with its parents 2022-09-01 14:31:27 +02:00
Guillaume Gomez
f5857d5c5e Move error code book into a sub folder 2022-09-01 13:38:00 +02:00
Nixon Enraght-Moony
c9f4af6e11 Fix typo in comment 2022-09-01 12:09:42 +01:00
bors
4f9898a794 Auto merge of #100958 - mikebenfield:workaround, r=nikic
compiler/rustc_codegen_ssa/src/mir/place.rs: Remove LLVM bug workaround

This memset was inserted as a workaround to Rust issue #34427, which was
an LLVM bug that apparently no longer manifests.
2022-09-01 10:30:10 +00:00
Quinn Painter
098725c2e2
Fix filename of armv4t-none-eabi.md
The filename differed from the link in SUMMARY.md, causing it to 404.
2022-09-01 10:23:15 +01:00
Mara Bos
a20318d94b Update outdated comment about output capturing in print_to. 2022-09-01 11:20:08 +02:00
bors
eac6c33bc6 Auto merge of #100869 - nnethercote:replace-ThinVec, r=spastorino
Replace `rustc_data_structures::thin_vec::ThinVec` with `thin_vec::ThinVec`

`rustc_data_structures::thin_vec::ThinVec` looks like this:
```
pub struct ThinVec<T>(Option<Box<Vec<T>>>);
```
It's just a zero word if the vector is empty, but requires two
allocations if it is non-empty. So it's only usable in cases where the
vector is empty most of the time.

This commit removes it in favour of `thin_vec::ThinVec`, which is also
word-sized, but stores the length and capacity in the same allocation as
the elements. It's good in a wider variety of situation, e.g. in enum
variants where the vector is usually/always non-empty.

The commit also:
- Sorts some `Cargo.toml` dependency lists, to make additions easier.
- Sorts some `use` item lists, to make additions easier.
- Changes `clean_trait_ref_with_bindings` to take a
  `ThinVec<TypeBinding>` rather than a `&[TypeBinding]`, because this
  avoid some unnecessary allocations.

r? `@spastorino`
2022-09-01 08:01:06 +00:00
bors
b32223fec1 Auto merge of #100707 - dzvon:fix-typo, r=davidtwco
Fix a bunch of typo

This PR will fix some typos detected by [typos].

I only picked the ones I was sure were spelling errors to fix, mostly in
the comments.

[typos]: https://github.com/crate-ci/typos
2022-09-01 05:39:58 +00:00
bors
aa857eb953 Auto merge of #100537 - petrochenkov:piccheck, r=oli-obk
rustc_target: Add some more target spec sanity checking
2022-09-01 03:13:46 +00:00
Andrew Pollack
d8b572b820 Tweaks to fuchsia doc walkthrough 2022-09-01 00:35:30 +00:00
bors
3892b7074d Auto merge of #100210 - mystor:proc_macro_diag_struct, r=eddyb
proc_macro/bridge: send diagnostics over the bridge as a struct

This removes some RPC when creating and emitting diagnostics, and
simplifies the bridge slightly.

After this change, there are no remaining methods which take advantage
of the support for `&mut` references to objects in the store as
arguments, meaning that support for them could technically be removed if
we wanted. The only remaining uses of immutable references into the
store are `TokenStream` and `SourceFile`.

r? `@eddyb`
2022-09-01 00:26:53 +00:00
Michael Howell
037a911bd8 rustdoc: remove unused .docblock .impl-items CSS
The impl-items list stopped being nested inside a docblock since c1b1d6804b
2022-08-31 15:47:48 -07:00
bors
db00199d99 Auto merge of #101249 - matthiaskrgr:rollup-wahnoz8, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - #100787 (Pretty printing give proper error message without panic)
 - #100838 (Suggest moving redundant generic args of an assoc fn to its trait)
 - #100844 (migrate rustc_query_system to use SessionDiagnostic)
 - #101140 (Update Clippy)
 - #101161 (Fix uintended diagnostic caused by `drain(..)`)
 - #101165 (Use more `into_iter` rather than `drain(..)`)
 - #101229 (Link “? operator” to relevant chapter in The Book)
 - #101230 (lint: avoid linting diag functions with diag lints)
 - #101236 (Avoid needless buffer zeroing in `std::sys::windows::fs`)
 - #101240 (Fix a typo on `wasm64-unknown-unknown` doc)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-08-31 21:45:18 +00:00
Matt Hamrick
a928255ab1
Fix bad target name in Walkthrough
Walkthrough currently say:

```
rustup target add aarch_64-fuchsia
```
but should say

```
rustup target add aarch64-fuchsia
```
2022-08-31 13:21:47 -07:00
Matthias Krüger
14d216d33b
Rollup merge of #101240 - JohnTitor:JohnTitor-patch-1, r=ehuss
Fix a typo on `wasm64-unknown-unknown` doc
2022-08-31 21:30:18 +02:00
Matthias Krüger
3da66f0353
Rollup merge of #101236 - thomcc:winfs-nozero, r=ChrisDenton
Avoid needless buffer zeroing in `std::sys::windows::fs`

Followup to https://github.com/rust-lang/rust/pull/101171 and https://github.com/rust-lang/rust/pull/101193. This finishes up avoiding buffer zeroing pointed out in https://github.com/rust-lang/rust/pull/100729#issuecomment-1220055311 (thanks!)

r? `@ChrisDenton`
2022-08-31 21:30:17 +02:00
Matthias Krüger
0620f6e90a
Rollup merge of #101230 - davidtwco:translation-internal-lint-no-self-lint, r=fee1-dead
lint: avoid linting diag functions with diag lints

Functions annotated with `#[rustc_lint_diagnostics]` are used by the diagnostic migration lints to know when to lint, but functions that are annotated with this attribute shouldn't themselves be linted.

cc #100717 https://github.com/rust-lang/rust/pull/101041#discussion_r959303706
2022-08-31 21:30:16 +02:00
Matthias Krüger
c30c42ee29
Rollup merge of #101229 - mgeisler:link-try-operator, r=thomcc
Link “? operator” to relevant chapter in The Book

Before, the text simply asked people to use a symbol which is hard to
search for. Now the text links back to the chapter on error
propagation in The Book. That should help people find the relevant
keywords for further searches.
2022-08-31 21:30:15 +02:00
Matthias Krüger
e5356712b9
Rollup merge of #101165 - ldm0:drain_to_iter, r=cjgillot
Use more `into_iter` rather than `drain(..)`

Clearer semantic.
2022-08-31 21:30:13 +02:00
Matthias Krüger
f378155fb6
Rollup merge of #101161 - ldm0:ldm_fix_diagnostic, r=cjgillot
Fix uintended diagnostic caused by `drain(..)`

Calling `drain(..)` makes later `suggestable_variants.is_empty()` always true, which makes the diagnostics unintended.
2022-08-31 21:30:12 +02:00
Matthias Krüger
ba0011cbfb
Rollup merge of #101140 - Jarcho:clippyup, r=Jarcho
Update Clippy

r? ```@Manishearth```
2022-08-31 21:30:11 +02:00
Matthias Krüger
22c5c83a68
Rollup merge of #100844 - evopen:migrate-diag, r=davidtwco
migrate rustc_query_system to use SessionDiagnostic

issues:
* variable list is not supported in fluent
* ~~cannot have two sub diagnostic with the same tag (eg. 2 .note or 2 .help)~~

allow multiple tag with SessionSubdiagnostic derive
2022-08-31 21:30:09 +02:00
Matthias Krüger
2af2cda32a
Rollup merge of #100838 - hkmatsumoto:move-gen-args-to-trait-when-appropriate, r=davidtwco
Suggest moving redundant generic args of an assoc fn to its trait

Closes #89064
2022-08-31 21:30:08 +02:00
Matthias Krüger
6438f4addc
Rollup merge of #100787 - chenyukang:fix-100770-pretty-crash, r=petrochenkov
Pretty printing give proper error message without panic

Fixes #100770
2022-08-31 21:30:07 +02:00
bors
9243168fa5 Auto merge of #100085 - RalfJung:op-ty-len, r=oli-obk
interpret: use new OpTy::len for Len rvalue

This avoids a `force_allocation`.
2022-08-31 18:42:49 +00:00
Guillaume Gomez
117169799f Generate error index with mdbook instead of raw HTML pages 2022-08-31 20:31:22 +02:00
Guillaume Gomez
b112bfeda9 Add rustdoc GUI test 2022-08-31 18:13:59 +02:00
Guillaume Gomez
4304d1d1e6 Update rustdoc tests 2022-08-31 18:13:39 +02:00
Guillaume Gomez
803e35abf7 Remove unneeded extra whitespace before where clause 2022-08-31 18:13:39 +02:00
Jason Newcomb
7ed133324a Use CountIsStart in clippy 2022-08-31 09:45:51 -04:00
Yuki Okushi
cacc7bf5f0
Fix a typo on wasm64-unknown-unknown doc 2022-08-31 22:27:37 +09:00
Jason Newcomb
9a677674b3 Merge commit 'f51aade56f93175dde89177a92e3669ebd8e7592' into clippyup 2022-08-31 09:24:45 -04:00
Ralf Jung
7913edb5c7 fix a clippy test 2022-08-31 15:24:40 +02:00
Ralf Jung
d814d10069 interpret: use new OpTy::len for Len rvalue
This avoids a `force_allocation`
2022-08-31 15:22:44 +02:00
bors
4fd4de7ea3 Auto merge of #101238 - RalfJung:rollup-bzcmobj, r=RalfJung
Rollup of 7 pull requests

Successful merges:

 - #90946 (Ignore `reference`s in "Type::inner_def_id")
 - #100730 (Migrate rustc_monomorphize to use SessionDiagnostic)
 - #100753 (translations(rustc_session): migrates `rustc_session` to use `SessionDiagnostic` - Pt. 1)
 - #100831 (Migrate `symbol_mangling` module to new diagnostics structs)
 - #101204 (rustdoc: Resugar async fn return type in `clean`, not `html`)
 - #101216 (Use in-page links for sanitizer docs.)
 - #101237 (fix into_iter on ZST)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-08-31 13:01:38 +00:00
David Wood
11fc7852fe lint: avoid linting diag functions with diag lints
Functions annotated with `#[rustc_lint_diagnostics]` are used by the
diagnostic migration lints to know when to lint, but functions that are
annotated with this attribute shouldn't themselves be linted.

Signed-off-by: David Wood <david.wood@huawei.com>
2022-08-31 13:48:11 +01:00
Ralf Jung
2a02882667
Rollup merge of #101237 - RalfJung:into-iter-zst, r=thomcc
fix into_iter on ZST

Fixes https://github.com/rust-lang/rust/issues/101235
Thanks to `@ChrisDenton` for [spotting the problem](https://github.com/rust-lang/rust/pull/100819#pullrequestreview-1091755930).
2022-08-31 14:29:55 +02:00
Ralf Jung
cc02024fda
Rollup merge of #101216 - ehuss:sanitizer-links, r=JohnTitor
Use in-page links for sanitizer docs.

This updates the sanitizer documentation page so that the links in the summary at the top jump to the relevant sections within the page instead of leading away to a different site. I think this makes it a little easier to navigate this page which has gotten quite long.

This also fixes the broken link for MemTagSanitizer which was not defined.  It also adds MemTagSanitizer to the external summary list at the bottom of the page.
2022-08-31 14:29:54 +02:00
Ralf Jung
8ed9ac658a
Rollup merge of #101204 - aDotInTheVoid:async-resugar-in-clean, r=GuillaumeGomez
rustdoc: Resugar async fn return type in `clean`, not `html`

This way it also happens for json output.

Fixes #101199

r? ``@GuillaumeGomez``
2022-08-31 14:29:54 +02:00
Ralf Jung
59d2c1917a
Rollup merge of #100831 - JhonnyBillM:migrate-symbol-mangling-to-diagnostics-structs, r=davidtwco
Migrate `symbol_mangling` module to new diagnostics structs
2022-08-31 14:29:53 +02:00