Commit graph

271358 commits

Author SHA1 Message Date
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 11ad6ff3cb3cb3da0040541877c716ddc38ec388)
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 fc8a541eaa4b6555d948c382b75677b0e17040fa)
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 40b0026a2f1c50e88909f49e8ef8c7ae074f5a9b)
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
Boxy
e9180d26d1 Revert "fix missing rustfmt and clippy for msi"
This reverts commit f5577a8174.
2024-11-26 09:50:21 +00:00
Boxy
6f5e4948b6 bump channel to beta 2024-11-25 11:47:30 +00:00
Boxy
70fbc71189 replace placeholder version 2024-11-25 11:46:46 +00:00
bors
f1e0752404 Auto merge of #130867 - michirakara:steps_between, r=dtolnay
distinguish overflow and unimplemented in Step::steps_between
2024-11-22 10:54:22 +00:00
bors
2cf7908998 Auto merge of #129238 - umgefahren:stabilize-ipv6-unique-local, r=dtolnay
Stabilize `Ipv6Addr::is_unique_local` and `Ipv6Addr::is_unicast_link_local`

Make `Ipv6Addr::is_unique_local` and `Ipv6Addr::is_unicast_link_local` stable (+const).

Newly stable API:

```rust
impl Ipv6Addr {
	// Newly stable under `ipv6_is_unique_local`
	const fn is_unique_local(&self) -> bool;

	// Newly stable under `ipv6_is_unique_local`
	const fn is_unicast_link_local(&self) -> bool;
}
```

These stabilise a subset of the following tracking issue:
- #27709

I have looked and could not find any issues with `is_unique_local` and `is_unicast_link_local`. There is a well received comment calling for stabilisation of the latter function.

Both functions are well defined and consistent with implementations in other languages:
- [Go](https://cs.opensource.google/go/go/+/refs/tags/go1.23.0:src/net/netip/netip.go;l=518)
- [Python](e9d1bf353c/Lib/ipaddress.py (L2319-L2321))
- [Ruby (unique local)](https://ruby-doc.org/stdlib-2.5.1/libdoc/ipaddr/rdoc/IPAddr.html#private-3F-source)
- [Ruby (unicast link local)](https://ruby-doc.org/stdlib-2.5.1/libdoc/ipaddr/rdoc/IPAddr.html#link_local-3F-source)

cc implementor `@little-dude`
(I can't find the original PR for `is_unqiue_local`)

r? libs-api
`@rustbot` label +T-libs-api +needs-fcp
2024-11-22 06:38:39 +00:00
michirakara
de741d2093
distinguish overflow and unimplemented in Step::steps_between 2024-11-21 15:49:55 -08:00
bors
5d3c6ee9b3 Auto merge of #132362 - mustartt:aix-dylib-detection, r=jieyouxu
[AIX] change system dynamic library format

Historically on AIX, almost all dynamic libraries are distributed in `.a` Big Archive Format which can consists of both static and shared objects in the same archive (e.g. `libc++abi.a(libc++abi.so.1)`). During the initial porting process, the dynamic libraries are kept as `.a` to simplify the migration, but semantically having an XCOFF object under the archive extension is wrong. For crate type `cdylib` we want to be able to distribute the libraries as archives as well.

We are migrating to archives with the following format:
```
$ ar -t lib<name>.a
lib<name>.so
```
where each archive contains a single member that is a shared XCOFF object that can be loaded.
2024-11-21 21:36:47 +00:00
bors
b19329a37c Auto merge of #133246 - MarcoIeni:debug-info-2-windows-disable, r=Kobzol
ci: Disable full `debuginfo-level=2` in windows alt job

try-job: dist-x86_64-msvc-alt
2024-11-21 18:46:51 +00:00
Henry Jiang
0db9059726 aix: fix archive format
fmt

fix cfg for windows

remove unused imports

address comments

update libc to 0.2.164

fmt

remove unused imports
2024-11-21 10:33:07 -05:00
bors
75703c1a78 Auto merge of #133287 - matthiaskrgr:rollup-ab9j3pu, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #130236 (unstable feature usage metrics)
 - #131544 (Make asm label blocks safe context)
 - #131586 (Support s390x z13 vector ABI)
 - #132489 (Fix closure arg extraction in `extract_callable_info`, generalize it to async closures)
 - #133078 (tests: ui/inline-consts: add issue number to a test, rename other tests)
 - #133283 (Don't exclude relnotes from `needs-triage` label)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-11-21 14:08:40 +00:00
Matthias Krüger
df2413ce1c
Rollup merge of #133283 - jieyouxu:triage-relnotes, r=BoxyUwU
Don't exclude relnotes from `needs-triage` label

So initially we *didn't* exclude `needs-triage` label, then we did exclude them in #132825 as sometimes the `needs-triage` is redundant. However, I think they are probably worth double-checking because often some of the labels are only accurate/relevant for the *implementation* PR, but not for the purposes of the relnotes tracking issue. Furthermore, sometimes relevant team labels can be removed. So to make it less likely for relnotes to slip through, I think we should still label relnotes-tracking-issues with `needs-triage`.

cc https://rust-lang.zulipchat.com/#narrow/channel/241545-t-release/topic/Please.20CC.20lang

r? release
2024-11-21 11:58:41 +01:00
Matthias Krüger
825985981f
Rollup merge of #133078 - matthiaskrgr:uiuiui, r=davidtwco
tests: ui/inline-consts: add issue number to a test, rename other tests

rename other tests from a_b_c to a-b-c
2024-11-21 11:58:40 +01:00
Matthias Krüger
c064f6e1fc
Rollup merge of #132489 - compiler-errors:fn-sugg-tweaks, r=BoxyUwU
Fix closure arg extraction in `extract_callable_info`, generalize it to async closures

* Fix argument extraction in `extract_callable_info`
* FIx `extract_callable_info` to work for async closures
* Remove redundant `is_fn_ty` which is just a less general `extract_callable_info`
* More precisely name what is being called (i.e. call it a "closure" not a "function")

Review this without whitespace -- I ended up reformatting `extract_callable_info` because some pesky `//` comments were keeping the let-chains from being formatted.
2024-11-21 11:58:39 +01:00
Matthias Krüger
379b22123c
Rollup merge of #131586 - taiki-e:s390x-vector-abi, r=compiler-errors,uweigand
Support s390x z13 vector ABI

cc #130869

This resolves the following fixmes:
- 58420a065b/compiler/rustc_target/src/abi/call/s390x.rs (L1-L2)
- 58420a065b/compiler/rustc_target/src/spec/targets/s390x_unknown_linux_gnu.rs (L9-L11)

Refs: Section 1.2.3 "Parameter Passing" and section 1.2.5 "Return Values" in ELF Application Binary Interface s390x Supplement, Version 1.6.1 (lzsabi_s390x.pdf in https://github.com/IBM/s390x-abi/releases/tag/v1.6.1)

This PR extends ~~https://github.com/rust-lang/rust/pull/127731~~ https://github.com/rust-lang/rust/pull/132173 (merged) 's ABI check to handle cases where `vector` target feature is disabled.
If we do not do ABI check, we run into the ABI problems as described in https://github.com/rust-lang/rust/issues/116558 and https://github.com/rust-lang/rust/issues/130869#issuecomment-2408268044, and the problem of the compiler generating strange code (https://github.com/rust-lang/rust/pull/131586#discussion_r1799003554).

cc `@uweigand`

`@rustbot` label +O-SystemZ +A-ABI
2024-11-21 11:58:38 +01:00