Commit graph

235118 commits

Author SHA1 Message Date
bors
a28077b28a Auto merge of #118607 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum
[stable] 1.74.1 release

This includes backports of:

*  Dispose llvm::TargetMachines prior to llvm::Context being disposed #118464
*  clarify fn discriminant guarantees: only free lifetimes may get erased #118006
*  Move subtyper below reveal_all and change reveal_all #116415
   *  Make subtyping explicit in MIR #115025 (needed for above)

As well as infrastructure fix:

*  Don't ask for a specific branch in cargotest #118597

r? `@Mark-Simulacrum`
2023-12-04 19:46:46 +00:00
Laurențiu Nicola
de148ecd5c Don't ask for a specific branch in cargotest 2023-12-04 10:04:12 -05:00
Mark Rousskov
66033ec4e5 Add release notes for 1.74.1 2023-12-04 10:03:38 -05:00
ouz-a
8c7bc2fd36 move subtyper change reveal_all 2023-12-04 09:58:45 -05:00
ouz-a
63976da0e8 have better explanation for relate_types 2023-12-04 09:55:14 -05:00
ouz-a
41b0ddd937 change is_subtype to relate_types 2023-12-04 09:55:14 -05:00
ouz-a
caab4b7d94 Add docs, remove code, change subtyper code 2023-12-04 09:55:14 -05:00
ouz-a
fa7a3184b4 subtyping_projections 2023-12-04 09:55:14 -05:00
lcnr
97dcd63d17 only free lifetimes may get erased 2023-12-04 09:51:09 -05:00
Wesley Wiser
f0444a5a28 Update compiler/rustc_codegen_llvm/src/lib.rs
Co-authored-by: Josh Stone <cuviper@gmail.com>
2023-12-04 09:51:02 -05:00
Wesley Wiser
23030871cc Dispose llvm::TargetMachines prior to llvm::Context being disposed
If the TargetMachine is disposed after the Context is disposed, it can
lead to use after frees in some cases.

I've observed this happening occasionally on code compiled for
aarch64-pc-windows-msvc using `-Zstack-protector=strong` but other users
have reported AVs from host aarch64-pc-windows-msvc compilers as well.
2023-12-04 09:51:01 -05:00
bors
79e9716c98 Auto merge of #117843 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum
[stable] Prepare 1.74.0 release

https://forge.rust-lang.org/release/process.html#promote-branches-t-3-days-monday

Also backports:

* Disabling specialization as an alternative backport of "Fix excessive initialization and reads beyond EOF in io::copy(_, Vec<u8>) specialization #117576"
*  coverage: Avoid creating malformed macro name spans #117827

r? `@Mark-Simulacrum`
2023-11-13 04:09:18 +00:00
Zalathar
7e1d1d4b22 coverage: Regression test for #117788
Without the workaround applied, this test will produce malformed mappings that
cause `llvm-cov` to fail.

(And if it does emit well-formed mappings, they should be obviously incorrect.)
2023-11-12 21:45:18 -05:00
Zalathar
09cd1153e5 coverage: Avoid creating malformed macro name spans
This method is trying to detect macro invocations, so that it can split a span
into two parts just after the `!` of the invocation.

Under some circumstances (probably involving nested macros), it gets confused
and produces a span that is larger than the original span, and possibly extends
outside its enclosing function and even into an adjacent file.

In extreme cases, that can result in malformed coverage mappings that cause
`llvm-cov` to fail. For now, we at least want to detect these egregious cases
and avoid them, so that coverage reports can still be produced.
2023-11-12 21:45:18 -05:00
The 8472
034f8bb438 [beta] remove specialization that caused perf regression
the fix on nightly is recent and should get time to bake, removal
of the optimization is the less risky approach for a backport
2023-11-12 19:59:22 +01:00
Mark Rousskov
d8d8dac273 Prepare 1.74.0 release 2023-11-12 11:49:05 -05:00
bors
22d4a4ff13 Auto merge of #117757 - flip1995:clippy-beta-backport, r=cuviper
[beta] Clippy beta backport

Follow-up to the stable backport done in
- #116364: https://github.com/rust-lang/rust/pull/116364/commits/d3f6573c121b383d686ee013f24a7ae06c0e344b

r? `@Mark-Simulacrum`
2023-11-10 04:17:12 +00:00
bors
fbf0758499 Auto merge of #117764 - cuviper:beta-next, r=cuviper
[beta] backports

- dropck_outlives check whether generator witness needs_drop #117134
- Make sure that predicates with unmentioned bound vars are still considered global in the old solver #117589
- Check binders with bound vars for global bounds that don't hold #117637
- generator layout: ignore fake borrows #117712

r? ghost
2023-11-10 00:34:47 +00:00
lcnr
015d4b6a5a update mir-opt tests
(cherry picked from commit 92267c9794)
2023-11-09 11:56:17 -08:00
lcnr
f267d5be77 rename BorrowKind::Shallow to Fake
also adds some comments

(cherry picked from commit 992d93f687)
2023-11-09 11:56:13 -08:00
lcnr
9425991f0a generator layout: ignore fake borrows
(cherry picked from commit a42eca42df)
2023-11-09 11:50:40 -08:00
lcnr
c1eb5771f8 instrument constituent types computation
(cherry picked from commit bf360d407e)
2023-11-09 11:49:10 -08:00
Rémy Rakic
af0cb305c4 add test for trivial bound not holding in soa-derive
(cherry picked from commit 58351ae03f)
2023-11-09 11:47:18 -08:00
Rémy Rakic
500d454ba0 check binders with bound vars for global bounds that don't hold
(instead of just late bound vars)

(cherry picked from commit 2beca157c9)
2023-11-09 11:47:18 -08:00
Michael Goulet
0e1fac191c Make sure that predicates with unmentioned bound vars are still considered global in the old solver
(cherry picked from commit 32294fc0ed)
2023-11-09 11:47:06 -08:00
lcnr
819dd0feb2 review + add tests
(cherry picked from commit dda5e32ab0)
2023-11-09 11:40:16 -08:00
lcnr
25ca102fde only erase param env regions where needed
(cherry picked from commit a582e9638b)
2023-11-09 11:40:16 -08:00
lcnr
67d8dc8ccd dropck_outlives check generator witness needs_drop
(cherry picked from commit 57253552de)
2023-11-09 11:40:12 -08:00
lcnr
ad3e9cfeb4 remove outdated comment
(cherry picked from commit f0df3d2dfb)
2023-11-09 11:28:15 -08:00
bors
a46e1c9355
Auto merge of #11596 - blyxyas:fix-fp-needless_pass_by_ref_mut, r=Jarcho
Move `needless_pass_by_ref_mut`: `suspicious` -> `nursery`

[Related to [this Zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/needless_pass_by_ref_mut.20isn't.20ready.20for.20stable)]

`needless_pass_by_ref_mut` has been released with some important bugs (notably having a lot of reported false positives and an ICE). So it may not be really ready for being in stable until these problems are solved. This PR changes the lint's category from `suspicious` to `nursery`, just that.
changelog: none
2023-11-09 16:07:15 +01:00
bors
efc300e546 Auto merge of #117644 - cuviper:beta-next, r=cuviper
[beta] backports

- ensure the parent path's existence on `x install` #116349
- Remove `cfg_match` from the prelude #117162
- improve and fix `x install` #117383
- Update to LLVM 17.0.4 #117436

r? cuviper
2023-11-07 04:03:52 +00:00
Nikita Popov
efb81ca657 Update to LLVM 17.0.4
(cherry picked from commit 9df857f658)
2023-11-06 13:07:55 -08:00
onur-ozkan
2f1eb0ccb4 improve and fix x install
Fix: Write access check of `prefix` and `sysconfdir`
when DESTDIR is present.

Improvement: Instead of repeatedly reading `DESTDIR` within
each `fn prepare_dir` usage, read it once and pass it to
the `fn prepare_dir`.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
(cherry picked from commit 4b14048d60)
2023-11-06 13:07:44 -08:00
Caio
b125c10779 Remove cfg_match from the prelude
(cherry picked from commit 0b96e479ca)
2023-11-06 13:07:29 -08:00
onur-ozkan
f3b1b8742c ensure the parent path's existence on x install
Signed-off-by: onur-ozkan <work@onurozkan.dev>
(cherry picked from commit 2c8759ef8a)
2023-11-06 13:07:16 -08:00
bors
489647f984 Auto merge of #117005 - cuviper:beta-next, r=cuviper
[beta] backports and stage0 bump

- Bump stage0 to released stable compiler
- Hide host effect params from docs #116670
- Fix a performance regression in obligation deduplication. #116826
- Make `#[repr(Rust)]` and `#[repr(C)]` incompatible with one another #116829
- Update to LLVM 17.0.3 #116840
- Disable effects in libcore again #116856
- revert rust-lang/rust#114586 #116879

r? cuviper
2023-10-21 05:27:47 +00:00
bors
ae8769d766 Auto merge of #116997 - weihanglo:update-beta-cargo, r=weihanglo
[beta-1.74] Update cargo

1 commits in 22a976c6fb1bef45abcf182b4c7def87ad8b4a4d..ecb9851afd3095e988daaa35a48bc7f3cb748e04
2023-10-12 00:06:40 +0000 to 2023-10-18 20:42:16 +0000
- [beta-1.74.0] Partial-version spec support (rust-lang/cargo#12847)

r? ghost
2023-10-21 03:36:40 +00:00
Ali MJ Al-Nasrawy
eec25d6ec0 revert rust-lang/rust#114586
(cherry picked from commit a1e274f172)
2023-10-20 17:45:16 -07:00
Oli Scherer
dfe9af535a Disable effects in libcore again
(cherry picked from commit bcdd3d7739)
2023-10-20 17:45:16 -07:00
Nikita Popov
d598bb630f Update to LLVM 17.0.3
(cherry picked from commit ab22470eb3)
2023-10-20 17:45:16 -07:00
León Orell Valerian Liehr
457db5b061 Make #[repr(Rust)] and #[repr(C)] incompatible with one another
(cherry picked from commit d0b99e3efe)
2023-10-20 17:45:16 -07:00
Nicholas Nethercote
e45b2ab5c5 Fix a performance regression in obligation deduplication.
Commit 8378487 from #114611 changed the location of an obligation
deduplication step in `opt_normalize_projection_type`. This meant that
deduplication stopped happening on one path where it was still
necessary, causing a couple of drastic performance regressions.

This commit moves the deduplication back to the old location. The good
news is that #114611 had four commits and 8378487 was of minimal
importance, so the perf benefits from that PR remain.

Fixes #116780, #116797.

(cherry picked from commit 91f2fbc867)
2023-10-20 17:45:16 -07:00
Oli Scherer
1bab7646e9 Add some FIXMEs for remaining issues that we need to fix before using more const trait things in libcore
(cherry picked from commit 16f8396f6d)
2023-10-20 17:45:16 -07:00
Oli Scherer
e9abb39210 hide host param from generic parameter list of ~const bounds
(cherry picked from commit 6724f9926c)
2023-10-20 17:45:16 -07:00
Oli Scherer
0570067539 Add regression test for generic args showing host param
(cherry picked from commit cfb6afa296)
2023-10-20 17:45:16 -07:00
Oli Scherer
beb80d4e07 Test cross crate
(cherry picked from commit 8f2af7e010)
2023-10-20 17:45:16 -07:00
Oli Scherer
059621db90 Hide host effect params from docs
(cherry picked from commit c4e61faf2e)
2023-10-20 17:45:16 -07:00
Oli Scherer
dbbf377368 Add regression tests
(cherry picked from commit 20363f40a9)
2023-10-20 17:45:16 -07:00
Josh Stone
a881bd0c00 Bump stage0 to released stable compiler 2023-10-20 17:45:16 -07:00
Weihang Lo
4520fd50f1
[beta-1.74] Update cargo 2023-10-20 18:20:42 -04:00