Skip to content

Rollup of 11 pull requests #141688

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
30f13ca
Stabilise `repr128`
beetrees Mar 9, 2025
7a65911
Optimize `Seek::stream_len` impl for `File`
tbu- May 13, 2024
cbe64ce
Clarify description of `Seek::stream_len`
tbu- Jan 9, 2025
a3bd12b
Path::with_extension: improve examples
tshepang May 24, 2025
248f4b2
reduce clutter... too many imports
tshepang May 24, 2025
396c5ca
clean up old rintf leftovers
RalfJung May 25, 2025
7aef56d
Call out possibility of invariant result
jhpratt May 26, 2025
1b7a927
ci: move tests from x86_64-gnu-llvm-19 job to aarch64
marcoieni May 26, 2025
d562c46
CI: Add cargo tests to aarch64-apple-darwin
ehuss May 27, 2025
2a9363e
coretests: simplify test_float macro to derive more things from the t…
RalfJung May 26, 2025
e0ff77a
coretests: add abs() and copysign() tests, and remove now-unnecessary…
RalfJung May 26, 2025
bf52d1a
ci: verify that codebuild jobs use ghcr.io
marcoieni May 28, 2025
0dd5722
Test(fs): Fix test_eq_windows_file_type for Windows 7
PaulDance May 16, 2025
bcebf58
interpret/allocation: make alloc fn be FnOnce
nia-e May 28, 2025
f016c33
Rollup merge of #125087 - tbu-:pr_file_stream_len, r=ChrisDenton
jieyouxu May 28, 2025
42c49a4
Rollup merge of #138285 - beetrees:repr128-stable, r=traviscross,bjorn3
jieyouxu May 28, 2025
2839d77
Rollup merge of #141104 - PaulDance:fix-win7-test_eq_windows_file_typ…
jieyouxu May 28, 2025
1309d9b
Rollup merge of #141477 - tshepang:patch-1, r=ChrisDenton
jieyouxu May 28, 2025
0de4b30
Rollup merge of #141533 - RalfJung:rintf, r=bjorn3
jieyouxu May 28, 2025
6f81841
Rollup merge of #141571 - RalfJung:float-tests, r=tgross35
jieyouxu May 28, 2025
f404867
Rollup merge of #141576 - marcoieni:pr-free-runners-aarch, r=Kobzol
jieyouxu May 28, 2025
2766966
Rollup merge of #141612 - jhpratt:phantom-docs, r=tgross35
jieyouxu May 28, 2025
9cbfb1c
Rollup merge of #141643 - marcoieni:codebuild-check, r=Kobzol
jieyouxu May 28, 2025
87875fd
Rollup merge of #141656 - ehuss:cargo-aarch64-macos, r=marcoieni,jiey…
jieyouxu May 28, 2025
d39800b
Rollup merge of #141682 - nia-e:fixup-alloc, r=RalfJung
jieyouxu May 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions compiler/rustc_error_codes/src/error_codes/E0658.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ An unstable feature was used.
Erroneous code example:

```compile_fail,E0658
#[repr(u128)] // error: use of unstable library feature 'repr128'
enum Foo {
Bar(u64),
}
use std::intrinsics; // error: use of unstable library feature `core_intrinsics`
```

If you're using a stable or a beta version of rustc, you won't be able to use
Expand All @@ -17,12 +14,9 @@ If you're using a nightly version of rustc, just add the corresponding feature
to be able to use it:

```
#![feature(repr128)]
#![feature(core_intrinsics)]
#[repr(u128)] // ok!
enum Foo {
Bar(u64),
}
use std::intrinsics; // ok!
```

[rustup]: https://rust-lang.github.io/rustup/concepts/channels.html
2 changes: 2 additions & 0 deletions compiler/rustc_feature/src/accepted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,8 @@ declare_features! (
(accepted, relaxed_adts, "1.19.0", Some(35626)),
/// Lessens the requirements for structs to implement `Unsize`.
(accepted, relaxed_struct_unsize, "1.58.0", Some(81793)),
/// Allows the `#[repr(i128)]` attribute for enums.
(accepted, repr128, "CURRENT_RUSTC_VERSION", Some(56071)),
/// Allows `repr(align(16))` struct attribute (RFC 1358).
(accepted, repr_align, "1.25.0", Some(33626)),
/// Allows using `#[repr(align(X))]` on enums with equivalent semantics
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_feature/src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -621,8 +621,6 @@ declare_features! (
(incomplete, ref_pat_eat_one_layer_2024_structural, "1.81.0", Some(123076)),
/// Allows using the `#[register_tool]` attribute.
(unstable, register_tool, "1.41.0", Some(66079)),
/// Allows the `#[repr(i128)]` attribute for enums.
(incomplete, repr128, "1.16.0", Some(56071)),
/// Allows `repr(simd)` and importing the various simd intrinsics.
(unstable, repr_simd, "1.4.0", Some(27731)),
/// Allows bounding the return type of AFIT/RPITIT.
Expand Down
15 changes: 1 addition & 14 deletions compiler/rustc_hir_analysis/src/check/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use rustc_middle::middle::resolve_bound_vars::ResolvedArg;
use rustc_middle::middle::stability::EvalResult;
use rustc_middle::ty::error::TypeErrorToStringExt;
use rustc_middle::ty::layout::{LayoutError, MAX_SIMD_LANES};
use rustc_middle::ty::util::{Discr, IntTypeExt};
use rustc_middle::ty::util::Discr;
use rustc_middle::ty::{
AdtDef, BottomUpFolder, GenericArgKind, RegionKind, TypeFoldable, TypeSuperVisitable,
TypeVisitable, TypeVisitableExt, fold_regions,
Expand Down Expand Up @@ -1385,19 +1385,6 @@ fn check_enum(tcx: TyCtxt<'_>, def_id: LocalDefId) {
);
}

let repr_type_ty = def.repr().discr_type().to_ty(tcx);
if repr_type_ty == tcx.types.i128 || repr_type_ty == tcx.types.u128 {
if !tcx.features().repr128() {
feature_err(
&tcx.sess,
sym::repr128,
tcx.def_span(def_id),
"repr with 128-bit type is unstable",
)
.emit();
}
}

for v in def.variants() {
if let ty::VariantDiscr::Explicit(discr_def_id) = v.discr {
tcx.ensure_ok().typeck(discr_def_id.expect_local());
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/mir/interpret/allocation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ impl Allocation {
pub fn adjust_from_tcx<'tcx, Prov: Provenance, Bytes: AllocBytes>(
&self,
cx: &impl HasDataLayout,
mut alloc_bytes: impl FnMut(&[u8], Align) -> InterpResult<'tcx, Bytes>,
alloc_bytes: impl FnOnce(&[u8], Align) -> InterpResult<'tcx, Bytes>,
mut adjust_ptr: impl FnMut(Pointer<CtfeProvenance>) -> InterpResult<'tcx, Pointer<Prov>>,
) -> InterpResult<'tcx, Allocation<Prov, (), Bytes>> {
// Copy the data.
Expand Down
12 changes: 0 additions & 12 deletions library/core/src/intrinsics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2285,12 +2285,6 @@ pub fn round_ties_even_f16(x: f16) -> f16;
#[rustc_nounwind]
pub fn round_ties_even_f32(x: f32) -> f32;

/// Provided for compatibility with stdarch. DO NOT USE.
#[inline(always)]
pub unsafe fn rintf32(x: f32) -> f32 {
round_ties_even_f32(x)
}

/// Returns the nearest integer to an `f64`. Rounds half-way cases to the number with an even
/// least significant digit.
///
Expand All @@ -2300,12 +2294,6 @@ pub unsafe fn rintf32(x: f32) -> f32 {
#[rustc_nounwind]
pub fn round_ties_even_f64(x: f64) -> f64;

/// Provided for compatibility with stdarch. DO NOT USE.
#[inline(always)]
pub unsafe fn rintf64(x: f64) -> f64 {
round_ties_even_f64(x)
}

/// Returns the nearest integer to an `f128`. Rounds half-way cases to the number with an even
/// least significant digit.
///
Expand Down
8 changes: 8 additions & 0 deletions library/core/src/marker/variance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ phantom_lifetime! {
///
/// [1]: https://doc.rust-lang.org/stable/reference/subtyping.html#variance
///
/// Note: If `'a` is otherwise contravariant or invariant, the resulting type is invariant.
///
/// ## Layout
///
/// For all `'a`, the following are guaranteed:
Expand All @@ -146,6 +148,8 @@ phantom_lifetime! {
///
/// [1]: https://doc.rust-lang.org/stable/reference/subtyping.html#variance
///
/// Note: If `'a` is otherwise covariant or invariant, the resulting type is invariant.
///
/// ## Layout
///
/// For all `'a`, the following are guaranteed:
Expand Down Expand Up @@ -180,6 +184,8 @@ phantom_type! {
///
/// [1]: https://doc.rust-lang.org/stable/reference/subtyping.html#variance
///
/// Note: If `T` is otherwise contravariant or invariant, the resulting type is invariant.
///
/// ## Layout
///
/// For all `T`, the following are guaranteed:
Expand All @@ -196,6 +202,8 @@ phantom_type! {
///
/// [1]: https://doc.rust-lang.org/stable/reference/subtyping.html#variance
///
/// Note: If `T` is otherwise covariant or invariant, the resulting type is invariant.
///
/// ## Layout
///
/// For all `T`, the following are guaranteed:
Expand Down
Loading
Loading