Commit graph

271372 commits

Author SHA1 Message Date
bors
e71f9a9a98 Auto merge of #136158 - cuviper:stable-next, r=cuviper
[stable] Prepare Rust 1.84.1 point release

- [Fix ICE 132920 in duplicate-crate diagnostics.](https://github.com/rust-lang/rust/pull/133304/)
- [Fix errors for overlapping impls in incremental rebuilds.](https://github.com/rust-lang/rust/pull/133828/)
- [Fix slow compilation related to the next-generation trait solver.](https://github.com/rust-lang/rust/pull/135618/)
- [Fix debuginfo when LLVM's location discriminator value limit is exceeded.](https://github.com/rust-lang/rust/pull/135643/)
- Fixes for building Rust from source:
  - [Only try to distribute `llvm-objcopy` if llvm tools are enabled.](https://github.com/rust-lang/rust/pull/134240/)
  - [Add Profile Override for Non-Git Sources.](https://github.com/rust-lang/rust/pull/135433/)
  - [Resolve symlinks of LLVM tool binaries before copying them.](https://github.com/rust-lang/rust/pull/135585/)
  - [Make it possible to use ci-rustc on tarball sources.](https://github.com/rust-lang/rust/pull/135722/)

cc `@rust-lang/release`
r? ghost
2025-01-27 23:20:59 +00:00
Josh Stone
690f433e3e Release 1.84.1 2025-01-27 13:55:21 -08:00
onur-ozkan
f8306b0381 make it possible to use ci-rustc on tarball sources
Previously, bootstrap was using `Config::last_modified_commit` unconditionally to figure
the commit has to download precompiled rustc artifact from CI, which was leading builds to
fail on tarball sources as `Config::last_modified_commit` requires `git` to be present in the project
source. This change makes bootstrap to call `Config::last_modified_commit` only when it's running on
git-managed source and read `git-commit-hash` file otherwise.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
(cherry picked from commit 903cddb392)
2025-01-23 11:48:49 -08:00
Kyle Huey
e26749f062 When LLVM's location discriminator value limit is exceeded, emit locations with dummy spans instead of dropping them entirely
Revert most of #133194 (except the test and the comment fixes). Then refix
not emitting locations at all when the correct location discriminator value
exceeds LLVM's capacity.

(cherry picked from commit 45ef92731b)
2025-01-23 11:48:44 -08:00
lcnr
2694d0fb27 add test
(cherry picked from commit 0910173b35)
2025-01-23 11:48:40 -08:00
lcnr
882a0b5208 add cache to AmbiguityCausesVisitor
(cherry picked from commit 94bf8f04f4)
2025-01-23 11:48:40 -08:00
lcnr
fed7b2b171 avoid running the overlap check twice
(cherry picked from commit ebbcfd4e77)
2025-01-23 11:48:40 -08:00
onur-ozkan
558d43bf82 resolve symlinks of LLVM tool binaries before copying them
There is a chance that these tools are being installed from an external LLVM
and we have no control over them. If any of these tools use symlinks, they will
fail during tarball distribution. This change makes copying process to resolve
symlinks just before placing them into the destination path.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
(cherry picked from commit cde58dd5f7)
2025-01-23 11:48:35 -08:00
Tanvi Pooranmal Meena
900ed0b1a1 Add logic to override profile for non git sources
(cherry picked from commit 7d806171d0)
2025-01-23 11:48:12 -08:00
Josh Stone
07c33e9b98 Only dist llvm-objcopy if llvm tools are enabled
(cherry picked from commit 4c6d793c66)
2025-01-23 11:46:20 -08:00
Michael Goulet
bc1efc5dc3 Make sure to record deps from cached task in new solver on first run
(cherry picked from commit 988f28d442)
2025-01-23 11:46:15 -08:00
Michael Goulet
8cbc8caf0e Add failing test
(cherry picked from commit 3f089971ff)
2025-01-23 11:46:15 -08:00
Rémy Rakic
e489fc0913 Revert "Remove less relevant info from diagnostic"
This reverts commit 8a568d9f15.

(cherry picked from commit 764e3e264f)
2025-01-23 11:32:32 -08:00
Rémy Rakic
bdaaaf3ec3 add convoluted test for issue 132920
(cherry picked from commit 91486607e3)
2025-01-23 11:21:54 -08:00
bors
9fc6b43126 Auto merge of #135162 - pietroalbini:pa-stable, r=pietroalbini
Prepare Rust 1.84.0 stable release

Included a backport of https://github.com/rust-lang/rust/issues/135034, and squashed the release notes.

r? `@ghost`
2025-01-07 01:26:09 +00:00
Pietro Albini
6287749471
Revert "force "HEAD" for non-CI and git_upstream_merge_base for CI environment"
This reverts commit 33ac202904.
2025-01-06 20:13:40 +01:00
Pietro Albini
395fb701e7
Revert "add new CI step: "setup upstream remote""
This reverts commit 4454fa998c.
2025-01-06 20:13:30 +01:00
Pietro Albini
fb95f0022b
bump channel to stable 2025-01-06 17:15:55 +01:00
Pietro Albini
6fccb3ccf8
squash relnotes updates 2025-01-06 17:15:39 +01:00
Noratrieb
70246e6fb9
Pass objcopy args for stripping on OSX
When `-Cstrip` was changed to use the bundled rust-objcopy instead of
/usr/bin/strip on OSX, strip-like arguments were preserved.

But strip and objcopy are, while being the same binary, different, they
have different defaults depending on which binary they are.
Notably, strip strips everything by default, and objcopy doesn't strip
anything by default.

Additionally, `-S` actually means `--strip-all`, so debuginfo stripped
everything and symbols didn't strip anything.

We now correctly pass `--strip-debug` and `--strip-all`.
2025-01-06 17:06:45 +01:00
bors
953a5caef0 Auto merge of #135048 - cuviper:beta-next, r=cuviper
[beta] backports

- Do not call `extern_crate` on current trait on crate mismatch errors #133585
- Correctly handle comments in attributes in doctests source code #134260
- Correctly document CTFE behavior of is_null and methods that call is_null. #134325
- Make sure we handle `backwards_incompatible_lint` drops appropriately in drop elaboration #134486
- Bump compiler `cc` to 1.2.5 #134505
- Handle `DropKind::ForLint` in coroutines correctly #134575
- docs: inline `std::ffi::c_str` types to `std::ffi` #134791
- docs: inline `alloc::ffi::c_str` types to `alloc::ffi` #134851

r? cuviper
2025-01-03 00:49:40 +00:00
Lukas Markeffsky
f72c836093 docs: inline alloc::ffi::c_str types to alloc::ffi
(cherry picked from commit 11ad6ff3cb)
2025-01-02 14:28:32 -08:00
Michael Howell
0605512ead docs: inline core::ffi::c_str types to core::ffi
(cherry picked from commit fc8a541eaa)
2025-01-02 14:28:32 -08:00
Michael Howell
6cc24819e5 docs: inline std::ffi::c_str types to std::ffi
Rustdoc has no way to show that an item is stable,
but only at a different path. `std::ffi::c_str::NulError` is
not stable, but `std::ffi::NulError` is.

To avoid marking these types as unstable when someone just
wants to follow a link from `CString`, inline them into their
stable paths.

(cherry picked from commit 40b0026a2f)
2025-01-02 14:28:32 -08:00
Michael Goulet
730b84074d Handle DropKind::ForLint in coroutines correctly
(cherry picked from commit 42d1a4c48b)
2025-01-02 14:28:32 -08:00
许杰友 Jieyou Xu (Joe)
f757f96296 Bump compiler cc to 1.2.5
- `cc` 1.2.4 contains a fix to address [rustc uses wrong build tools
  when compiling from MSVC
  #133794](https://github.com/rust-lang/rust/issues/133794). See
  <https://github.com/rust-lang/cc-rs/releases/tag/cc-v1.2.4>.
- `cc` 1.2.5 contains a fix to also check linking when testing if
  certain compiler flags are supported, which fixed an issue that was
  causing previous compiler `cc` bumps to fail. See
  <https://github.com/rust-lang/cc-rs/releases/tag/cc-v1.2.5>.

Co-authored-by: David Lönnhager <david.l@mullvad.net>
(cherry picked from commit 3775d220af)
2025-01-02 14:28:32 -08:00
Niko Matsakis
6fe7742fdf pacify merciless fmt
(cherry picked from commit 6564403641)
2025-01-02 14:28:32 -08:00
Niko Matsakis
8018b401da explain how build_scope_drops works
(cherry picked from commit b535061060)
2025-01-02 14:28:32 -08:00
Michael Goulet
432bd9de32 Separate DropKind::ForLint
(cherry picked from commit 5e079011ea)
2025-01-02 14:28:32 -08:00
Michael Goulet
3113133cb7 Add a failing test
(cherry picked from commit 2e57394d80)
2025-01-02 14:28:32 -08:00
Tim (Theemathas) Chirananthavat
9d04715495 Document CTFE behavior of methods that call is_null
(cherry picked from commit e6efbb210b)
2025-01-02 14:28:32 -08:00
Tim (Theemathas) Chirananthavat
4171701e39 Correctly document is_null CTFE behavior.
The "panic in const if CTFE doesn't know the answer" behavior was discussed to be the desired behavior in #74939, and is currently how the function actually behaves.

I intentionally wrote this documentation to allow for the possibility that a panic might not occur even if the pointer is out of bounds, because of #133700 and other potential changes in the future.

(cherry picked from commit 93889172bc)
2025-01-02 14:28:32 -08:00
Guillaume Gomez
dc1a9f275c Remove unneeded handling of backlines in doctest attributes
(cherry picked from commit c367cc3ef5)
2025-01-02 14:28:32 -08:00
Guillaume Gomez
32ee5bc6a3 Also handle cases where attributes are unclosed
(cherry picked from commit 2383985342)
2025-01-02 14:28:32 -08:00
Guillaume Gomez
e09de50ce0 Add ui regression test for #134221
(cherry picked from commit 9c4a61ff52)
2025-01-02 14:28:32 -08:00
Guillaume Gomez
31236a39f8 Correctly handle comments in attributes in doctests source code
(cherry picked from commit de16ed35a3)
2025-01-02 14:28:32 -08:00
Esteban Küber
bee5d0996b Move the crate-loading test to use diff output
(cherry picked from commit 998ff2f0cd)
2025-01-02 14:28:32 -08:00
Esteban Küber
2fb0b160c0 Use rmake diff output in test
(cherry picked from commit e97e15dea5)
2025-01-02 14:28:32 -08:00
Esteban Küber
21c75ad1cc Do not call extern_crate on current trait on crate mismatch errors
When we encounter an error caused by traits/types of different versions of the same crate, filter out the current crate when collecting spans to add to the context so we don't call `extern_crate` on the `DefId` of the current crate, which is meaningless and ICEs.

Produced output with this filter:

```
error[E0277]: the trait bound `foo::Struct: Trait` is not satisfied
  --> y.rs:13:19
   |
13 |     check_trait::<foo::Struct>();
   |                   ^^^^^^^^^^^ the trait `Trait` is not implemented for `foo::Struct`
   |
note: there are multiple different versions of crate `foo` in the dependency graph
  --> y.rs:7:1
   |
4  | extern crate foo;
   | ----------------- one version of crate `foo` is used here, as a direct dependency of the current crate
5  |
6  | pub struct Struct;
   | ----------------- this type implements the required trait
7  | pub trait Trait {}
   | ^^^^^^^^^^^^^^^ this is the required trait
   |
  ::: x.rs:4:1
   |
4  | pub struct Struct;
   | ----------------- this type doesn't implement the required trait
5  | pub trait Trait {}
   | --------------- this is the found trait
   = note: two types coming from two different versions of the same crate are different types even if they look the same
   = help: you can use `cargo tree` to explore your dependency tree
note: required by a bound in `check_trait`
  --> y.rs:10:19
   |
10 | fn check_trait<T: Trait>() {}
   |                   ^^^^^ required by this bound in `check_trait`
```

Fix #133563.

(cherry picked from commit 8574f374e2)
2025-01-02 13:43:18 -08:00
bors
0857a8e32c Auto merge of #134464 - Veykril:backport/rust-analyzer/18711, r=Mark-Simulacrum
[beta] Backport rust-lang/rust-analyzer#18711

rust-lang/rust-analyzer#18711
2024-12-27 00:41:18 +00:00
Lukas Wirth
840f6588cc Taking a raw ref of a deref is always safe 2024-12-18 14:18:49 +01:00
bors
202008a1b8 Auto merge of #133933 - cuviper:beta-next, r=cuviper
[beta] backports

* Update LLVM to 19.1.5 #133799

r? cuviper
2024-12-07 14:47:38 +00:00
DianQK
aaca1b4400 Update LLVM to 19.1.5
(cherry picked from commit 605306efef)
2024-12-05 12:14:05 -08:00
bors
ea5e5ca055 Auto merge of #133546 - SomeoneToIgnore:beta, r=Mark-Simulacrum
[beta] Revert r-a completions breakage

As suggested by `@cuviper` in https://rust-lang.zulipchat.com/#narrow/channel/185405-t-compiler.2Frust-analyzer/topic/Completion.20IDs/near/484770216

Repeats the revert to `stable` https://github.com/rust-lang/rust/pull/133476 using https://patch-diff.githubusercontent.com/raw/rust-lang/rust/pull/133476.diff

cc `@BoxyUwU` `@workingjubilee`
2024-12-02 02:35:45 +00:00
bors
0f13036040 Auto merge of #133627 - BoxyUwU:bump_beta_bootstrap, r=onur-ozkan
[beta] bump stage0

bumps stage0 to stable 1.83.0
2024-11-30 05:44:08 +00:00
Boxy
0a27c1f2fd bump stage0 2024-11-29 12:39:44 +00:00
Kirill Bulatov
8d3b048c12 Revert r-a completions breakage
Repeats the revert to `stable` https://github.com/rust-lang/rust/pull/133476
using https://patch-diff.githubusercontent.com/raw/rust-lang/rust/pull/133476.diff
2024-11-27 20:37:46 +02:00
bors
b4297a573b Auto merge of #133447 - BoxyUwU:beta, r=BoxyUwU
[beta] Prepare Rust 1.84.0

r? `@ghost`
2024-11-26 19:15:15 +00:00
Jieyou Xu
b19dfd7aab Ignore the rustc_bootstrap test during post-opt-dist tests 2024-11-26 17:03:30 +00:00
Boxy
4fe4a39127 Revert "fix missing rustfmt for apple darwin"
This reverts commit 2316749ca9.
2024-11-26 09:50:36 +00:00