Commit Graph

230711 Commits

Author SHA1 Message Date
Trevor Gross
9439e02fb2 Unite bless environment variables under RUSTC_BLESS
Currently, Clippy, Miri, Rustfmt, and rustc all use an environment variable to
indicate that output should be blessed, but they use different variable names.
In order to improve consistency, this patch applies the following changes:

- Emit `RUSTC_BLESS` within `prepare_cargo_test` so it is always
  available
- Change usage of `MIRI_BLESS` in the Miri subtree to use `RUSTC_BLESS`
- Change usage of `BLESS` in the Clippy subtree to `RUSTC_BLESS`
- Change usage of `BLESS` in the Rustfmt subtree to `RUSTC_BLESS`
- Adjust the blessable test in `rustc_errors` to use this same
  convention
- Update documentation where applicable

Any tools that uses `RUSTC_BLESS` should check that it is set to any value
other than `"0"`.
2023-07-26 16:54:02 -04:00
bors
fb7e6d078d Auto merge of #114103 - matthiaskrgr:rollup-01m6l2w, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #101994 (rand: freebsd update, using getrandom.)
 - #113930 (Add Param and Bound ty to SMIR)
 - #113942 (Squelch a noisy rustc_expand unittest)
 - #113996 (Define CMAKE_SYSTEM_NAME on a cross build targeting DragonFly.)
 - #114070 (Add `sym::iter_mut` + `sym::as_mut_ptr` for Clippy)
 - #114073 (Remove -Z diagnostic-width)
 - #114090 (compiletest: remove ci-specific remap-path-prefix)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-07-26 19:21:47 +00:00
Matthias Krüger
a1956e281a
Rollup merge of #114090 - mdibaiee:remove-remap-path-prefix-ci, r=wesleywiser
compiletest: remove ci-specific remap-path-prefix

Now that we have fixed the underlying cause of long type name inconsistencies in #113893, we can remove the remap-path-prefix logic from CI

resolves #113424
2023-07-26 20:49:14 +02:00
Matthias Krüger
43a38e7e55
Rollup merge of #114073 - ehuss:remove-z-diagnostic-width, r=fee1-dead
Remove -Z diagnostic-width

This removes the `-Z diagnostic-width` option since it is ignored and does nothing. `-Z diagnostic-width` was stabilized as `--diagnostic-width` in #95635. It is not entirely clear why the `-Z` flag was kept, but in part its final use was removed in #102216, but the `-Z` flag itself was not removed.
2023-07-26 20:49:14 +02:00
Matthias Krüger
c6bfa7761a
Rollup merge of #114070 - blyxyas:iter_mut_symbol, r=oli-obk
Add `sym::iter_mut` + `sym::as_mut_ptr` for Clippy

We currently have `sym::iter` and `sym::iter_repeat`, this PR adds `sym::iter_mut` as it's useful for https://github.com/rust-lang/rust-clippy/pull/11038 and another Clippy lint, it also adds `sym::as_mut_ptr` as it's useful for https://github.com/rust-lang/rust-clippy/pull/10962.
2023-07-26 20:49:13 +02:00
Matthias Krüger
998fd94405
Rollup merge of #113996 - inferiorhumanorgans:dragonfly-cmake-system-name, r=ozkanonur
Define CMAKE_SYSTEM_NAME on a cross build targeting DragonFly.

Without `CMAKE_SYSTEM_NAME` set to the target  a cross compile will generally fail.  Related to #109170.
2023-07-26 20:49:13 +02:00
Matthias Krüger
d35cf499d8
Rollup merge of #113942 - ehuss:squelch-bad_path_expr_1, r=fee1-dead
Squelch a noisy rustc_expand unittest

The test `rustc_parse::tests::bad_path_expr_1` prints an error message to stderr, circumventing libtest's stderr intercept. This causes noise when running tests, in particular they show up 16 times on the GitHub Actions summary page. The solution here is to not use an error emitter that prints to stderr, and instead check that the correct error is generated.
2023-07-26 20:49:12 +02:00
Matthias Krüger
d910e7d9eb
Rollup merge of #113930 - spastorino:smir-types-6, r=oli-obk
Add Param and Bound ty to SMIR

r? ``@oli-obk``
2023-07-26 20:49:12 +02:00
Matthias Krüger
26d791b351
Rollup merge of #101994 - devnexen:rand_fbsd_update, r=workingjubilee
rand: freebsd update, using getrandom.

supported since the 12th release, while 11.4 is EOL since 2021.
2023-07-26 20:49:11 +02:00
Michael Goulet
1794466c00 Dont pass -Zwrite-long-types-to-disk=no for ui-fulldeps --stage=1 2023-07-26 18:43:40 +00:00
bors
6908c73ab0 Auto merge of #114012 - GuillaumeGomez:fix-113982, r=notriddle
Fix missing attribute merge on glob foreign re-exports

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

The attributes were not merged with the import's in case of glob re-export of foreign items.

r? `@notriddle`
2023-07-26 17:35:51 +00:00
Ralf Jung
9d3e35ceaa Add tests for #102403 and #113407 2023-07-26 13:31:54 -04:00
yukang
98dd81e4e3 Add test case for #109567 2023-07-26 13:31:54 -04:00
bors
601a34de8c Auto merge of #113457 - davidtwco:lint-ctypes-issue-113436, r=oli-obk
lint/ctypes: fix `()` return type checks

Fixes #113436.

`()` is normally FFI-unsafe, but is FFI-safe when used as a return type. It is also desirable that a transparent newtype for `()` is FFI-safe when used as a return type.

In order to support this, when a type was deemed FFI-unsafe, because of a `()` type, and was used in return type - then the type was considered  FFI-safe. However, this was the wrong approach - it didn't check that the `()` was part of a transparent newtype! The consequence of this is that the presence of a `()` type in a more complex return type would make it the entire type be considered safe (as long as the `()` type was the first that the lint found) - which is obviously incorrect.

Instead, this logic is removed, and after [consultation with t-lang](https://github.com/rust-lang/rust/issues/113436#issuecomment-1640756721), I've fixed the bugs and inconsistencies and  made `()` FFI-safe within types.

I also refactor a function, but that's not too exciting.
2023-07-26 15:27:36 +00:00
Eric Huss
9914ae3292 Squelch a noisy rustc_expand unittest 2023-07-26 08:12:08 -07:00
klensy
31630859cc replace atty crate with std's isTerminal 2023-07-26 18:09:50 +03:00
Wesley Wiser
47a4484a78 Remove unused NCSA license 2023-07-26 10:20:15 -04:00
Wesley Wiser
6f5d960389 Fix miri 2023-07-26 10:20:15 -04:00
Wesley Wiser
15e9f56088 Replace in-tree rustc_apfloat with the new version of the crate 2023-07-26 10:20:15 -04:00
Guillaume Gomez
51eb0c3b36 Fix regression for private in public 2023-07-26 15:29:45 +02:00
MoskalykA
48e7f3e313 Have a better file name than just the issue id 2023-07-26 15:07:57 +02:00
bors
bd9785cce8 Auto merge of #114071 - RalfJung:interpret-generic-read-write, r=oli-obk
interpret: make read/write methods generic

Instead of always having to call `into()` to convert things to `PlaceTy`/`OpTy`, make the relevant methods generic. This also means that when we read from an `MPlaceTy`, we avoid creating an intermediate `PlaceTy`.

This makes it feasible to remove the `Copy` from `MPlaceTy`. All the other `*Ty` interpreter types already had their `Copy` removed a while ago so this is only consistent. (And in fact we had one function that accidentally took `MPlaceTy` instead of `&MPlaceTy`.)
2023-07-26 13:06:25 +00:00
Santiago Pastorino
7af1697138
Add Bound ty to SMIR 2023-07-26 09:26:39 -03:00
Santiago Pastorino
648cf070eb
Add Param ty to SMIR 2023-07-26 09:26:39 -03:00
Bruce Mitchener
9f47ff84e3 docs: fmt::Debug*: Fix comments for finish method.
In the code sample for the `finish` method on `DebugList`,
`DebugMap`, and `DebugSet`, refer to finishing the list, map, or
set, rather than struct as it did.
2023-07-26 19:02:26 +07:00
Martin Nordholts
075a6bbef9 Regression test println!() panic message on ErrorKind::BrokenPipe
No existing test failed if the [`panic!()`][1] of the `println!()`
family of functions was removed, or if its message was changed.

So add such a test.

[1] 104f4300cf/library/std/src/io/stdio.rs (L1007-L1009)
2023-07-26 13:41:39 +02:00
Neven Villani
5a460a08ae
we correctly check that the perm is not lazy when triggering protectors 2023-07-26 13:32:54 +02:00
Neven Villani
efc2af4851
fix protectors so that all reads actually commute 2023-07-26 13:32:49 +02:00
bors
52bdc37727 Auto merge of #114054 - oli-obk:cleanups, r=estebank
Split some functions with many arguments into builder pattern functions

r? `@estebank`

This doesn't resolve all of the ones in rustc, mostly because I need to do other cleanups in order to be able to use some builder derives from crates.io

Works around https://github.com/rust-lang/rust/issues/90672 by making `x test rustfmt --bless` format itself instead of testing that it is formatted
2023-07-26 11:17:35 +00:00
Mahdi Dibaiee
7d773c3304 compiletest: remove ci-specific remap-path-prefix
Now that we have fixed the underlying cause of long type name
inconsistencies in #113893, we can remove the remap-path-prefix logic
from CI
2023-07-26 10:55:51 +01:00
Ralf Jung
571e8ce777 valtree: a bit of cleanup 2023-07-26 11:45:35 +02:00
bors
6ac86bb19f Auto merge of #2991 - rust-lang:rustup-2023-07-26, r=RalfJung
Automatic sync from rustc
2023-07-26 09:09:06 +00:00
Ralf Jung
38665a12be normalize tree borrow diagnostics across targets 2023-07-26 11:08:41 +02:00
Oli Scherer
ad8303739f Bump syn dependency 2023-07-26 08:42:40 +00:00
Oli Scherer
cf325e8187 Bump syn now that it doesn't affect diagnostics anymore 2023-07-26 08:26:50 +00:00
Oli Scherer
841f8dc19f Make x test src/tools/rustfmt --bless format rustfmt with the freshly built in-tree version 2023-07-26 08:22:52 +00:00
bors
a6236fa460 Auto merge of #102757 - pcc:android-std-tests, r=workingjubilee
Make std tests pass on newer Android

Newer versions of Android forbid the creation of hardlinks as well as Unix domain sockets in the /data filesystem via SELinux rules, which causes several tests depending on this behavior to fail. So let's skip these tests on Android if we see an EACCES from one of these syscalls. To achieve this, introduce a macro with the horrible name of or_panic_or_skip_on_android_eacces (better suggestions welcome) which skips (returns from) the test if an EACCES return value is seen on Android.
2023-07-26 07:57:32 +00:00
bors
cba1df1b66 Auto merge of #2992 - RalfJung:ci, r=RalfJung
CI tweaks
2023-07-26 07:40:36 +00:00
Ralf Jung
d81ab0d917 move CI var uses after their declaration 2023-07-26 09:11:25 +02:00
Ralf Jung
b452f50317 sparse registry has been stable for a bit now 2023-07-26 09:10:50 +02:00
Ralf Jung
58cb4849d3 move nightly cron job a little earlier 2023-07-26 09:09:57 +02:00
The Miri Conjob Bot
363fce5a92 fmt 2023-07-26 06:34:30 +00:00
The Miri Conjob Bot
eb3ccfd841 Merge from rustc 2023-07-26 06:32:12 +00:00
The Miri Conjob Bot
c5b26cd3ea Preparing for merge from rustc 2023-07-26 06:24:12 +00:00
bors
cf34adb0dd Auto merge of #113583 - asquared31415:tidy_no_issue_tests, r=workingjubilee
add tidy check that forbids issue-XXXX and ice-XXXX test filenames

Helps with #113345 by preventing any future tests with non-descriptive names from being added.

This PR only checks modified ui test files because there are far too many existing problematic tests to be fixed at once:
3063/15424 (~19.86%) `*.rs` ui test files match `^issue[-_ ]?\d+$`.
Another 1349 files, totaling ~28.60% of all ui test files, contain that pattern in addition to some other text, where they should probably omit it in favor of a comment.

note: between the creation of this PR and 2023-07-25 (14 days), 10 more tests were added that failed this check.

r? `@workingjubilee`
2023-07-26 04:35:37 +00:00
Eric Mark Martin
933fc180bd add stable NullaryOp 2023-07-26 00:22:38 -04:00
asquared31415
13e2abf6b3 add tidy check that forbids issue ui test filenames 2023-07-26 00:03:10 -04:00
Nicholas Nethercote
34b218e454 Add a comment to TokenCursor::desugar_doc_comments.
Useful information that took me some time to discern.
2023-07-26 13:38:56 +10:00
bors
98db99f5f6 Auto merge of #113928 - nicholasbishop:bishop-update-cb-4, r=workingjubilee
Bump compiler_builtins to 0.1.98

Change list: https://github.com/rust-lang/compiler-builtins/compare/0.1.95...0.1.98
2023-07-26 02:50:58 +00:00
Nicholas Nethercote
8bfc692851 Remove desugar_doc_comments arguments from TokenCursor::{inlined_,}next.
Because it's now always `self.desugar_doc_comments`.
2023-07-26 12:46:43 +10:00