Commit Graph

199251 Commits

Author SHA1 Message Date
Michael Howell
31071336f5 rustdoc: remove unneeded CSS .content table td:first-child > a
This rule was added in c1c6175e62 to benefit
the module items table. However, the module items table stopped using table
tags when 6020c79dde switched us over to grid
layout.
2022-09-01 11:38:54 -07:00
Gabriel Bustamante
8e82200277 Porting 'compiler/rustc_trait_selection' to translatable diagnostics - Part 1 2022-09-01 12:54:50 -05:00
Xiretza
9df75ee254 Revert parts of "use derive proc macro to impl SessionDiagnostic"
This reverts parts of commit ac638c1f5f.

During rebase, this commit accidentally reverted unrelated changes to
the subdiagnostic derive (those allowing multipart_suggestions to be
derived). This commit reverts all changes to the subdiagnostic code made
in ac638c1f5f, the next commit will reintroduce the actually intended
changes.
2022-09-01 19:42:49 +02:00
Adam-Gleave
33afe9724a Remove trailing whitespace 2022-09-01 17:32:00 +01:00
bors
9af618b62e Auto merge of #101239 - oli-obk:tracing_cleanup, r=estebank
Tracing cleanup

r? `@ghost`
2022-09-01 16:25:32 +00:00
111
b37e645d80 Migrate limit error 2022-09-01 23:35:38 +08:00
111
00cd965046 Migrate OpaqueHiddenType mismatch 2022-09-01 23:35:38 +08:00
111
3e834a7a62 Migrate DropCheckOverflow 2022-09-01 23:35:38 +08:00
Adam-Gleave
9d0542b76d Document eager evaluation of bool::then_some argument 2022-09-01 16:09:25 +01: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
Martin Nordholts
3810d4a368 unix_sigpipe: Make sigpipe param docs long-form 2022-09-01 06:45:04 +02:00
Chris Denton
630f831cd0
Use FILE_ATTRIBUTE_TAG_INFO to get reparse tag
This avoid unnecessarily getting the full reparse data when all we need is the tag.
2022-09-01 04:17:36 +01: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
klensy
45fac3472b update few crates to drop old deps 2022-08-31 23:35:57 +03: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
Jack Wrenn
fbcc038a22 safe transmute: use to_valtree to destructure const Assume
ref: https://github.com/rust-lang/rust/pull/100726#discussion_r954813220
2022-08-31 18:17:32 +00:00
Eric Holk
f921f5626d Use parent_iter instead of a find_parent_node loop 2022-08-31 11:15:38 -07:00
Nathan Stocks
30adfd6a17 port 5 new diagnostics that appeared in master 2022-08-31 10:56:42 -06:00