249671 Commits

Author SHA1 Message Date
bors
9b00956e56 Auto merge of #124517 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum
[stable] 1.78 (round 2)

This backports "Don't trigger `unused_qualifications` on global paths" (https://github.com/rust-lang/rust/pull/122435).

r? `@Mark-Simulacrum`
1.78.0
2024-04-29 14:01:42 +00:00
许杰友 Jieyou Xu (Joe)
0d61eaea59 Don't trigger unused_qualifications on global paths 2024-04-29 08:49:06 -04:00
bors
15adfb9cd5 Auto merge of #124477 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum
[stable] 1.78.0 release

https://forge.rust-lang.org/release/process.html#promote-branches-t-3-days-monday

This also includes a backport of:

*  Use raw-dylib for Windows synchronization functions #124019

r? `@Mark-Simulacrum`
2024-04-28 15:08:52 +00:00
Chris Denton
21dcfbdaa1 Cranelift: Revert raw-dylib for Windows futex APIs 2024-04-28 09:31:18 -04:00
Chris Denton
2775ae0fa9 Use raw-dylib for Windows futex APIs
This is a workaround for older mingw `synchronization` import library not working on at least some system.
2024-04-28 09:31:13 -04:00
Mark Rousskov
dc070bc89e Prepare 1.78 release 2024-04-28 09:30:50 -04:00
bors
b7e3de2fd9 Auto merge of #124369 - flip1995:clippy-backport, r=Mark-Simulacrum
[beta] Clippy backport

r? `@Mark-Simulacrum`

Backports:

- rust-lang/rust-clippy#12486
- rust-lang/rust-clippy#12572
- rust-lang/rust-clippy#12508
- rust-lang/rust-clippy#12617

The first one is a bit bigger as usual for a backport. But it fixes a major issue with this lint that we overlooked. So I think this is worth it. After that was merged into nightly, there were no new issues opened about this lint, so IMO this is safe to backport to `beta` and put into stable.
2024-04-27 15:49:12 +00:00
y21
199c2988f6
use Lrc instead of the aliased type Arc directly 2024-04-25 16:29:21 +02:00
bors
14f429eea4
Auto merge of #12617 - y21:issue-12616, r=Alexendoo
avoid an ICE in `ptr_as_ptr` when getting the def_id of a local

Fixes #12616

`Res::def_id` can panic, so avoid calling it in favor of `opt_def_id`, so we can gracefully handle resolutions that don't have a `DefId` (e.g. local variables) and get a false negative in the worst case, rather than an ICE

changelog: Fix ICE in [`ptr_as_ptr`] when the cast expression is a function call to a local variable
2024-04-25 16:29:21 +02:00
bors
ec036c7bca
Auto merge of #12508 - y21:issue12506, r=llogiq
Fix infinite loop in `cast_sign_loss` when peeling unwrap method calls

Fixes #12506

The lint wants to peel method calls but didn't actually reassign the expression, leading to an infinite loop.

----

changelog: Fix infinite loop in [`cast_sign_loss`] when having two chained `.unwrap()` calls
2024-04-25 16:29:21 +02:00
bors
564f93e692
Auto merge of #12572 - y21:mixed_attributes_style_style, r=llogiq
Move `mixed_attributes_style` to style

> It currently is in suspicious. I wouldn't say that the linted code is "most likely wrong or useless"
[...]
> 😅 I would still argue that this doesn't belong in the suspicious group, but rather in the style group.

These are some good points made [on zulip](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/mixed_attributes_style.20on.20outlined.20modules/near/429823328).

----

changelog: Move [`mixed_attributes_style`] to the `style` category
2024-04-25 16:29:21 +02:00
bors
80284278da
Auto merge of #12486 - J-ZhengLi:issue12435, r=y21
don't lint [`mixed_attributes_style`] when mixing docs and other attrs

fixes: #12435
fixes: #12436
fixes: #12530

---

changelog: don't lint [`mixed_attributes_style`] when mixing different kind of attrs; and move it to late pass;
2024-04-25 16:29:20 +02:00
bors
205af5d6be Auto merge of #124272 - cuviper:beta-next, r=cuviper
[beta] backports

- Stop using `HirId` for fn-like parents since closures are not `OwnerNode`s #123804

r? cuviper
2024-04-23 08:56:26 +00:00
Michael Goulet
19e69b76c5 Stop using HirId for fn-like parents
(cherry picked from commit 68d7c837fc377ac4145d931171fa2b1d1bd1670f)
2024-04-22 11:39:54 -07:00
bors
13ef05e2be Auto merge of #124139 - cuviper:beta-next, r=cuviper
[beta] backports

- Silence `unused_imports` lint for redundant imports #123744
- Call the panic hook for non-unwind panics in proc-macros #123825
- rustdoc: check redundant explicit links with correct itemid #123905
- disable two debuginfo tests under gdb 15 #123963

r? cuviper
2024-04-19 21:56:20 +00:00
Rémy Rakic
c623345791 disable two debuginfo tests under gdb 15
it seems gdb 15 regresses some of our debuginfo tests. disable them
temporarily so that CI doesn't randomly start failing soon.

(cherry picked from commit 6e19f82160c216fcb5f8eaff915b7fe274a5568e)
2024-04-19 09:28:14 -07:00
Michael Howell
46515fd778 rustdoc: check redundant explicit links with correct itemid
Fixes a regression caused by 0a50dba50bedd24377bd1066da3b4b7066df4d28

(cherry picked from commit 0fea38a01f4015d310230b76984068b6fe8414d4)
2024-04-18 15:57:41 -07:00
Ben Kimock
4a8f091c01 Call the panic hook for non-unwind panics in proc-macros
(cherry picked from commit d8dc28b93e4cbfe2a3c26af06c73b0ea46f67a1e)
2024-04-18 15:57:41 -07:00
Michael Goulet
8fcffffad9 Silence unused_imports lint for redundant imports
(cherry picked from commit 0db2a4010a5a7a57372e9135d327da8c7d92c8ab)
2024-04-18 15:57:41 -07:00
bors
6fd1912922 Auto merge of #123801 - cuviper:beta-next, r=cuviper
[beta] backports

- fix attribute validation on associated items in traits #121545
- Only inspect user-written predicates for privacy concerns #123377
- Check def id before calling `match_projection_projections` #123471
- Restore `pred_known_to_hold_modulo_regions` #123578
- Beta revert "Use OS thread name by default" #123533

r? cuviper
2024-04-12 02:06:12 +00:00
Chris Denton
3e376313d5 Beta revert "Use OS thread name by default"
This reverts #121666 due to #123495

This has already been done on master but beta needs something that will backport cleanly.

(cherry picked from commit 081ad8527d7b79e4761c497c12930e630de9a230)
2024-04-11 08:31:10 -07:00
Rémy Rakic
db57812e3e Revert "remove pred_known_to_hold_modulo_regions"
This reverts commit 399a258f46074740862568b124c02f7b7d04638c.

(cherry picked from commit 68b4257ccf0c94f855a46b48e48c4c73559eff84)
2024-04-11 08:30:17 -07:00
Rémy Rakic
9cf0875be8 add non-regression test for issue 123275
(cherry picked from commit 54f8db84329116889fce5d58292b5cc6b83642e6)
2024-04-11 08:30:17 -07:00
Michael Goulet
3b4de3d475 Check def id before calling match_projection_projections
(cherry picked from commit 43dae6934153693be62902fcefed0f97b4ca892f)
2024-04-11 08:30:12 -07:00
Oli Scherer
5d40b801dc Only inspect user-written predicates for privacy concerns
(cherry picked from commit 83bd12c70fd34dece71bcc632ee3df64036ca1d8)
2024-04-11 08:30:06 -07:00
Oli Scherer
0ac7d33475 Add regression test
(cherry picked from commit 769ab55558488d1ff786fa13e8ba1fb071a9791b)
2024-04-11 08:30:06 -07:00
gvozdvmozgu
e9f44b323d fix attribute validation on associated items in traits
(cherry picked from commit 8b576d553678688ece127b6f6a25b611e8726c05)
2024-04-11 08:30:00 -07:00
bors
27011d5dc0 Auto merge of #123682 - pietroalbini:pa-cve-2024-24576-beta, r=pietroalbini
[beta] Backport fix of CVE-2024-24576

r? `@ghost`

See https://blog.rust-lang.org/2024/04/09/cve-2024-24576.html
2024-04-09 22:01:32 +00:00
Pietro Albini
fa1e080f90
allow the test bat files in tidy 2024-04-09 18:17:02 +01:00
Pietro Albini
4ef17eff84
update release notes 2024-04-09 01:15:12 +02:00
Chris Denton
eead91912b
Use new-style directives in ui test 2024-04-09 01:14:22 +02:00
Chris Denton
bf7668043a
Document Windows argument splitting 2024-04-09 01:14:12 +02:00
Chris Denton
7402e61d80
Disallow or quote all specials in bat args 2024-04-09 01:14:06 +02:00
bors
9eff510359 Auto merge of #123466 - cuviper:beta-next, r=cuviper
[beta] backports

- Fix f16 and f128 feature gates in editions other than 2015 #123307 / #123445
- Update to LLVM 18.1.2 #122772
- unix fs: Make hurd using explicit new rather than From #123057
- Don't inherit codegen attrs from parent static #123310
- Make sure to insert Sized bound first into clauses list #123302

r? cuviper
2024-04-06 04:31:16 +00:00
Michael Goulet
cf4493134b Make sure to insert Sized bound first into clauses list
(cherry picked from commit f2fd2d8c7080f7a7d770b3e3d27e525250c182dc)
2024-04-04 10:57:32 -07:00
Michael Goulet
5538d6d2b0 Don't inherit codegen attrs from parent static
(cherry picked from commit 4ff8a9bd6b64e32703603cf8bc8cb5cb221d4889)
2024-04-04 10:57:32 -07:00
Samuel Thibault
d02fc8edac unix fs: Make hurd and horizon using explicit new rather than From
408c0ea2162b ("unix time module now return result") dropped the From
impl for SystemTime, breaking the hurd and horizon builds.

Fixes #123032

(cherry picked from commit 7b4e5079619f99a1bff8a2f388b498be5687d280)
2024-04-04 10:57:32 -07:00
Nikita Popov
986e6f7d03 Update to LLVM 18.1.2
(cherry picked from commit 022e42db00384212e0325d48316886fdf4af9c5b)
2024-04-04 10:24:16 -07:00
Trevor Gross
356bb136cf Fix f16 and f128 feature gates in editions other than 2015
Fixes https://github.com/rust-lang/rust/issues/123282

Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
(cherry picked from commit 5afe072ead1154f9817ee610e3e60345507c7625)
2024-04-04 00:22:21 -05:00
Trevor Gross
07ed44548d Update f16 and f128 tests to run on both 2015 and 2018 editions
Reproduce the bug from <https://github.com/rust-lang/rust/issues/123282>
that indicates this feature gate hits edition-dependent resolution paths.
Resolution changed in edition 2018, so test that as well.

(cherry picked from commit 9a7b1762279eaa95d0289760d3b859fbbc9221f1)
2024-04-04 00:22:21 -05:00
bors
c1195518c8 Auto merge of #123172 - cuviper:beta-next, r=cuviper
[beta] backports

- Do not eat nested expressions' results in `MayContainYieldPoint` format args visitor #122680
- Fix heading anchors in doc pages. #122693
- Make `#[diagnostic::on_unimplemented]` format string parsing more robust #122402
-  Update ninja on Windows #123178

r? cuviper
2024-03-29 04:27:09 +00:00
Nilstrieb
10e6ec5ffc Update ninja on Windows
Errors started showing up, and I read somewhere that this might be
because of old ninja versions. This ninja version is indeed *ancient*.

```
multiple outputs aren't (yet?) supported by depslog; bring this up on the mailing list if it affects you
```

(cherry picked from commit b546764cbef7ac449cbad86636b4ca8daa9f5ef6)
2024-03-28 17:24:56 -07:00
Georg Semmler
052be5c643 Make #[diagnostic::on_unimplemented] format string parsing more robust
This commit fixes several issues with the format string parsing of the
`#[diagnostic::on_unimplemented]` attribute that were pointed out by
@ehuss.
In detail it fixes:

* Appearing format specifiers (display, etc). For these we generate a
warning that the specifier is unsupported. Otherwise we ignore them
* Positional arguments. For these we generate a warning that positional
arguments are unsupported in that location and replace them with the
format string equivalent (so `{}` or `{n}` where n is the index of the
positional argument)
* Broken format strings with enclosed }. For these we generate a warning
about the broken format string and set the emitted message literally to
the provided unformatted string
* Unknown format specifiers. For these we generate an additional warning
about the unknown specifier. Otherwise we emit the literal string as
message.

This essentially makes those strings behave like `format!` with the
minor difference that we do not generate hard errors but only warnings.
After that we continue trying to do something unsuprising (mostly either
ignoring the broken parts or falling back to just giving back the
literal string as provided).

Fix #122391

(cherry picked from commit 5568c569c03c8c22ce81185b9e49efcaa6866050)
2024-03-28 10:28:16 -07:00
Eric Huss
44230e4587 Fix heading anchors in doc pages.
(cherry picked from commit 39f2d25090e4b61a695fb6d72113689dcf2ae724)
2024-03-28 10:28:11 -07:00
Rémy Rakic
3b5101700f add non-regression test for issue 122674
(cherry picked from commit f3e9dfaed6c4d44fc0a5182221c31e5b0ff038fd)
2024-03-28 10:28:06 -07:00
Rémy Rakic
4cfc174018 do not eat nested exprs result in format args visitor
(cherry picked from commit 8beec62315538da7449fe869fd366181f7923b6e)
2024-03-28 10:28:06 -07:00
bors
4147533e05 Auto merge of #123117 - weihanglo:update-beta-cargo, r=weihanglo
[beta-1.78] Update cargo

2 commits in 2fe739fcf16c5bf8c2064ab9d357f4a0e6c8539b..54d8815d04fa3816edc207bbc4dd36bf18014dbc
2024-03-15 21:39:18 +0000 to 2024-03-26 18:23:22 +0000
- [beta-1.78] Do not strip debuginfo by default for MSVC (rust-lang/cargo#13653)
- [beta 1.78] Fix publish script due to crates.io CDN change (rust-lang/cargo#13616)

r? ghost
2024-03-27 13:20:10 +00:00
Weihang Lo
f726c0e619
[beta-1.78] Update cargo 2024-03-26 20:50:12 -04:00
bors
277d06bc95 Auto merge of #122853 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
[beta] Bump to releases 1.77 compiler

Completing the release [process](https://forge.rust-lang.org/release/process.html)...

r? `@Mark-Simulacrum`
2024-03-23 06:34:54 +00:00
Mark Rousskov
ca8ca610f4 Bump to releases 1.77 compiler 2024-03-21 20:05:14 -04:00