Commit Graph

234440 Commits

Author SHA1 Message Date
clubby789
82471e9f6c Migrate 'casting unknown pointer' diagnostic 2023-09-18 14:07:05 +00:00
clubby789
94920cc6e0 Migrate 'int to fat pointer' cast diagnostic 2023-09-18 14:07:03 +00:00
clubby789
c2841e2a1e Migrate 'cast to bool' diagnostic 2023-09-18 14:03:57 +00:00
clubby789
dcb3e70861 Migrate 'is_empty' diagnostics 2023-09-18 14:03:57 +00:00
clubby789
6496181208 Migrate 'lossy int2ptr cast' diagnostic 2023-09-18 14:03:57 +00:00
clubby789
bf693d1743 Migrate 'lossy ptr2int cast' diagnostic 2023-09-18 14:03:57 +00:00
Guillaume Gomez
354397f04d Move mobile topbar title creation entirely into JS 2023-09-18 15:52:21 +02:00
danakj
b7e98e13cd Document that the macabi sanitizers are shared with darwin
Do not rename and resign the darwin sanitizers a second time for
macabi.
2023-09-18 09:38:12 -04:00
danakj
4eb1b52794 Enable ASAN/LSAN/TSAN for *-apple-ios-macabi
The -macabi targets are iOS running on MacOS, and they use the runtime
libraries for MacOS, thus they have the same sanitizers available as the
*-apple-darwin targets.
2023-09-18 09:38:12 -04:00
Zalathar
01b67f4b26 coverage: Simplify sorting of coverage spans extracted from MIR
Switching to `Ordering::then_with` makes control-flow less complicated, and
there is no need to use `partial_cmp` here.
2023-09-18 23:15:25 +10:00
Zalathar
a4cb31bb58 coverage: Regression test for inconsistent handling of closure spans 2023-09-18 22:33:05 +10: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
Zalathar
4690f97099 coverage: Fix an unstable-sort inconsistency in coverage spans
This code was calling `sort_unstable_by`, but failed to impose a total order on
the initial spans. That resulted in unpredictable handling of closure spans,
producing inconsistencies in the coverage maps and in user-visible coverage
reports.

This patch fixes the problem by always sorting closure spans before
otherwise-identical non-closure spans, and also switches to a stable sort in
case the ordering is still not total.
2023-09-18 21:28:56 +10: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
Laurențiu Nicola
b18db7a13e Merge commit '258b15c506a2d3ad862fd17ae24eaf272443f477' into sync-from-ra 2023-09-18 12:33:49 +03:00
bors
258b15c506 Auto merge of #15628 - lnicola:sync-from-rust, r=lnicola
minor: Sync from downstream
2023-09-18 09:05:50 +00:00
Laurențiu Nicola
d39b45a58d Merge branch 'master' into sync-from-rust 2023-09-18 12:04:59 +03: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
Ralf Jung
7b7caae30e get rid of duplicate primitive_docs 2023-09-18 08:17:36 +02:00
Ralf Jung
0522bde4bc simplify inject_impl_of_structural_trait 2023-09-18 07:45:46 +02: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
bors
05666441ba Auto merge of #15625 - jDomantas:domantas/fix-15623, r=HKalbasi
fix: Don't skip closure captures after let-else

As I understand that `return` was left there by accident. It caused capture analysis to skip the rest of the block after a let-else, and then missed captures caused incorrect results in borrowck, closure hints, layout calculation, etc.

Fixes #15623

I didn't understand why I using the example from #15623 as-is doesn't work - I don't get the warnings unless I remove the `call_me()` call, even on the same commit as my own RA version which does show those warnings.
2023-09-17 17:53:15 +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
jDomantas
a961068504 add layout test 2023-09-17 17:00:57 +03:00
jDomantas
b3aba94cbd use code from bug report for regression test 2023-09-17 16:52:32 +03: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