Commit Graph

234050 Commits

Author SHA1 Message Date
León Orell Valerian Liehr
64fa12a4fb
rustdoc: hide repr(transparent) if it isn't part of the public ABI 2023-09-18 19:30:10 +02:00
bors
cbcf9a5368 Auto merge of #115795 - Kobzol:opt-dist-custom, r=Mark-Simulacrum
Refactor `opt-dist` to simplify local building

This PR refactors the `opt-dist` tool to make it easier to invoke it locally, outside of CI, and thus simplify building PGO/BOLT optimized `rustc` builds e.g. for distro maintainers. It should also make it easier to run the PGO/BOLT workflow locally e.g. to profile performance or debug issues (looking at you, https://github.com/rust-lang/rust/pull/115554).
2023-09-18 14:26:40 +00:00
bors
de68911f4a Auto merge of #115929 - matthiaskrgr:rollup-hhasy22, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #115558 (issue has since been fixed)
 - #115724 (Add myself to the mailmap)
 - #115811 (Make AIX known by bootstrap)
 - #115838 (inspect: closer to proof trees for coherence)
 - #115902 (Fix up a few CI images)
 - #115907 (nop_lift macros: ensure that we are using the right interner)
 - #115908 (Do not clone MIR for const-prop lint.)
 - #115916 (Add me as on vacation)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-09-18 11:56:46 +00:00
Jakub Beránek
ee451f8fac
Fix build on Windows 2023-09-18 13:45:42 +02:00
Matthias Krüger
5290cc9f23
Rollup merge of #115916 - jackh726:vacation, r=jackh726
Add me as on vacation
2023-09-18 13:02:20 +02:00
Matthias Krüger
c101c5fa50
Rollup merge of #115908 - cjgillot:lint-noclone, r=oli-obk
Do not clone MIR for const-prop lint.

Addresses https://github.com/rust-lang/rust/pull/115797#issuecomment-1721250533
2023-09-18 13:02:20 +02:00
Matthias Krüger
0d29cdd187
Rollup merge of #115907 - RalfJung:interner-check, r=compiler-errors
nop_lift macros: ensure that we are using the right interner

Right now someone could put down the wrong list name when using these macros, and everything would still build. Nothing does a type-check to ensure that the `$set` contains element of type `Self::Lifted`. Let's fix that.

For lists this is fairly easy; for the other interners we need to unwrap some newtypes which makes this more complicated.
2023-09-18 13:02:19 +02:00
Matthias Krüger
497701876f
Rollup merge of #115902 - Mark-Simulacrum:bump-ci, r=albertlarsan68
Fix up a few CI images

This forward-ports changes made on the stable branch to fix CI (https://github.com/rust-lang/rust/pull/115787).
2023-09-18 13:02:19 +02:00
Matthias Krüger
944c4134d2
Rollup merge of #115838 - lcnr:added-goals, r=compiler-errors
inspect: closer to proof trees for coherence

a continuation of #115751. Now explicitly store the added goals

r? ```@compiler-errors```
2023-09-18 13:02:18 +02:00
Matthias Krüger
c843ac2ad9
Rollup merge of #115811 - bzEq:make-aix-known, r=Mark-Simulacrum
Make AIX known by bootstrap

Use `x.py` to build rustc on AIX directly is failing
```
unknown OS type: AIX
Build completed unsuccessfully in 0:00:00
```
If kernel is `AIX`, we should return default triple `powerpc64-ibm-aix` for current rustc.
2023-09-18 13:02:18 +02:00
Matthias Krüger
5a8e8e5577
Rollup merge of #115724 - tgross35:mailmap, r=Mark-Simulacrum
Add myself to the mailmap
2023-09-18 13:02:17 +02:00
Matthias Krüger
2e38432525
Rollup merge of #115558 - tshepang:patch-4, r=Mark-Simulacrum
issue has since been fixed
2023-09-18 13:02:17 +02:00
bors
078eb1120a Auto merge of #115923 - weihanglo:update-cargo, r=weihanglo
Update cargo

6 commits in d5336f813df39d476e61fc46daabb1446350660a..b4ddf95ad9954118ac0dae835f2966394ad04c02
2023-09-14 19:55:49 +0000 to 2023-09-18 03:48:09 +0000
- doc: differentiate defaults for split-debuginfo (rust-lang/cargo#12680)
- feat(cli): Add '-n' to dry-run (rust-lang/cargo#12660)
- feat: stabilize credential-process and registry-auth (rust-lang/cargo#12649)
- refactor: use `RegistryOrIndex` enum to replace two booleans (rust-lang/cargo#12677)
- doc: clarify caret requirements (rust-lang/cargo#12679)
- feat(pkgid): Allow incomplete versions when unambigious (rust-lang/cargo#12614)

r? ghost
2023-09-18 07:07:28 +00:00
bors
24bb8842cb Auto merge of #115831 - nnethercote:remove-unused-Lift-impls, r=bjorn3
Remove unused `Lift` impls

r? `@bjorn3`
2023-09-18 05:20:15 +00:00
Weihang Lo
1d65446590
Update cargo 2023-09-18 12:50:34 +08:00
bors
df99bc151a Auto merge of #108043 - a1phyr:string_write_fmt, r=workingjubilee
Small wins for formatting-related code

This PR does two small wins in fmt code:
- Override `write_char` for `PadAdapter` to use inner buffer's `write_char`
- Override some `write_fmt` implementations to avoid avoid the additional indirection and vtable generated by the default impl.
2023-09-18 03:33:53 +00:00
bors
10b88f8fa2 Auto merge of #115914 - GuillaumeGomez:turn-custom_code_classes_in_docs-into-warning, r=Manishearth
Turn custom code classes in docs into warning

By habit, since it was a new feature gate, I added a check which emitted an error in case the new syntax was used. However, since rustdoc tags parser was accepting *everything*, using the "new" syntax should never ever emit errors. It now emits a warning.

Follow-up of #110800.

cc `@Manishearth`
r? `@notriddle`
2023-09-18 01:46:29 +00:00
Tshepang Mbambo
a716c9620f
address review comment
See https://github.com/rust-lang/rust/pull/115558#issuecomment-1722601187
2023-09-18 03:42:35 +02:00
bors
8a7cab8d0e Auto merge of #115547 - WaffleLapkin:spin_looping, r=Mark-Simulacrum
Simplify `core::hint::spin_loop`

The grouping was inconsistent and not really helpful.

r? t-libs
2023-09-18 00:02:40 +00:00
Nicholas Nethercote
abe2a68acd Remove more unused Lift impls. 2023-09-18 09:37:10 +10:00
Nicholas Nethercote
af7d3e501b Remove unused Lift derives.
I found these by commenting out all `Lift` derives and then adding back
the ones that were necessary to successfully compile.
2023-09-18 09:37:10 +10:00
Nicholas Nethercote
6b1980f9cf Rename CloneLiftImpls as TrivialLiftImpls.
To match `TrivialTypeTraversalImpls` and
`TrivialTypeTraversalAndLiftImpls`, and because the `Clone` doesn't mean
anything.
2023-09-18 09:37:09 +10:00
Nicholas Nethercote
46fe65d0e5 Remove unused Display impls. 2023-09-18 09:37:09 +10:00
Nicholas Nethercote
1281d43942 Remove RegionHighlightMode::tcx.
It's easier to pass it in to the one method that needs it
(`highlighting_region_vid`) than to store it in the type. This means
`RegionHighlightMode` can impl `Default`.
2023-09-18 09:37:09 +10:00
Benoît du Garreau
78846d17c1 Specialize fmt::Write::write_fmt for Sized types 2023-09-17 23:14:53 +02:00
Ralf Jung
3b817b2810 nop_lift macros: ensure that we are using the right interner 2023-09-17 20:52:15 +02:00
Manish Goregaokar
e1e1a02f52
Update src/librustdoc/markdown.rs
Co-authored-by: Michael Howell <michael@notriddle.com>
2023-09-17 18:43:54 +00:00
Jack Huey
c70ee688b3 Add me as on vacation 2023-09-17 12:08:08 -04:00
bors
203c57dbe2 Auto merge of #115334 - RalfJung:transparent-aligned-zst, r=compiler-errors
repr(transparent): it's fine if the one non-1-ZST field is a ZST

This code currently gets rejected:
```rust
#[repr(transparent)]
struct MyType([u16; 0])
```
That clearly seems like a bug to me: `repr(transparent)` [got defined ](https://github.com/rust-lang/rust/issues/77841#issuecomment-716575747) as having any number of 1-ZST fields plus optionally one more field; `MyType` clearly satisfies that definition.

This PR changes the `repr(transparent)` logic to actually match that definition.
2023-09-17 15:20:44 +00:00
bors
db9c21fd94 Auto merge of #115909 - Dylan-DPC:rollup-uf96r2d, r=Dylan-DPC
Rollup of 6 pull requests

Successful merges:

 - #114965 (Remove Drop impl of mpsc Receiver and (Sync)Sender)
 - #115434 (make `Debug` impl for `ascii::Char` match that of `char`)
 - #115477 (Stabilize the `Saturating` type)
 - #115611 (add diagnostic for raw identifiers in format string)
 - #115654 (improve PassMode docs)
 - #115862 (Migrate `compiler/rustc_hir_typeck/src/callee.rs` to translatable diagnostics)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-09-17 13:31:49 +00:00
Guillaume Gomez
c17abf124c Update tests for custom_code_classes_in_docs feature 2023-09-17 15:11:44 +02:00
Guillaume Gomez
e1294b26af Don't emit an error if the custom_code_classes_in_docs feature is disabled when its syntax is used. 2023-09-17 15:11:44 +02:00
bors
8ed1d4a02d Auto merge of #114750 - Enselic:metadata-dep-info, r=compiler-errors
Make `.rmeta` file in `dep-info` have correct name (`lib` prefix)

Since `filename_for_metadata()` and
`OutputFilenames::path(OutputType::Metadata)` had different logic for the name of the metadata file, the `.d` file contained a file name different from the actual name used. Share the logic to fix the out-of-sync name.

Without this fix, the `.d` file contained

    dash-separated_something-extra.rmeta: dash-separated.rs

instead of

    libdash_separated_something-extra.rmeta: dash-separated.rs

which is the name of the file that is actually written by the compiler.

Worth noting: It took me several iterations to get all tests to pass, so I am relatively confident that this PR does not break anything.

Closes #68839
2023-09-17 11:45:53 +00:00
Dylan DPC
f082f1dd30
Rollup merge of #115862 - clubby789:migrate-callee-translatable, r=compiler-errors
Migrate `compiler/rustc_hir_typeck/src/callee.rs` to translatable diagnostics
2023-09-17 11:23:26 +00:00
Dylan DPC
0c5f5b6db7
Rollup merge of #115654 - RalfJung:pass-mode-cast, r=compiler-errors
improve PassMode docs
2023-09-17 11:23:25 +00:00
Dylan DPC
0900712fe0
Rollup merge of #115611 - lukas-code:format!("{r#ident}"), r=compiler-errors
add diagnostic for raw identifiers in format string

Format strings don't support raw identifiers (e.g. `format!("{r#type}")`), but they do support keywords in the format string directly (e.g. `format!("{type}")`). This PR improves the error output when attempting to use a raw identifier in a format string and adds a machine-applicable suggestion to remove the `r#`.

fixes https://github.com/rust-lang/rust/issues/115466
2023-09-17 11:23:25 +00:00
Dylan DPC
6011fd4655
Rollup merge of #115477 - kellerkindt:stabilized_int_impl, r=dtolnay
Stabilize the `Saturating` type

Closes #87920
Closes #92354

Stabilization report https://github.com/rust-lang/rust/issues/87920#issuecomment-1652346124
FCP https://github.com/rust-lang/rust/issues/87920#issuecomment-1676438885
2023-09-17 11:23:24 +00:00
Dylan DPC
584eb696df
Rollup merge of #115434 - soqb:ascii-char-manual-debug, r=dtolnay
make `Debug` impl for `ascii::Char` match that of `char`

# Objective
use a more recognisable format for the `Debug` impl on `ascii::Char` than the derived one based off the enum variants. The alogorithm used is the following:
 - escape `ascii::Char::{Null, CharacterTabulation, CarraigeReturn, LineFeed, ReverseSolidus, Apostrophe}` to `'\0'`, `'\t'`, `'\r'`, `'\n'`, `'\\'` and `'\''` respectively. these are the same escape codes as `<char as Debug>::fmt` uses.
 - if `u8::is_ascii_control` is false, print the character wrapped in single quotes.
 - otherwise, print in the format `'\xAB'` where `A` and `B` are the hex nibbles of the byte. (`char` uses unicode escapes and this seems like the corresponding ascii format).

Tracking issue: https://github.com/rust-lang/rust/issues/110998
2023-09-17 11:23:24 +00:00
Dylan DPC
7cbe7fa6bf
Rollup merge of #114965 - benschulz:mpsc-drop, r=dtolnay
Remove Drop impl of mpsc Receiver and (Sync)Sender

This change removes the empty `Drop` implementations for `mpsc::Receiver`, `mpsc::Sender` and `mpsc::SyncSender`. These implementations do not specify `#[may_dangle]`, so by removing them we make `mpsc` types play nice with drop check.

This was previously attempted in [#105243](https://github.com/rust-lang/rust/pull/105243#issuecomment-1337188646) but then [abandoned due to a test failure](https://github.com/rust-lang/rust/pull/105243#issuecomment-1337227970). I've aligned the test with those for `Mutex` and `RwLock`.
2023-09-17 11:23:23 +00:00
bors
327e6cf55c Auto merge of #114452 - weiznich:feature/diagnostic_on_unimplemented, r=compiler-errors
`#[diagnostic::on_unimplemented]` without filters

This commit adds support for a `#[diagnostic::on_unimplemented]` attribute with the following options:

* `message` to customize the primary error message
* `note` to add a customized note message to an error message
* `label` to customize the label part of the error message

The relevant behavior is specified in [RFC-3366](https://rust-lang.github.io/rfcs/3366-diagnostic-attribute-namespace.html)
2023-09-17 10:00:15 +00:00
Camille GILLOT
5d18a0edb4 Do not clone MIR for const-prop lint. 2023-09-17 09:00:51 +00:00
bors
cdd182cbb2 Auto merge of #115514 - onur-ozkan:bootstrap-codebase-improvements, r=albertlarsan68
optimize and cleanup bootstrap source

I suggest reviewing this commit by commit.
2023-09-17 08:11:41 +00:00
bors
3ecc563628 Auto merge of #113748 - clarfonthey:ip-step, r=dtolnay
impl Step for IP addresses

ACP: rust-lang/libs-team#235

Note: since this is insta-stable, it requires an FCP.

Separating out from the bit operations PR since it feels logically disjoint, and so their FCPs can be separate.
2023-09-17 06:27:09 +00:00
onur-ozkan
9971008b8d micro-level optimizations for bootstrap
Overall optimizations for bootstrap on conditions, assertions,
trait implementations, etc.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-09-17 07:50:28 +03:00
onur-ozkan
12b1784b0b update the beginning part of bootstrap/README.md
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-09-17 07:50:18 +03:00
bors
a09c1f85f1 Auto merge of #115782 - a1phyr:improve_pad_adapter, r=dtolnay
Improve `PadAdapter::write_char`

Split from #108043
2023-09-17 01:47:49 +00:00
bors
d7229c479c Auto merge of #113753 - dvdsk:master, r=dtolnay
Add implementation for thread::sleep_until

- Feature gate is `thread::sleep_until`
- Tracking issue is: #113752
- APC: https://github.com/rust-lang/libs-team/issues/237
2023-09-17 00:02:45 +00:00
bors
7d9bce3273 Auto merge of #115900 - matthiaskrgr:rollup-3ba15da, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #115247 (Document std limitations before/after main)
 - #115329 (fix std::primitive doc: homogenous -> homogeneous)
 - #115487 (Improve documentation on when signes are printed by default)
 - #115560 (Update doc for `alloc::format!` and `core::concat!`)
 - #115836 (update rust_analyzer_settings.json)
 - #115884 (make ty::Const debug printing less verbose)
 - #115890 (Migrate GUI colors test to original CSS color format)
 - #115895 (Improve Vec(Deque)::truncate documentation)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-09-16 22:09:02 +00:00
Mark Rousskov
abd265ed0e Move to older, mirrored redox install 2023-09-16 17:58:48 -04:00
Mark Rousskov
5b882acc2e Bump to supported Ubuntu
The 22.10 Ubuntu repositories were returning 404s in last stable build.
2023-09-16 17:58:13 -04:00