Commit graph

256891 commits

Author SHA1 Message Date
Oli Scherer
92c54db22f Revert "Cache whether a body has inline consts"
This reverts commit eae5031ecb.
2024-06-07 08:33:58 +00:00
Jakub Beránek
eac63b7725
Rename S environment variable to SOURCE_ROOT in run-make tests 2024-06-07 09:20:58 +02:00
Jakub Beránek
7eff2d9b22
Do not pass source root when building run-make tests 2024-06-07 09:20:25 +02:00
bors
468310ea0c Auto merge of #126108 - workingjubilee:rollup-g7m92b6, r=workingjubilee
Rollup of 7 pull requests

Successful merges:

 - #125606 (Size optimize int formatting)
 - #125724 (Uplift `Relate`/`TypeRelation` into `rustc_next_trait_solver`)
 - #126040 (Don't warn on fields in the `unreachable_pub` lint )
 - #126098 (Remove `same-lib-two-locations-no-panic` run-make test)
 - #126099 (Crate loader cleanups)
 - #126101 (Revert "Disallow ambiguous attributes on expressions" on nightly)
 - #126103 (Improve Docs for `hir::Impl` and `hir::ImplItem`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-06-07 06:49:55 +00:00
Zalathar
58ba77f4aa compiletest: Don't pass --out-dir if the compile flags include -o 2024-06-07 15:55:36 +10:00
Jubilee Young
49c2a1dda9 Update backtrace to 0.3.73 2024-06-06 22:50:45 -07:00
Jubilee
9436304871
Rollup merge of #126103 - veera-sivarajan:improve-docs-hir-impl, r=fmease
Improve Docs for `hir::Impl` and `hir::ImplItem`

Based on https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/.E2.9C.94.20Difference.20between.20.60hir.3A.3AImplItem.60.20and.20.60hir.3A.3AImpl.60.3F/near/442650915

r​? fmease
2024-06-06 21:10:11 -07:00
Jubilee
b1ab8d59f4
Rollup merge of #126101 - lqd:revert-124099, r=wesleywiser
Revert "Disallow ambiguous attributes on expressions" on nightly

As discussed in [today's t-compiler meeting](https://rust-lang.zulipchat.com/#narrow/stream/238009-t-compiler.2Fmeetings/topic/.5Bweekly.5D.202024-06-06/near/443079505), this reverts PR #124099 to fix P-critical beta regressions #125199.

r? ``@wesleywiser``

Opening as draft so that ``@wesleywiser`` and ``@apiraino,`` you can tell me whether you wanted:
1. a `beta-accepted` revert of #124099 on nightly (this PR)? That will need to be backported to beta (even though #126093 may be the last of those)
2. a revert of #124099 on beta?
3. all of the above?

I also opened #126102, another draft PR to revert #124099 on beta, should you choose options 2 or 3.
2024-06-06 21:10:11 -07:00
Jubilee
4c771d3117
Rollup merge of #126099 - Nilstrieb:crate-loader-cleanups, r=jieyouxu
Crate loader cleanups

Minor cleanups I found while trying to understand how all of this works
2024-06-06 21:10:10 -07:00
Jubilee
2acb24c462
Rollup merge of #126098 - Kobzol:remove-same-lib-runmake-test, r=jieyouxu
Remove `same-lib-two-locations-no-panic` run-make test

This test doesn't really make any sense anymore, it became broken a long time ago.

r? ``@jieyouxu``
2024-06-06 21:10:10 -07:00
Jubilee
6a42df7517
Rollup merge of #126040 - Urgau:unreachable_pub-fields-less, r=petrochenkov
Don't warn on fields in the `unreachable_pub` lint

This PR restrict the `unreachable_pub` lint by not linting on `pub` fields of `pub(restricted)` structs and unions. This is done because that can quickly clutter the code for an uncertain value, in particular since the "real" visibility is defined by the parent (the struct it-self).

This is meant to address one of the last concern of the `unreachable_pub` lint.

r? ``@petrochenkov``
2024-06-06 21:10:10 -07:00
Jubilee
75aa9d1219
Rollup merge of #125724 - compiler-errors:uplift-relate, r=lcnr
Uplift `Relate`/`TypeRelation` into `rustc_next_trait_solver`

For use in the new solver. This doesn't yet uplift `ObligationEmittingRelation`.

r? lcnr
2024-06-06 21:10:09 -07:00
Jubilee
c6cdd457eb
Rollup merge of #125606 - diondokter:opt-size-int-fmt, r=cuviper
Size optimize int formatting

Let's use the new feature flag!

This uses a simpler algorithm to format integers.
It is slower, but also smaller.
It also saves having to import the 200 byte rodata lookup table.

In a test of mine this saves ~300 bytes total of a cortex-m binary that does integer formatting.
For a 16KB device, that's almost 2%.

Note though that for opt-level 3 the text size actually grows by 116 bytes.
Still a win in total. I'm not sure why the generated code is bigger than the more fancy algo. Maybe the smaller algo lends itself more to inlining and duplicating?
2024-06-06 21:10:08 -07:00
bors
b74702fbb2 Auto merge of #125928 - michaelwoerister:fix-cgu-hashstable, r=oli-obk
Stabilize order of MonoItems in CGUs and disallow query_instability lint for rustc_monomorphize

The HashStable impl for `CodegenUnit` was incorrect as described in [MCP 533](https://github.com/rust-lang/compiler-team/issues/533). This PR removes any indeterminism from the way codegen units are built. The changes are pretty straightforward.

Part of https://github.com/rust-lang/rust/issues/84447 and [MCP 533](https://github.com/rust-lang/compiler-team/issues/533).
2024-06-07 04:02:59 +00:00
Sunshine
ceaa42b817 Update tests 2024-06-07 11:55:52 +08:00
carbotaniuman
f9104f0dfb Handle safe case 2024-06-06 20:54:51 -05:00
carbotaniuman
f83cdbd2e0 Fix ordering 2024-06-06 20:42:20 -05:00
Sunshine
5a23111b77 Follow ESLint instructions. 2024-06-07 09:36:43 +08:00
carbotaniuman
453093b791 Remove extraneous attribute 2024-06-06 20:36:23 -05:00
carbotaniuman
1cc4e8c733 Add unsafe to ffi_pure and ffi_const 2024-06-06 20:27:25 -05:00
carbotaniuman
15f8ffe371 Fix formatting 2024-06-06 20:27:25 -05:00
carbotaniuman
8aa2553b50 Change comment to FIXME 2024-06-06 20:27:25 -05:00
carbotaniuman
87be1bae73 Fix build 2024-06-06 20:27:25 -05:00
carbotaniuman
b82c524996 Add double unsafe test 2024-06-06 20:27:25 -05:00
carbotaniuman
68719e0bda Fix doc comment 2024-06-06 20:27:24 -05:00
carbotaniuman
230b58febf Error on unsafe on non-unsafe attribute 2024-06-06 20:26:28 -05:00
carbotaniuman
48851d9adb Add tests 2024-06-06 20:26:28 -05:00
carbotaniuman
6ec492fdde Reorder unsafe macro cases 2024-06-06 20:26:28 -05:00
carbotaniuman
c4de986afa Disallow unsafe in derive 2024-06-06 20:26:27 -05:00
carbotaniuman
67f5dd1ef1 Parse unsafe attributes 2024-06-06 20:26:27 -05:00
Veera
cddf291a25 Improve Docs for hir::Impl and hir::ImplItem 2024-06-06 21:00:16 -04:00
Sunshine
63411076c3 Other EcmaScript version bump 2024-06-07 08:44:52 +08:00
Slanterns
f275ca09dd
bless std_instead_of_core 2024-06-07 08:37:05 +08:00
Slanterns
c6f1934d34
fix doc comments about error_generic_member_access 2024-06-07 08:30:08 +08:00
Slanterns
76065f5b27
Stabilize error_in_core 2024-06-07 08:30:00 +08:00
Sunshine
d73d273482 Bump the EcmaScript version in the eslint configuration. 2024-06-07 07:51:29 +08:00
bors
76e7a0849c Auto merge of #126104 - workingjubilee:rollup-t1ac2ld, r=workingjubilee
Rollup of 12 pull requests

Successful merges:

 - #125220 (Repair several `riscv64gc-unknown-linux-gnu` codegen tests)
 - #126033 (CI: fix publishing of toolstate history)
 - #126034 (Clarify our tier 1 Windows Server support)
 - #126035 (Some minor query system cleanups)
 - #126051 (Clarify an `x fmt` error.)
 - #126059 (Raise `DEFAULT_MIN_STACK_SIZE` to at least 64KiB)
 - #126064 (Migrate `run-make/manual-crate-name` to `rmake.rs`)
 - #126072 (compiletest: Allow multiple `//@ run-flags:` headers)
 - #126073 (Port `tests/run-make-fulldeps/obtain-borrowck` to ui-fulldeps)
 - #126081 (Do not use relative paths to Rust source root in run-make tests)
 - #126086 (use windows compatible executable name for libcxx-version)
 - #126096 ([RFC-2011] Allow `core_intrinsics` when activated)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-06-06 22:27:56 +00:00
schvv31n
2bdc53b153 fixed memory leaks in PathBuf::leak & OsString::leak tests 2024-06-06 23:18:01 +01:00
Sunshine
f9f51839e5 Tidying 2024-06-07 06:09:30 +08:00
Sunshine
dd5103bb68 Add test for PR #126057 2024-06-07 05:49:46 +08:00
Jubilee
efd8959ab1
Rollup merge of #126096 - c410-f3r:tests-tests-tests, r=jhpratt
[RFC-2011] Allow `core_intrinsics` when activated

Fix #120612
2024-06-06 14:46:25 -07:00
Jubilee
7e81738d5c
Rollup merge of #126086 - onur-ozkan:use-exe, r=petrochenkov
use windows compatible executable name for libcxx-version

Resolves #https://github.com/rust-lang/rust/pull/125411#discussion_r1629915724
2024-06-06 14:46:25 -07:00
Jubilee
af229f5e00
Rollup merge of #126081 - Kobzol:run-make-relative-paths, r=jieyouxu
Do not use relative paths to Rust source root in run-make tests

Pre-requisite for https://github.com/rust-lang/rust/issues/126080.

Fixes: https://github.com/rust-lang/rust/issues/126071

r? `@jieyouxu`
2024-06-06 14:46:24 -07:00
Jubilee
30bb51fd06
Rollup merge of #126073 - Zalathar:fulldeps-borrowck, r=jieyouxu
Port `tests/run-make-fulldeps/obtain-borrowck` to ui-fulldeps

Thanks to `{{sysroot-base}}` from #126008, this was also pretty straightforward to port over.
2024-06-06 14:46:24 -07:00
Jubilee
f4016e2bf5
Rollup merge of #126072 - Zalathar:run-flags, r=jieyouxu
compiletest: Allow multiple `//@ run-flags:` headers

While working on some tests, I was annoyed to find that multiple `// `@run-flags:`` headers do not combine with each other (as `//@ compile-flags:` headers do), and instead all but one are silently discarded.

This makes it impossible to split long flag lists into multiple lines.

Fortunately it's easy to just recycle the existing logic from the other command-line-flags headers.
2024-06-06 14:46:23 -07:00
Jubilee
2c1e71bac5
Rollup merge of #126064 - GuillaumeGomez:migrate-run-make-manual-crate-name, r=jieyouxu
Migrate `run-make/manual-crate-name` to `rmake.rs`

Part of https://github.com/rust-lang/rust/issues/121876.

r? ``@jieyouxu``
2024-06-06 14:46:23 -07:00
Jubilee
68c57de26e
Rollup merge of #126059 - workingjubilee:stack-nothing-higher, r=ChrisDenton
Raise `DEFAULT_MIN_STACK_SIZE` to at least 64KiB

Prevent copy-paste errors from producing new starved-for-resources threaded platforms by raising `DEFAULT_MIN_STACK_SIZE` from 4096 bytes to at least 64KiB.

Two platforms "affected" by this have no actual threads:
- UEFI
- "unsupported"

Platforms that this actually affects:
- wasm32-wasi with "atomics" enabled
- wasm32-wasi-p1-threads

Two exceptions:
- SGX: a "secure code execution" platform, stays at 4096B
- TEEOS: also a "secure code execution" platform, stays at 8192B

I believe either of these may have sufficiently "interesting" semantics around threads, or significant external library support. Either would mean making any choices here for them is suspect.

Fixes #126027 which is a bug report about `DEFAULT_MIN_STACK_SIZE` being too low on wasi.
2024-06-06 14:46:22 -07:00
Jubilee
f739fefc76
Rollup merge of #126051 - nnethercote:clarify-x-fmt-error, r=Nilstrieb
Clarify an `x fmt` error.

For anyone who was using paths with `x fmt` previously, make the error message a bit clearer.

r? ```@GuillaumeGomez```
2024-06-06 14:46:22 -07:00
Jubilee
a1baa7b04d
Rollup merge of #126035 - oli-obk:query_macro_errors, r=fmease
Some minor query system cleanups

* Improves diagnostics on conflicting query flags
* removes unnecessary impls
* `track_caller`

pulled out of https://github.com/rust-lang/rust/pull/115613
2024-06-06 14:46:21 -07:00
Jubilee
14d9a3e230
Rollup merge of #126034 - ChrisDenton:winsupport, r=ehuss
Clarify our tier 1 Windows Server support

I've been asked a number of times about our minimum Windows Server support so this PR updates the documentation to be more explicit.

Note that this doesn't change our support at all, it just clarifies it. Windows Server 2016 is the first "Windows 10" server OS (specifically it has the same [build number](https://en.wikipedia.org/wiki/Windows_Server_2016#Release_to_manufacturing) as Windows 10 1607).
2024-06-06 14:46:21 -07:00