Commit Graph

266572 Commits

Author SHA1 Message Date
bors
66b0b29e65 Auto merge of #130724 - compiler-errors:bump, r=Mark-Simulacrum
Bump stage0 to beta-2024-09-22 and rustfmt to nightly-2024-09-22

I'm doing this to apply the changes to version sorting (https://github.com/rust-lang/rustfmt/pull/6284) that have occurred since rustfmt last upgraded (and a few other miscellaneous changes, like changes to expression overflowing: https://github.com/rust-lang/rustfmt/pull/6260). Eagerly updating rustfmt and formatting-the-world will ideally move some of the pressure off of the beta bump which will happen at the beginning of the next release cycle.

You can verify this is correct by checking out the changes, reverting the last commit, reapplying them, and diffing the changes:

```
git fetch git@github.com:compiler-errors/rust.git bump
git checkout -b bump FETCH_HEAD
git reset --hard HEAD~5
./x.py fmt --all
git diff FETCH_HEAD
# ignore the changes to stage0, and rustfmt.toml,
# and test file changes in rustdoc-js-std, run-make.
```

Or just take my word for it? Up to the reviewer.

r? release
2024-09-23 02:02:22 +00:00
Michael Goulet
9132770c8f Fix hard-coded stderr in run-make test 2024-09-22 21:56:38 -04:00
Michael Goulet
3be34a8b53 Bless rustdoc-js-std test 2024-09-22 20:35:10 -04:00
Jubilee Young
ff3a9f4e2a tests: Remove spuriously failing vec-tryinto-array codegen test 2024-09-22 16:46:10 -07:00
Nicholas Nethercote
73cc575177 Fix break_last_token.
It currently doesn't handle the three-char tokens `>>=` and `<<=`
correctly. These can be broken twice, resulting in three individual
tokens. This is a latent bug that currently doesn't cause any problems,
but does cause problems for #124141, because that PR increases the usage
of lazy token streams.
2024-09-23 09:14:30 +10:00
bors
d14c1c75ab Auto merge of #130680 - saethlin:module-name-to-str, r=jieyouxu
Call module_name_to_str instead of just unwrapping

This makes the ICE message in https://github.com/rust-lang/rust/issues/130678 more clear. It looks like not calling this function was just an oversight in https://github.com/rust-lang/rust/pull/76859, but clearly not a major one because it's taken us 4 years to notice.

try-job: i686-msvc
2024-09-22 23:14:12 +00:00
Michael Goulet
02b0f3b5ab Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
Michael Goulet
c682aa162b Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
Michael Goulet
1173204b36 Use style_edition over version 2024-09-22 19:11:28 -04:00
Michael Goulet
624bc65665 Bump stage0 2024-09-22 19:04:19 -04:00
Oli Iliffe
e9b0bc9432 Add test for available_parallelism()
This is a redo of (this PR)[https://github.com/rust-lang/rust/pull/104095].

Add test for available_parallelism

Add test for available_parallelism

Add test for

Add test for
2024-09-22 23:46:08 +01:00
Pavel Grigorenko
8d2809957e Add more test cases for block-no-opening-brace 2024-09-22 23:29:25 +03:00
5ccb37a3f7
mikros: Do not close stdio after every use 2024-09-22 14:53:27 -05:00
bors
6c6d210089 Auto merge of #130710 - GuillaumeGomez:rollup-mfuha68, r=GuillaumeGomez
Rollup of 5 pull requests

Successful merges:

 - #130658 (Fix docs of compare_bytes)
 - #130670 (delay uncapping the max_read_size in File::read_to_end)
 - #130690 (interpret: remove outdated FIXME)
 - #130692 (make unstable Result::flatten a const fn)
 - #130702 (Add some missing unstable book tracking issue links)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-09-22 19:41:01 +00:00
7bd76e861a
mikros: Fix File::duplicate using wrong RPC proto/func 2024-09-22 13:56:19 -05:00
Michael Goulet
2273aeed9d Replace calls to Const::eval in mir build 2024-09-22 14:12:37 -04:00
bjorn3
ab7777f982 Fix rustc test suite 2024-09-22 18:10:08 +00:00
Michael Goulet
01d19d7be9 Don't call try_eval_target_usize in error reporting 2024-09-22 13:55:06 -04:00
Michael Goulet
8f579497f7 Don't call const normalize in error reporting 2024-09-22 13:55:06 -04:00
Gabriel Bjørnager Jensen
2daf076fd8 Mark 'make_ascii_uppercase' and 'make_ascii_lowercase' in 'u8' as const; Rename 'const_char_make_ascii' feature gate to 'const_make_ascii'; 2024-09-22 19:54:35 +02:00
Michael Goulet
3b8089a320 Introduce structurally_normalize_const, use it in hir_typeck 2024-09-22 13:54:16 -04:00
bjorn3
27b21af624 Rustup to rustc 1.83.0-nightly (1d68e6dd1 2024-09-21) 2024-09-22 17:35:29 +00:00
Guillaume Gomez
a34e0f5600
Rollup merge of #130702 - clubby789:unstable-book-docs, r=ehuss
Add some missing unstable book tracking issue links
2024-09-22 19:19:16 +02:00
Guillaume Gomez
c43a9ea146
Rollup merge of #130692 - RalfJung:result-flatten, r=Noratrieb
make unstable Result::flatten a const fn

This method is still unstable (tracked at https://github.com/rust-lang/rust/issues/70142), but there's no reason I can see for it not to be const -- after all, `Option::flatten` is const. So let's make the `Result` one `const` as well, under the same feature gate.

Cc https://github.com/rust-lang/rust/issues/70142
2024-09-22 19:19:16 +02:00
Guillaume Gomez
f40efa44ab
Rollup merge of #130690 - RalfJung:interpret-abi-compat-fixme, r=jieyouxu
interpret: remove outdated FIXME

The rule about `repr(C)` types with compatible fields got removed from the ABI compat docs before they landed, so this FIXME here is no longer correct. (So this is basically a follow-up to https://github.com/rust-lang/rust/pull/130185, doing some more cleanup around deciding not to guarantee ABI compatibility for structurally compatible `repr(C)` types.)
2024-09-22 19:19:15 +02:00
Guillaume Gomez
82b4177395
Rollup merge of #130670 - the8472:read-to-end-heuristics, r=ChrisDenton
delay uncapping the max_read_size in File::read_to_end

In https://github.com/rust-lang/rust/issues/130600#issuecomment-2365136985 I realized that we're likely still passing too-large buffers to the OS, at least once at the end.

Previous issues and PRs:
* #110650
* #110655
* #118222

r? ChrisDenton
2024-09-22 19:19:15 +02:00
Guillaume Gomez
cbf23960ea
Rollup merge of #130658 - EqualMa:patch-1, r=scottmcm
Fix docs of compare_bytes

The docs of `compare_bytes`. The return value is positive if <del>`right`</del> `left` is greater
2024-09-22 19:19:14 +02:00
bors
8ed95d1d9e Auto merge of #130709 - RalfJung:miri-sync, r=RalfJung
Miri subtree update

r? `@ghost`
2024-09-22 17:17:11 +00:00
bjorn3
1d53572570 Sync from rust 1d68e6dd1d 2024-09-22 17:14:10 +00:00
5ff8990346
mikros: Properly implement stdio 2024-09-22 11:57:19 -05:00
bors
599b3295f5 Auto merge of #3852 - tiif:rwrefactor, r=RalfJung
Refactor fd read/write

This PR passed the responsibility of reading to user supplied buffer and dest place to each implementation of ``FileDescription::read/write/pread/pwrite``.

This is part of #3665.
2024-09-22 14:54:30 +00:00
Ralf Jung
d70fd882ef simplify eventfd handling a bit 2024-09-22 16:50:38 +02:00
Ralf Jung
ed24426824 remove some unnecessary to_owned 2024-09-22 16:50:38 +02:00
Ralf Jung
5dee646aea read, write: move cast-to-usize logic up and deduplicate it 2024-09-22 16:50:37 +02:00
Ralf Jung
fb1193078d further tweak FileDescription comments 2024-09-22 16:50:37 +02:00
tiif
d29be1f90a Pass pointer and len to FileDescription::write and change the type of len in read to usize 2024-09-22 16:50:36 +02:00
tiif
503b6af065 Use &[u8] instead of Vec<u8> and improve docs 2024-09-22 16:50:17 +02:00
Michael Goulet
95469dc09a No longer mark RTN as incomplete 2024-09-22 10:46:59 -04:00
clubby789
0510f06ad7 Add some missing tracking issue links 2024-09-22 14:03:48 +00:00
bors
0af7f0f4c4 Auto merge of #130697 - bjoernager:const-char-make-ascii, r=dtolnay
Mark `char::make_ascii_uppercase` and `char::make_ascii_lowercase` as const.

Relevant tracking issue: #130698

The `make_ascii_uppercase` and `make_ascii_lowercase` methods in `char` should be marked "const."

With the stabilisation of [`const_mut_refs`](https://github.com/rust-lang/rust/issues/57349/), this simply requires adding the `const` specifier to the function signatures.
2024-09-22 13:55:07 +00:00
nora
f5686e3cc9
Write return value for ptr_mask intrinsic (#1536)
This was forgotten. Without it, ptr_mask just always returns null.
2024-09-22 15:46:44 +02:00
Gabriel Bjørnager Jensen
be9b3b459a Mark 'make_ascii_uppercase' and 'make_ascii_lowercase' in 'char' as const; 2024-09-22 14:26:29 +02:00
bors
8243a8ca93 Auto merge of #3903 - RalfJung:auto-prs, r=RalfJung
try to give the CI job permission to create PRs

See the discussion [here](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/did.20github.20token.20permissions.20change.3F).

`@rust-lang/infra` just a heads-up that we are doing this -- I have no idea if this could cause any issues elsewhere, or if it is important that we limit the permissions here somehow, or so.
2024-09-22 10:53:45 +00:00
Ralf Jung
2859f2bafc try to give the CI job permission to create PRs 2024-09-22 12:51:11 +02:00
bors
4ae36d906f Auto merge of #130689 - RalfJung:rustc_nonnull_optimization_guaranteed, r=jieyouxu
fix rustc_nonnull_optimization_guaranteed docs

As far as I can tell, even back when this was [added](https://github.com/rust-lang/rust/pull/60300) it never *enabled* any optimizations. It just indicates that the FFI compat lint should accept those types for NPO.
2024-09-22 10:18:59 +00:00
Ralf Jung
8103505a4d fix rustc_nonnull_optimization_guaranteed docs 2024-09-22 10:00:24 +02:00
bors
80aa6fa731 Auto merge of #130688 - workingjubilee:rollup-ovre6p7, r=workingjubilee
Rollup of 5 pull requests

Successful merges:

 - #130648 (move enzyme flags from general cargo to rustc-specific cargo)
 - #130650 (Fixup Apple target's description strings)
 - #130664 (Generate line numbers for non-rust code examples as well)
 - #130665 (Prevent Deduplication of `LongRunningWarn`)
 - #130669 (tests: Test that `extern "C" fn` ptrs lint on slices)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-09-22 07:48:56 +00:00
Ralf Jung
89c3cbafb8 make unstable Result::flatten a const fn 2024-09-22 08:40:25 +02:00
bors
ee20c86282 Auto merge of #3902 - RalfJung:rustup, r=RalfJung
Rustup
2024-09-22 06:31:10 +00:00
Ralf Jung
d877ec2a3e rustfmt: switch over to setting style_edition 2024-09-22 08:29:28 +02:00