Commit Graph

270748 Commits

Author SHA1 Message Date
Ben Kimock
c272bb4ec0
Merge pull request #4019 from rust-lang/rustup-2024-11-09
Automatic Rustup
2024-11-09 06:57:05 +00:00
Zachary S
5f6645dc51 Add test for str for "expected primitive, found type" 2024-11-09 00:23:53 -06:00
Zachary S
d37e6dfee8 Add str to "expected primitive, found type" diagnostic 2024-11-09 00:18:47 -06:00
The Miri Cronjob Bot
15d883e5b7 Merge from rustc 2024-11-09 05:12:46 +00:00
The Miri Cronjob Bot
beb8d6fac1 Preparing for merge from rustc 2024-11-09 05:04:45 +00:00
Jubilee
c4922f12fd
Rollup merge of #132780 - compiler-errors:verbose, r=estebank
use verbose for path separator suggestion

A single `-` of suggestion underlining that is adjacent to a much more significant `^^^` underlying of the LHS path component is hard to distinguish. IMO this presents much more cleanly when it's verbose, especially because it's a *replacment* suggestion.

r? estebank
2024-11-08 20:46:15 -08:00
Jubilee
dc647392d6
Rollup merge of #132778 - lolbinarycat:io-Error-into_inner-docs, r=cuviper
update io::Error::into_inner to acknowledge io::Error::other
2024-11-08 20:46:13 -08:00
Jubilee
b598849941
Rollup merge of #132760 - dianne:iter-into-iter, r=lcnr
Don't suggest `.into_iter()` on iterators

This makes the the suggestion to call `.into_iter()` only consider unsatisfied `Iterator` bounds for the receiver type itself. That way, it ignores predicates generated by trying to auto-ref the receiver (the result of which usually won't implement `Iterator`).

Fixes #127511

Unfortunately, the error in that case is still confusing: it labels `Iterator` as an unsatisfied bound because `&impl Iterator: Iterator` can't be satisfied, despite that not being required or helpful. I'd like to handle that in a separate PR. ~~I'm hoping fixing #124802 will fix it too.~~ It doesn't look connected to that issue. Still, I think it'd be clearest to visually distinguish unsatisfied predicates from different attempts at `pick_method`; I'll make a PR for that soon.
2024-11-08 20:46:12 -08:00
Jubilee
7a4970476e
Rollup merge of #132757 - compiler-errors:yeet-check-wf, r=lcnr
Get rid of `check_opaque_type_well_formed`

Instead, replicate it by improving the span of the opaque in `check_opaque_meets_bounds`.

This has two consequences:
1. We now prefer "concrete type differs" errors, since we'll hit those first before we check the opaque is WF.
2. Spans have gotten slightly worse.

Specifically, (2.) could be improved by adding a new obligation cause that explains that the definition's environment has stronger assumptions than the declaration.

r? lcnr
2024-11-08 20:46:12 -08:00
Jubilee
1077c08ad5
Rollup merge of #132755 - compiler-errors:reveal-param, r=lcnr
Do not reveal opaques in the param-env, we got lazy norm instead

r? lcnr
2024-11-08 20:46:11 -08:00
bors
012ae13d6a Auto merge of #132549 - Zalathar:rust-string, r=cuviper
Make `RustString` an extern type to avoid `improper_ctypes` warnings

Currently, any FFI function that uses `&RustString` needs to also add `#[ignore(improper_ctypes)]` to silence a warning.

The warning is not _completely_ bogus, because `RustString` contains `Vec<u8>` and therefore does not have a guaranteed layout. But we have no way of telling the lint that this doesn't matter, because the C++ code only uses that pointer opaquely and never relies on its underlying layout.

Ideally there would be some way to silence `improper_ctypes` at the type-definition site. But because there isn't, casting to and from a separate extern type is better than having to annotate every single use site.
2024-11-09 04:43:51 +00:00
Michael Goulet
13ab08d7dc Do not reveal opaques in the param-env, we got lazy norm instead 2024-11-09 03:55:07 +00:00
dianne
cea82ed162 Don't suggest .into_iter() on iterators 2024-11-08 17:43:13 -08:00
Maybe Lapkin
22069682ed Use a separate dir for r-a builds consistently in helix config 2024-11-09 01:27:29 +01:00
Zalathar
89d7efaf8f Make RustString an extern type to avoid improper_ctypes warnings 2024-11-09 11:07:44 +11:00
Augie Fackler
a10e744faf rustc_target: more target string fixes for LLVM 20
LLVM continues to clean these up, and we continue to make this
consistent. This is similar to 9caced7bad
and e985396145.

@rustbot label: +llvm-main
2024-11-08 16:54:35 -05:00
bors
328b759142 Auto merge of #132764 - MikaelUrankar:freebsd_armv7, r=workingjubilee
Drop "gnu" in the target env for FreeBSD armv6/7

FreeBSD is not a GNU system
2024-11-08 21:42:45 +00:00
c2dd19bc8f
mikros: Give kernel exit code instead of calling proc_man directly 2024-11-08 14:52:24 -06:00
201eaf576a
mikros: Add process wait support 2024-11-08 13:39:13 -06:00
8fa25a4322
mikros: Send main return value to proc_man on exit 2024-11-08 13:38:10 -06:00
e94e542f25
mikros: Fix RPC proto # on exit proc_man call 2024-11-08 12:37:37 -06:00
Taiki Endo
c059eb7750 Add v8plus target feature to sparc and use it in create_object_file 2024-11-09 03:22:09 +09:00
05d2060582
mikros: Make stdio inheriting the default on process spawn 2024-11-08 12:19:04 -06:00
Taiki Endo
400a690b5f Add v9 and leoncasa target feature to sparc 2024-11-09 03:17:24 +09:00
onur-ozkan
2a381086bb fix core::config::tests::override_toml
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-08 20:25:54 +03:00
Michael Goulet
0e481b44f5 use verbose for path separator suggestion 2024-11-08 16:58:19 +00:00
bors
59cec72a57 Auto merge of #132746 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

r? `@Manishearth`
2024-11-08 16:49:13 +00:00
binarycat
b004cac72e update io::Error::into_inner to acknowlage io::Error::other 2024-11-08 10:43:34 -06:00
7a029c4a0a
mikros: Send message to proc_man on exit 2024-11-08 10:34:05 -06:00
bjorn3
8a0053e9e1 Use a BufWriter in emit_module to reduce syscall overhead
For the coercions rustc-perf benchmark without this commit reduces the
total amount of time it takes to emit the object file from 270ms to
27ms.
2024-11-08 16:43:25 +01:00
Augie Fackler
8fcc020a0c try_question_mark_nop: update test for LLVM 20
llvm/llvm-project@dd116369f6 changes the
IR of this test in a way that I don't think is bad, but needs adjusting.

r? @nikic
@rustbot label: +llvm-main
2024-11-08 10:43:06 -05:00
Ralf Jung
d7aceeea71
Merge pull request #4004 from YohDeadfall/thread-name-ice-fix
Get/set thread name shims return errors for invalid handles
2024-11-08 15:19:51 +00:00
bjorn3
c637a84ad4 Add finish_ongoing_codegen timer in join_codegen to match cg_llvm 2024-11-08 16:14:09 +01:00
Ralf Jung
c8e089edc8
Merge pull request #4018 from YohDeadfall/ecx-name-standardization
Standardized variable names for InterpCx
2024-11-08 15:03:24 +00:00
Yoh Deadfall
1254d8e75e Get/set thread name shims return errors for invalid handles 2024-11-08 17:54:10 +03:00
bjorn3
6ffab47e55 Use lld with non-LLVM backends
On arm64, Cranelift used to produce object files that don't work with
lld. This has since been fixed. The GCC backend should always produce
object files that work with lld unless lld for whatever reason drops GCC
support. Most of the other more niche backends don't use cg_ssa's linker
code at all. If they do and don't work with lld, they can always disable
lld usage using a cli argument.

Without this commit using cg_clif is by default in a non-trivial amount
of cases a perf regression on Linux due to ld.bfd being a fair bit
slower than lld. It is possible to explicitly enable it without this
commit, but most users are unlikely to do this.
2024-11-08 15:20:20 +01:00
onur-ozkan
2e0afc8b71 respect to global download-rustc default in non-dist profiles
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-08 16:26:00 +03:00
onur-ozkan
cce6f03754 use download-rustc="if-unchanged" as default whenever possible
"whenever possible" means applying it if `download-rustc` isn't explicitly set and
the source is Git-managed.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-08 16:23:59 +03:00
onur-ozkan
76b6090df5 read repository information configs at an earlier stage
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-08 16:23:07 +03:00
Zalathar
730626dbd9 Don't use LLVMRustStringWriteImpl outside of RawRustStringOstream 2024-11-08 22:31:32 +11:00
bors
209799f3b9 Auto merge of #132717 - RalfJung:rustc_safe_intrinsic, r=compiler-errors
remove support for rustc_safe_intrinsic attribute; use rustc_intrinsic functions instead

This brings us one step closer towards removing support for `extern "rust-intrinsic"` blocks, in favor of `#[rustc_intrinsic]` functions.

Also move `#[rustc_intrinsic]` under the `intrinsics` feature gate, to match the `extern "rust-intrinsic"` style.
2024-11-08 10:28:47 +00:00
Philipp Krones
0aafd6552b
Clippy: cfg out validate_diag on release builds 2024-11-08 10:49:54 +01:00
Zalathar
3c30fe3423 coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
Zalathar
996bdabc2a coverage: Remove unhelpful code for handling multiple files per function
Functions currently can't have mappings in multiple files, and if that ever
changes (e.g. to properly support expansion regions), this code will need to be
completely overhauled anyway.
2024-11-08 20:43:08 +11:00
Zalathar
3f9c54caf0 coverage: Add GlobalFileId for stricter type-checking of file IDs
We already had a dedicated `LocalFileId` index type, but previously we used a
raw `u32` for global file IDs, because index types were harder to pass through
FFI.
2024-11-08 20:43:08 +11:00
Zalathar
7c76995950 coverage: Pass ExtractedHirInfo to make_source_region
This isn't strictly necessary, but makes it easier to distinguish `body_span`
from the specific `span` being processed.
2024-11-08 20:38:35 +11:00
Mikael Urankar
f7580c6f48 Drop "gnu" in the target env for FreeBSD armv6/7
FreeBSD is not a GNU system
2024-11-08 09:29:52 +01:00
Ralf Jung
00354ddaa6 remove support for rustc_safe_intrinsic attribute; use rustc_intrinsic functions instead 2024-11-08 09:16:00 +01:00
Ralf Jung
e3010e84db remove support for rustc_safe_intrinsic attribute; use rustc_intrinsic functions instead 2024-11-08 09:16:00 +01:00
bors
6295686a37 Auto merge of #132762 - Zalathar:rollup-qfgz165, r=Zalathar
Rollup of 5 pull requests

Successful merges:

 - #132161 ([StableMIR] A few fixes to pretty printing)
 - #132389 (coverage: Simplify parts of coverage graph creation)
 - #132452 (coverage: Extract safe FFI wrapper functions to `llvm_cov`)
 - #132590 (Simplify FFI calls for `-Ztime-llvm-passes` and `-Zprint-codegen-stats`)
 - #132738 (Initialize channel `Block`s directly on the heap)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-11-08 08:00:08 +00:00