Commit graph

265366 commits

Author SHA1 Message Date
Folkert de Vries
f7679d0507 propagate tainted_by_errors in MirBorrowckCtxt::emit_errors 2024-09-04 20:06:33 +02:00
bors
4ac7bcbaad Auto merge of #129962 - pietroalbini:pa-cve-2024-43402-nightly, r=Amanieu
[nightly] Fix CVE-2024-43402

Include the for CVE-2024-43402 in nightly. See [GHSA-2xg3-7mm6-98jj](https://github.com/rust-lang/rust/security/advisories/GHSA-2xg3-7mm6-98jj) for more information about it.

r? `@ghost`
2024-09-04 17:30:11 +00:00
Ryosuke Takahashi
49a93df77d fix: correct {Path,OsStr}::to_string_lossy() docs 2024-09-05 00:48:00 +09:00
liushuyu
6e4c5c10b9 tests: add an assembly scanning test for s390x backchain switch 2024-09-04 08:10:53 -06:00
Kalle Wachsmuth
0c45d3bb70
update docs of missing_abi lint 2024-09-04 14:30:56 +02:00
clubby789
5b96ae7106 Don't codegen expect in opt-level=0 2024-09-04 11:49:00 +00:00
onur-ozkan
c06ed92625 add change entry for rust.split-debuginfo removal
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-04 13:49:52 +03:00
onur-ozkan
c753d2dbf9 remove deprecated option rust.split-debuginfo
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-04 13:48:32 +03:00
Michael Goulet
42d2d7894c Make supertrait and implied predicates queries defaulted 2024-09-04 06:28:59 -04:00
Michael Goulet
8860008e7f Re-parent the by-move body 2024-09-04 06:28:32 -04:00
León Orell Valerian Liehr
93b4b2d51c
Temporarily remove fmease from the review rotation 2024-09-04 11:43:38 +02:00
onur-ozkan
9cb6d12f00 use the bootstrapped compiler for test-float-parse test
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-04 10:33:09 +03:00
chenx97
4df28b8bf1 forward linker option to lint-docs 2024-09-04 14:44:23 +08:00
bors
842d6fc32e Auto merge of #129356 - nikic:llvm19-host, r=Mark-Simulacrum
Update x86_64-linux host compiler to LLVM 19 rc 3
2024-09-04 02:55:57 +00:00
Boxy
a9998704d3 bump stage0 2024-09-04 03:13:55 +01:00
Literally Void
e2484be0c7 docs: add digit separators in Duration examples 2024-09-03 16:01:33 -07:00
Mark Rousskov
f3efe3de15 Add compat note for trait solver change 2024-09-03 17:04:28 -04:00
Michael Goulet
5525043ac8 Rename dump of coroutine by-move-body to be more consistent, adjust test 2024-09-03 16:22:28 -04:00
Michael Goulet
a4f2a311db Don't ICE when dumping MIR of a synthetic coroutine body 2024-09-03 16:22:28 -04:00
Guillaume Gomez
7157f98cb4 Fix square corners on line numbers when code is collapsed 2024-09-03 22:17:04 +02:00
Boxy
3dca90946f replace placeholder version 2024-09-03 20:54:02 +01:00
Ralf Jung
98f74b4d04 explain why Rvalue::Len still exists 2024-09-03 21:50:08 +02:00
Godfrey Chan
e45b53efc0
Update marker.rs 2024-09-03 12:29:23 -07:00
Godfrey Chan
277a08c7d8
Update marker.rs 2024-09-03 12:20:36 -07:00
Godfrey Chan
efc20deb57
Update marker.rs 2024-09-03 12:18:46 -07:00
Godfrey Chan
3626b66af0
Update marker.rs 2024-09-03 11:43:03 -07:00
liushuyu
e98e88bfdf rustc_codegen_llvm: fix a regression where backchain feature ...
... can not be correctly gated using #[cfg] macro
2024-09-03 12:42:57 -06:00
Godfrey Chan
65e78db8d7
Elaborate on deriving vs implementing Copy 2024-09-03 11:27:34 -07:00
onur-ozkan
b5d07fd356 copy rustc rustlib artifacts from ci-rustc
We recently had an issue because some rustlib files were missing (like: "error[E0463]: can't find crate for rustc_ast")
when building tools that rely on rustc. This patch fixes that by copying those files as required.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-03 21:03:46 +03:00
Nadrieril
040239465a Add an internal lint that warns when accessing untracked data 2024-09-03 19:14:19 +02:00
Matthias Krüger
2e005112fd
Rollup merge of #129930 - ferrocene:pa-relnotes-1801, r=pietroalbini
include 1.80.1 release notes on master

Forgot this during the release process.
2024-09-03 19:13:33 +02:00
Matthias Krüger
442c077994
Rollup merge of #129928 - RalfJung:rustc_driver_impl-crt-static, r=compiler-errors
rustc_driver_impl: remove some old dead logic

This got added in 5013952e4a, before `cfg(target_feature)` was stable. It should not be needed any more ever since `cfg(target_feature)` is stable.
2024-09-03 19:13:29 +02:00
Matthias Krüger
4ed0f0d384
Rollup merge of #129926 - nnethercote:mv-SanityCheck-and-MirPass, r=cjgillot
Move `SanityCheck` and `MirPass`

They are currently in `rustc_middle`. This PR moves them to `rustc_mir_transform`, which makes more sense.

r? ``@cjgillot``
2024-09-03 19:13:27 +02:00
Matthias Krüger
485fd3815c
Rollup merge of #129896 - lcnr:bail-on-unknowable, r=jackh726
do not attempt to prove unknowable goals

In case a goal is unknowable, we previously still checked all other possible ways to prove this goal, even though its final result is already guaranteed to be ambiguous. By ignoring all other candidates in that case we can avoid a lot of unnecessary work, fixing the performance regression in typenum found in #121848.

This is already the behavior in the old solver. This could in theory cause future-compatability issues as considering fewer goals unknowable may end up causing performance regressions/hangs. I am quite confident that this will not be an issue.

r? ``@compiler-errors``
2024-09-03 19:13:26 +02:00
Matthias Krüger
2f6e85567a
Rollup merge of #129863 - RalfJung:target-spec-features, r=wesleywiser
update comment regarding TargetOptions.features

The claim that `-Ctarget-features` cannot disable these features set in the target spec is definitely wrong -- I tried it for `x86_64-pc-windows-gnu`, which enables SSE3 that way. Building with `-Ctarget-feature=-sse3` works fine, and `cfg!(target_feature = "sse3")` is `false` in that build.

There are also some indications that these are actually intended to be overwritten:

3b14526cea/compiler/rustc_target/src/spec/targets/i686_unknown_uefi.rs (L22-L23)

84ac80f192/compiler/rustc_target/src/spec/targets/x86_64h_apple_darwin.rs (L18-L23)

So... let's update the comment to match reality, I guess?

The claim that they overwrite `-Ctarget-cpu` is based on
- for `native`, the comment in the apple target spec quoted above
- for other CPU strings, the assumption that `LLVMRustCreateTargetMachine` will apply these features after doing whatever the base CPU model does. I am not sure how to check that, I hope some LLVM backend people can chime in. :)
2024-09-03 19:13:25 +02:00
Matthias Krüger
1453cce5e9
Rollup merge of #129630 - alexcrichton:document-broken-c-abi-on-wasm32-u-u, r=workingjubilee
Document the broken C ABI of `wasm32-unknown-unknown`

Inspired by discussion on
https://github.com/rust-lang/rust/issues/129486 this is intended to at least document the current state of the world in a more public location than throughout a series of issues.
2024-09-03 19:13:24 +02:00
Matthias Krüger
e7504ac704
Rollup merge of #128934 - Nadrieril:fix-empty-non-exhaustive, r=compiler-errors
Non-exhaustive structs may be empty

This is a follow-up to a discrepancy noticed in https://github.com/rust-lang/rust/pull/122792: today, the following struct is considered inhabited (non-empty) outside its defining crate:
```rust
#[non_exhaustive]
pub struct UninhabitedStruct {
    pub never: !,
    // other fields
}
```

`#[non_exhaustive]` on a struct should mean that adding fields to it isn't a breaking change. There is no way that adding fields to this struct could make it non-empty since the `never` field must stay and is inconstructible. I suspect this was implemented this way due to confusion with `#[non_exhaustive]` enums, which indeed should be considered non-empty outside their defining crate.

I propose that we consider such a struct uninhabited (empty), just like it would be without the `#[non_exhaustive]` annotation.

Code that doesn't pass today and will pass after this:
```rust
// In a different crate
fn empty_match_on_empty_struct<T>(x: UninhabitedStruct) -> T {
    match x {}
}
```

This is not a breaking change.

r? ``@compiler-errors``
2024-09-03 19:13:24 +02:00
Matthias Krüger
51c686f32b
Rollup merge of #128701 - veera-sivarajan:fix-128604, r=estebank
Don't Suggest Labeling `const` and `unsafe` Blocks

Fixes #128604

Previously, both anonymous constant blocks (E.g. The labeled block
inside `['_'; 'block: { break 'block 1 + 2; }]`) and inline const
blocks (E.g. `const { ... }`) were considered to be the same
kind of blocks. This caused the compiler to incorrectly suggest
labeling both the blocks when only anonymous constant blocks can be
labeled.

This PR adds an other enum variant to `Context` so that both the
blocks can be handled appropriately.

Also, adds some doc comments and removes unnecessary `&mut` in a
couple of places.
2024-09-03 19:13:23 +02:00
Matthias Krüger
f75a1954eb
Rollup merge of #127692 - veera-sivarajan:bugfix-125139, r=estebank
Suggest `impl Trait` for References to Bare Trait in Function Header

Fixes #125139

This PR suggests `impl Trait` when `&Trait` is found as a function parameter type or return type. This makes use of existing diagnostics by adding `peel_refs()` when checking for type equality.

Additionaly, it makes a few other improvements:
1. Checks if functions inside impl blocks have bare trait in their headers.
2. Introduces a trait `NextLifetimeParamName` similar to the existing `NextTypeParamName` for suggesting a lifetime name. Also, abstracts out the common logic between the two trait impls.

### Related Issues
I ran into a bunch of related diagnostic issues but couldn't fix them within the scope of this PR. So, I have created the following issues:
1. [Misleading Suggestion when Returning a Reference to a Bare Trait from a Function](https://github.com/rust-lang/rust/issues/127689)
2. [Verbose Error When a Function Takes a Bare Trait as Parameter](https://github.com/rust-lang/rust/issues/127690)
3. [Incorrect Suggestion when Returning a Bare Trait from a Function](https://github.com/rust-lang/rust/issues/127691)

r​? ```@estebank``` since you implemented  #119148
2024-09-03 19:13:23 +02:00
bors
989f63bc53 Auto merge of #3856 - jder:mac-native-libs, r=RalfJung
Enable native libraries on macOS

Fixes #3595 by using `-fvisibility=hidden` and the visibility attribute supported by both gcc and clang rather than the previous gcc-only mechanism for symbol hiding. Also brings over cfg changes from #3594 which enable native-lib functionality on all unixes.

Thanks for taking a look, feedback very welcome!

cc `@RalfJung`
2024-09-03 14:23:04 +00:00
Alex Crichton
2d6d6a84df Updates/clarifications 2024-09-03 07:19:42 -07:00
Bryanskiy
59885f5065 Delegation refactoring: add builders for generics inheritance 2024-09-03 15:38:39 +03:00
Chris Denton
c811d3126f
More robust extension checking 2024-09-03 14:36:21 +02:00
Jesse Rusak
de96082152 Enable native libraries on macOS
Fixes #3595 by using -fvisibility=hidden and the visibility attribute supported by both gcc and clang rather than the previous gcc-only mechanism for symbol hiding. Also brings over cfg changes from #3594 which enable native-lib functionality on all unixes.
2024-09-03 08:29:51 -04:00
Pietro Albini
17f3f92e8b
include 1.80.1 release notes on master
Forgot this during the release process
2024-09-03 12:42:48 +02:00
Ralf Jung
aa1f60ecff rustc_driver_impl: remove some old dead logic 2024-09-03 09:42:37 +02:00
Ralf Jung
5c0dfc6182 update comment regarding TargetOptions.features 2024-09-03 09:35:15 +02:00
Jan Sommer
6fd358e99d Add documentation for target armv7-rtems-eabihf 2024-09-03 09:20:49 +02:00
Jan Sommer
124454cda8 rtems: Add spec file for arm_rtems6_eabihf 2024-09-03 09:20:49 +02:00
Jan Sommer
6f435cb07f Port std library to RTEMS 2024-09-03 09:19:29 +02:00