Commit Graph

266576 Commits

Author SHA1 Message Date
Folkert de Vries
90300ef40b add C-cmse-nonsecure-entry ABI 2024-09-21 13:04:14 +02:00
Folkert de Vries
1ddd67a79a add C-cmse-nonsecure-entry ABI 2024-09-21 13:04:14 +02:00
Gabriel Bjørnager Jensen
f48c5ec235 Mark and implement 'char::encode_utf16' as const; Rewrite 'encode_utf16_raw'; 2024-09-21 12:53:28 +02:00
EqualMa
d44a5fd00b
Fix docs of compare_bytes 2024-09-21 18:27:49 +08:00
Artyom Tetyukhin
019435b265
Remove x86_64-fuchsia and aarch64-fuchsia target aliases 2024-09-21 13:29:00 +04:00
bors
a3fea24971 Auto merge of #3901 - RalfJung:rustup, r=RalfJung
Rustup

This has a larger large "fmt" diff, probably there was a bug rustfmt update. For some reason the automatic `./miri fmt` on CI failed so this PR had to be created by hand -- it is unclear to me why this occurred.
2024-09-21 07:44:18 +00:00
Ralf Jung
7d9a4a7d3a fmt (with a huge diff for some reason) 2024-09-21 09:40:40 +02:00
Ralf Jung
90854b7670 Merge from rustc 2024-09-21 09:29:53 +02:00
Ralf Jung
c7e6284cf9 Preparing for merge from rustc 2024-09-21 09:29:28 +02:00
Ralf Jung
b94f2931b3 ABI compatibility: mention Result guarantee 2024-09-21 09:17:31 +02:00
bors
74fd001cda Auto merge of #130649 - matthiaskrgr:rollup-57zc7lz, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #129718 (add guarantee about remove_dir and remove_file error kinds)
 - #130598 (Add recursion limit to FFI safety lint)
 - #130642 (Pass the current cargo to `run-make` tests)
 - #130644 (Only expect valtree consts in codegen)
 - #130645 (Normalize consts in writeback when GCE is enabled)
 - #130646 (compiler: factor out `OVERFLOWING_LITERALS` impl)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-09-21 07:00:52 +00:00
Elli Howard
50b8915e6d
Add --enable-profiler to armhf dist
Adds the --enable-profiler flag to the RUST_CONFIGURE_ARGS for armhf distribution for Linux.  This enables running coverage for tests
2024-09-20 22:48:36 -07:00
许杰友 Jieyou Xu (Joe)
9ae1fb4329 Coalesce non_snake_case crate test set with revisions 2024-09-21 05:39:54 +00:00
许杰友 Jieyou Xu (Joe)
43ede7331d Explain why non_snake_case is skipped for binary crates 2024-09-21 05:24:26 +00:00
Matthias Krüger
5770ba8686
Rollup merge of #130646 - workingjubilee:literally-factorize-int-lint, r=compiler-errors
compiler: factor out `OVERFLOWING_LITERALS` impl

This puts it into `rustc_lint/src/types/literal.rs`. It then uses the fact that it's easier to navigate the logic to identify something that can easily be factored out, as an instance of "why".
2024-09-21 07:22:50 +02:00
Matthias Krüger
e6cf3bd267
Rollup merge of #130645 - compiler-errors:normalize-gce-writeback, r=BoxyUwU
Normalize consts in writeback when GCE is enabled

GCE lazily normalizes its unevaluated consts. This PR ensures that, like the new solver with its lazy norm types, we can assume that the writeback results are fully normalized.

This is important since we're trying to eliminate unnecessary calls to `ty::Const::{eval,normalize}` since they won't work with mGCE. Previously, we'd keep those consts unnormalized in writeback all the way through MIR build, and they'd only get normalized if we explicitly called `ty::Const::{eval,normalize}`, or during codegen since that calls `normalize_erasing_regions` (which invokes the `QueryNormalizer`, which evaluates the const accordingly).

This hack can (hopefully obviously) be removed when mGCE is implemented and we yeet the old GCE; it's only reachable with the GCE flag anyways, so I'm not worried about the implications here.

r? `@BoxyUwU`
2024-09-21 07:22:49 +02:00
Matthias Krüger
ff6cd18a75
Rollup merge of #130644 - compiler-errors:consts-in-codegen, r=BoxyUwU
Only expect valtree consts in codegen

Turn a bunch of `Const::eval_*` calls into `Const::try_to_*` calls, which implicitly assert that we only have valtrees by the time we get to codegen.

r? `@BoxyUwU`
2024-09-21 07:22:49 +02:00
Matthias Krüger
43366285f4
Rollup merge of #130642 - cuviper:run-make-cargo, r=jieyouxu
Pass the current cargo to `run-make` tests

A couple tests were using `BOOTSTRAP_CARGO` with `-Zbuild-std`, but that
stage0 cargo might not always be in sync with in-tree changes. In
particular, those tests started failing on the beta branch because the
older cargo couldn't find the library `Cargo.lock`, and then couldn't
build the latest version of `compiler_builtins` that had nightly changes.

Fixes #130634
r? `@saethlin`
2024-09-21 07:22:48 +02:00
Matthias Krüger
28ace83b11
Rollup merge of #130598 - gurry:130310-improper-types-stack-overflow, r=compiler-errors
Add recursion limit to FFI safety lint

Fixes #130310

Now we check against `tcx.recursion_limit()` and raise an error if it the limit is reached instead of overflowing the stack.
2024-09-21 07:22:47 +02:00
Matthias Krüger
f2290c23fc
Rollup merge of #129718 - lolbinarycat:remove_dir-docs, r=Noratrieb
add guarantee about remove_dir and remove_file error kinds

approved in ACP https://github.com/rust-lang/libs-team/issues/433
2024-09-21 07:22:47 +02:00
Ben Kimock
aa28ee1718 Fix clippy 2024-09-21 01:07:00 -04:00
Ben Kimock
523f8f8398 Compute reachable locals as part of non_ssa_locals 2024-09-21 01:07:00 -04:00
Ben Kimock
0ea5dc506f Don't alloca for unused locals 2024-09-21 01:06:59 -04:00
onur-ozkan
f23d0b9c9d move enzyme flags from general cargo to rustc-specific cargo
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-21 07:35:27 +03:00
Michael Goulet
af24d0b660 Resolve self type alias in impl for RTN 2024-09-20 22:18:57 -04:00
Michael Goulet
174c3f9519 Add missing diagnostics and flesh out tests 2024-09-20 22:18:57 -04:00
Michael Goulet
7c8e281f73 Flesh out some TODOs 2024-09-20 22:18:57 -04:00
Michael Goulet
51b51bb570 Implement RTN in resolve_bound_vars and HIR ty lowering 2024-09-20 22:18:57 -04:00
Michael Goulet
19881b5a5a Conditionally allow lowering RTN (..) in paths 2024-09-20 22:18:57 -04:00
Michael Goulet
6d788a18c5 Resolve RTN for TyKind::Path ending in (..) 2024-09-20 22:18:57 -04:00
okaneco
b94c5a169b Avoid re-validating UTF-8 in FromUtf8Error::into_utf8_lossy
Refactor `into_utf8_lossy` to copy valid UTF-8 bytes into the buffer,
avoiding double validation of bytes.
Add tests that mirror the `String::from_utf8_lossy` tests
2024-09-20 20:56:07 -04:00
Michael Goulet
c0d1a1305d Only expect mono consts in CFI 2024-09-20 20:38:13 -04:00
Michael Goulet
d3f270b542 Normalize transparent struct field type in CFI 2024-09-20 20:38:13 -04:00
Michael Goulet
460abead20 Do not unnecessarily eval consts in codegen 2024-09-20 20:38:11 -04:00
Michael Goulet
914193c8f4 Do not unnecessarily eval consts in codegen 2024-09-20 20:38:11 -04:00
Michael Goulet
920a973bdb Don't emit spurious error for pattern matched array with erroneous len const 2024-09-20 20:26:20 -04:00
Michael Goulet
a9a8f79f86 Normalize unevaluated consts in GCE 2024-09-20 20:24:22 -04:00
Jubilee Young
844edfe449 compiler: reuse {un,}signed_fit in get_type_suggestion (nfc)
no need for a weird macro when a self-explanatory `match` will do.
2024-09-20 17:19:27 -07:00
Josh Stone
4e53640b17 Pass the current cargo to run-make tests
A couple tests were using `BOOTSTRAP_CARGO` with `-Zbuild-std`, but that
stage0 cargo might not always be in sync with in-tree changes. In
particular, those tests started failing on the beta branch because the
older cargo couldn't find the library `Cargo.lock`, and then couldn't
build the latest version of `compiler_builtins` that had nightly changes.
2024-09-20 15:47:36 -07:00
bors
c0838c8ebe Auto merge of #130632 - weihanglo:update-cargo, r=weihanglo
Update cargo

16 commits in a9a418d1a22f29e7dfd034e3b93f15657e608a29..eaee77dc1584be45949b75e4c4c9a841605e3a4b
2024-09-15 19:13:12 +0000 to 2024-09-19 21:10:23 +0000
- fix(complete): Harden `--target` completions (rust-lang/cargo#14564)
- Cleanup duplicated check-cfg lint logic (rust-lang/cargo#14567)
- Revert "remove reference to incomplete crates.io feature from docs" (rust-lang/cargo#14562)
- feat: Add custom completer for `cargo help &lt;TAB&gt;` (rust-lang/cargo#14557)
- docs(unstable): Expand on completion documentation (rust-lang/cargo#14563)
- feat: Add custom completer for `cargo build --example=&lt;TAB&gt;` (rust-lang/cargo#14531)
- remove reference to incomplete crates.io feature from docs (rust-lang/cargo#14561)
- fix(complete): Fix problems on my machine (rust-lang/cargo#14558)
- feat: Add custom completer for completing benchmark names (rust-lang/cargo#14532)
- refactor(info): Use the `shell.note` to print the note (rust-lang/cargo#14554)
- feat: Add custom completer for completing test names (rust-lang/cargo#14548)
- Suggest `cargo info` command in the `cargo search` result (rust-lang/cargo#14537)
- feat: Add custom completer for completing target triple (rust-lang/cargo#14535)
- feat: Add custom completer for `cargo -Z &lt;TAB&gt;` (rust-lang/cargo#14536)
- feat: Add custom completer for completing installed binaries (rust-lang/cargo#14534)
- feat: Add custom completer for completing bin names (rust-lang/cargo#14533)

r? ghost
2024-09-20 22:47:08 +00:00
Jubilee Young
2db62e6893 compiler: factor OVERFLOWING_LITERALS impl into a file (nfc)
no functional changes should arise, just moves the lint impl details out
of a very crowded file with lots of different lints in it.
2024-09-20 15:26:01 -07:00
Josh Stone
a5b9605cea Update to LLVM 19.1.0 2024-09-20 14:41:36 -07:00
bors
da889684c8 Auto merge of #130631 - GuillaumeGomez:rollup-jpgy1iv, r=GuillaumeGomez
Rollup of 7 pull requests

Successful merges:

 - #128209 (Remove macOS 10.10 dynamic linker bug workaround)
 - #130526 (Begin experimental support for pin reborrowing)
 - #130611 (Address diagnostics regression for `const_char_encode_utf8`.)
 - #130614 (Add arm64e-apple-tvos target)
 - #130617 (bail if there are too many non-region infer vars in the query response)
 - #130619 (Fix scraped examples height)
 - #130624 (Add `Vec::as_non_null`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-09-20 19:51:45 +00:00
f5514cb92a
Pass tidy 2024-09-20 14:38:36 -05:00
202eb774c2
mikros: Add FileExt trait to allow getting underline PID and FD of a file 2024-09-20 14:34:39 -05:00
Weihang Lo
2fa97d714e
Update cargo 2024-09-20 15:06:27 -04:00
nora
c72264157b
Remove double spaces 2024-09-20 19:55:28 +02:00
Guillaume Gomez
81b818e15a
Rollup merge of #130624 - theemathas:vec_as_non_null, r=Noratrieb
Add `Vec::as_non_null`

Implements the ACP: https://github.com/rust-lang/libs-team/issues/440

The documentation is mostly copied from the existing `Vec::as_mut_ptr` method.

I am adding this method to the already-existing `box_vec_non_null` feature tracked at https://github.com/rust-lang/rust/issues/130364.
2024-09-20 19:46:41 +02:00
Guillaume Gomez
5708062bc1
Rollup merge of #130619 - GuillaumeGomez:scraped-examples-height, r=notriddle
Fix scraped examples height

Fixes [#130562](https://github.com/rust-lang/rust/issues/130562).

You can test it [here](https://rustdoc.crud.net/imperio/scraped-examples-height/doc/scrape_examples/fn.test_many.html).

I also used this opportunity to reduce the padding on line numbers:

| before | after |
| - | - |
| ![Screenshot from 2024-09-20 16-20-40](https://github.com/user-attachments/assets/9434704c-afe0-4ec3-a1dc-6f3c16d03b3b) | ![Screenshot from 2024-09-20 16-20-13](https://github.com/user-attachments/assets/f3bd01bf-760a-4acd-ba34-8e7db083245a) |

r? `@notriddle`
2024-09-20 19:46:40 +02:00
Guillaume Gomez
7adf4c2b6f
Rollup merge of #130617 - lcnr:nalgebra-hang-3, r=compiler-errors
bail if there are too many non-region infer vars in the query response

A minimal fix for the hang in nalgebra. If the query response would result in too many distinct non-region inference variables, simply overwrite the result with overflow. This should either happen if the result already has too many distinct type inference variables, or if evaluating the query encountered a lot of ambiguous associated types. In both cases it's straightforward to wait until the aliases are no longer ambiguous and then try again.

r? `@compiler-errors`
2024-09-20 19:46:40 +02:00