Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
a5f0125
test `f16::mul_add` not double-rounding the result
folkertdev Aug 22, 2026
2c1542c
proper signature checks for Rust allocator shims
RalfJung Aug 23, 2026
cd85d93
bump nix
RalfJung Aug 23, 2026
6ddb88e
cargo update
RalfJung Aug 23, 2026
74e55a9
Merge pull request #5277 from RalfJung/deps
RalfJung Aug 23, 2026
e316a9f
do not run `simd_reduce_{min, max}` on floats natively
folkertdev Aug 23, 2026
4091d1a
run `f16` and `f128` tests natively when reliable
folkertdev Aug 23, 2026
9e18fd0
Merge pull request #5278 from folkertdev/run-f16-f128-tests-when-reli…
RalfJung Aug 23, 2026
c158e17
Add custom allocators to `(try_)map` on `Box`, `Rc`, `Arc`
maxdexh Aug 23, 2026
3907f65
port all variadic functions to strict signature checking
RalfJung Aug 23, 2026
2ef83c2
check_sim_sig: package arguments in tuple so they all go on the same …
RalfJung Aug 23, 2026
0ded8be
Merge pull request #5280 from RalfJung/less-lenient
RalfJung Aug 23, 2026
8aaa1fd
run _Unwind_RaiseException test on windows-gnu
RalfJung Aug 24, 2026
7f2c329
Merge pull request #5282 from RalfJung/_Unwind_RaiseException
RalfJung Aug 24, 2026
210fd61
add internal DSL for testing binders
khyperia Aug 24, 2026
d9d27f8
unify shim_sig and shim_sig_variadic macros
RalfJung Aug 24, 2026
d640588
Merge pull request #5283 from RalfJung/variadic-nicer
RalfJung Aug 24, 2026
536f0a3
Add codegen test for static table search loop unrolling
zakrad Aug 24, 2026
cfbb1d6
clippy::manual_is_ascii_check
ChrisDenton Aug 12, 2026
e4f6415
clippy::manual_ignore_case_cmp
ChrisDenton Aug 12, 2026
0f684e5
clippy::manual_hash_one
ChrisDenton Aug 12, 2026
cc299d7
clippy::excessive_precision
ChrisDenton Aug 12, 2026
fc3b63d
clippy::partialeq_ne_impl
ChrisDenton Aug 12, 2026
71411ff
clippy::manual_contains
ChrisDenton Aug 13, 2026
1110bbb
clippy::single_match
ChrisDenton Aug 13, 2026
6b058b4
clippy::match_as_ref
ChrisDenton Aug 13, 2026
4ff5c85
clippy::default_constructed_unit_structs
ChrisDenton Aug 13, 2026
fe7445a
clippy::redundant_closure
ChrisDenton Aug 13, 2026
4c99af2
clippy::derivable_impls
ChrisDenton Aug 13, 2026
bf79c6f
clippy::partialeq_to_none
ChrisDenton Aug 13, 2026
3dc163b
clippy::unnecessary_map_or
ChrisDenton Aug 13, 2026
3b4a6dd
clippy::manual_clear
ChrisDenton Aug 13, 2026
9ea8c6e
clippy::bind_instead_of_map
ChrisDenton Aug 13, 2026
4f88014
clippy::redundant_slicing
ChrisDenton Aug 13, 2026
27eccc9
clippy::transmutes_expressible_as_ptr_casts
ChrisDenton Aug 13, 2026
b49b508
clippy::manual_repeat_n
ChrisDenton Aug 13, 2026
6cb5350
clippy::to_digit_is_some
ChrisDenton Aug 18, 2026
d5d51bb
clippy::double_must_use
ChrisDenton Aug 18, 2026
fd522d7
clippy::seek_from_current
ChrisDenton Aug 18, 2026
ba77379
clippy::mem_replace_option_with_some
ChrisDenton Aug 18, 2026
17cac5a
clippy::mem_replace_option_with_none
ChrisDenton Aug 18, 2026
0bce2cc
clippy::map_clone
ChrisDenton Aug 18, 2026
db38868
clippy::declare_interior_mutable_const
ChrisDenton Aug 18, 2026
ec3e1ea
clippy::assign_op_pattern
ChrisDenton Aug 18, 2026
3bd3106
clippy::chunks_exact_to_as_chunks
ChrisDenton Aug 18, 2026
167a56a
clippy::needless_raw_string_hashes
ChrisDenton Aug 19, 2026
503192c
clippy::approx_constant
ChrisDenton Aug 19, 2026
85e2152
clippy::neg_cmp_op_on_partial_ord
ChrisDenton Aug 12, 2026
1cb9917
Ignore clippy failures in stdarch submodule
ChrisDenton Aug 18, 2026
3df0d08
Enforce even more clippy lints in CI
ChrisDenton Aug 18, 2026
bc9565b
Allow lints on backtrace-rs
ChrisDenton Aug 19, 2026
d712c4e
ignore clippy::redundant_pattern_matching
ChrisDenton Aug 19, 2026
2a8651f
partially revert 34e5379bef92f5b8d82cccd27cc926dd34d0402b
RalfJung Aug 24, 2026
683f699
add new custom allocator test
RalfJung Aug 24, 2026
c655564
Merge pull request #5285 from RalfJung/custom-alloc-not-noalias
RalfJung Aug 24, 2026
6e9d6e4
Prepare for merging from rust-lang/rust
RalfJung Aug 25, 2026
3f73e84
Merge ref '9bb55c8c8654' from rust-lang/rust
RalfJung Aug 25, 2026
99d2c7f
Merge pull request #5287 from RalfJung/rustup
RalfJung Aug 25, 2026
2c9b143
fix tuple child ordering w/ PDB debug info
Walnut356 Aug 25, 2026
3be0b65
update lockfile
RalfJung Aug 25, 2026
926c5b8
do not compress debuginfo for Cygwin
ognevny Aug 25, 2026
8ff1a42
make trivial ABI check resilient against new repr
RalfJung Aug 25, 2026
051869d
Rollup merge of #161328 - ChrisDenton:clippy3, r=nia-e
JonathanBrouwer Aug 25, 2026
b8c1d33
Rollup merge of #161443 - khyperia:abbys-tests, r=BoxyUwU
JonathanBrouwer Aug 25, 2026
b079433
Rollup merge of #161617 - maxdexh:can-i-has-map-allocator, r=nia-e
JonathanBrouwer Aug 25, 2026
531adcd
Rollup merge of #161726 - Walnut356:pdb_tuple_fields, r=Kobzol
JonathanBrouwer Aug 25, 2026
9d06751
Rollup merge of #161729 - RalfJung:miri, r=RalfJung
JonathanBrouwer Aug 25, 2026
4851fa3
Rollup merge of #161745 - RalfJung:repr-exhaustive, r=mati865
JonathanBrouwer Aug 25, 2026
5689768
Rollup merge of #161522 - folkertdev:gcc-fma16-correctly-rounded, r=t…
JonathanBrouwer Aug 25, 2026
ff8731e
Rollup merge of #161724 - zakrad:regr-test-44041, r=chenyukang
JonathanBrouwer Aug 25, 2026
49703b7
Rollup merge of #161740 - ognevny:cygwin-compress-dbginfo, r=Kobzol
JonathanBrouwer Aug 25, 2026
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
21 changes: 17 additions & 4 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73736a89c4aff73035ba2ed2e565061954da00d4970fc9ac25dcc85a2a20d790"
dependencies = [
"dispatch2",
"nix",
"nix 0.30.1",
"windows-sys 0.61.2",
]

Expand Down Expand Up @@ -2265,9 +2265,9 @@ checksum = "803ec87c9cfb29b9d2633f20cba1f488db3fd53f2158b1024cbefb47ba05d413"

[[package]]
name = "libc"
version = "0.2.183"
version = "0.2.189"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d"
checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"

[[package]]
name = "libffi"
Expand Down Expand Up @@ -2539,10 +2539,11 @@ dependencies = [
"ipc-channel",
"libc",
"libffi",
"libffi-sys",
"libloading",
"measureme",
"mio",
"nix",
"nix 0.31.3",
"rand 0.10.1",
"regex",
"rustc_version",
Expand Down Expand Up @@ -2595,6 +2596,18 @@ dependencies = [
"libc",
]

[[package]]
name = "nix"
version = "0.31.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d"
dependencies = [
"bitflags",
"cfg-if",
"cfg_aliases",
"libc",
]

[[package]]
name = "nom"
version = "7.1.3"
Expand Down
8 changes: 8 additions & 0 deletions compiler/rustc_abi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,14 @@ impl ReprOptions {
self.flags.contains(ReprFlags::IS_C)
}

/// Returns whether this is (implicitly or explicitly) `repr(Rust)`, i.e., its layout
/// is defined by Rust and we make no stable commitments.
#[inline]
pub fn rust(&self) -> bool {
// `linear` is currently just an internal flag we set on Box; that's still `repr(Rust)`.
!self.c() & !self.simd() & !self.scalable() & !self.transparent()
}

#[inline]
pub fn packed(&self) -> bool {
self.pack.is_some()
Expand Down
103 changes: 75 additions & 28 deletions compiler/rustc_ast/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3733,29 +3733,7 @@ impl Item {
}

pub fn opt_generics(&self) -> Option<&Generics> {
match &self.kind {
ItemKind::ExternCrate(..)
| ItemKind::ConstBlock(_)
| ItemKind::Use(_)
| ItemKind::Mod(..)
| ItemKind::ForeignMod(_)
| ItemKind::GlobalAsm(_)
| ItemKind::MacCall(_)
| ItemKind::Delegation(_)
| ItemKind::DelegationMac(_)
| ItemKind::MacroDef(..) => None,
ItemKind::Static(_) => None,
ItemKind::Const(i) => Some(&i.generics),
ItemKind::Fn(i) => Some(&i.generics),
ItemKind::TyAlias(i) => Some(&i.generics),
ItemKind::TraitAlias(i) => Some(&i.generics),

ItemKind::Enum(_, generics, _)
| ItemKind::Struct(_, generics, _)
| ItemKind::Union(_, generics, _) => Some(&generics),
ItemKind::Trait(i) => Some(&i.generics),
ItemKind::Impl(i) => Some(&i.generics),
}
self.kind.generics()
}
}

Expand Down Expand Up @@ -4092,6 +4070,57 @@ impl Guard {
}
}

#[derive(Clone, Encodable, Decodable, Debug, Walkable)]
pub struct TestBinderConstraints {
pub generics: Generics,
pub body: Box<TestBinderBody>,
}

#[derive(Clone, Encodable, Decodable, Debug, Walkable)]
pub struct TestBinderBody {
pub foralls: ThinVec<TestBinderForall>,
pub exists: ThinVec<TestBinderExists>,
pub constraints: Vec<TestBinderConstraint>,
}

#[derive(Clone, Encodable, Decodable, Debug, Walkable)]
pub struct TestBinderForall {
pub span: Span,
pub node_id: NodeId,
pub generics: Generics,
pub body: TestBinderBody,
pub assert_on_exit: Option<ThinVec<TestBinderConstraint>>,
}

#[derive(Clone, Encodable, Decodable, Debug, Walkable)]
pub struct TestBinderExists {
pub span: Span,
pub node_id: NodeId,
pub params: ThinVec<GenericParam>,
pub body: TestBinderBody,
}

#[derive(Clone, Encodable, Decodable, Debug, Walkable)]
pub enum TestBinderConstraint {
And {
items: ThinVec<TestBinderConstraint>,
},
Or {
items: ThinVec<TestBinderConstraint>,
},
Lifetime {
#[visitable(extra = LifetimeCtxt::Bound)]
lhs: Lifetime,
#[visitable(extra = LifetimeCtxt::Bound)]
rhs: Lifetime,
},
Type {
lhs: Box<Ty>,
#[visitable(extra = LifetimeCtxt::Bound)]
rhs: Lifetime,
},
}

// Adding a new variant? Please update `test_item` in `tests/ui/macros/stringify.rs`.
#[derive(Clone, Encodable, Decodable, Debug)]
pub enum ItemKind {
Expand Down Expand Up @@ -4173,6 +4202,8 @@ pub enum ItemKind {
/// A list or glob delegation item (`reuse prefix::{a, b, c}`, `reuse prefix::*`).
/// Treated similarly to a macro call and expanded early.
DelegationMac(Box<DelegationMac>),
/// A `test_binder_constraints!()`. Perma-unstable, used only for rustc tests.
TestBinderConstraints(Box<TestBinderConstraints>),
}

impl ItemKind {
Expand All @@ -4199,17 +4230,31 @@ impl ItemKind {
| ItemKind::GlobalAsm(_)
| ItemKind::Impl(_)
| ItemKind::MacCall(_)
| ItemKind::DelegationMac(_) => None,
| ItemKind::DelegationMac(_)
| ItemKind::TestBinderConstraints(_) => None,
}
}

/// "a" or "an"
pub fn article(&self) -> &'static str {
use ItemKind::*;
match self {
Use(..) | Static(..) | Const(..) | ConstBlock(..) | Fn(..) | Mod(..)
| GlobalAsm(..) | TyAlias(..) | Struct(..) | Union(..) | Trait(..) | TraitAlias(..)
| MacroDef(..) | Delegation(..) | DelegationMac(..) => "a",
Use(..)
| Static(..)
| Const(..)
| ConstBlock(..)
| Fn(..)
| Mod(..)
| GlobalAsm(..)
| TyAlias(..)
| Struct(..)
| Union(..)
| Trait(..)
| TraitAlias(..)
| MacroDef(..)
| Delegation(..)
| DelegationMac(..)
| TestBinderConstraints(..) => "a",
ExternCrate(..) | ForeignMod(..) | MacCall(..) | Enum(..) | Impl { .. } => "an",
}
}
Expand All @@ -4236,6 +4281,7 @@ impl ItemKind {
ItemKind::Impl { .. } => "implementation",
ItemKind::Delegation(..) => "delegated function",
ItemKind::DelegationMac(..) => "delegation",
ItemKind::TestBinderConstraints(..) => "test_binder_constraints!",
}
}

Expand All @@ -4249,7 +4295,8 @@ impl ItemKind {
| Self::Union(_, generics, _)
| Self::Trait(Trait { generics, .. })
| Self::TraitAlias(TraitAlias { generics, .. })
| Self::Impl(Impl { generics, .. }) => Some(generics),
| Self::Impl(Impl { generics, .. })
| Self::TestBinderConstraints(TestBinderConstraints { generics, .. }) => Some(generics),

Self::ExternCrate(..)
| Self::Use(..)
Expand Down
14 changes: 14 additions & 0 deletions compiler/rustc_ast/src/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,9 @@ macro_rules! common_visitor_and_walkers {
ThinVec<PathSegment>,
ThinVec<PreciseCapturingArg>,
ThinVec<Pat>,
ThinVec<TestBinderConstraint>,
ThinVec<TestBinderExists>,
ThinVec<TestBinderForall>,
ThinVec<Box<Ty>>,
ThinVec<TyPat>,
ThinVec<EiiImpl>,
Expand Down Expand Up @@ -605,6 +608,11 @@ macro_rules! common_visitor_and_walkers {
fn visit_poly_trait_ref(PolyTraitRef);
fn visit_precise_capturing_arg(PreciseCapturingArg);
fn visit_qself(QSelf);
fn visit_test_binder_body(TestBinderBody);
fn visit_test_binder_constraint(TestBinderConstraint);
fn visit_test_binder_constraints(TestBinderConstraints);
fn visit_test_binder_exists(TestBinderExists);
fn visit_test_binder_forall(TestBinderForall);
fn visit_trait_ref(TraitRef);
fn visit_ty_pat(TyPat);
fn visit_ty(Ty);
Expand Down Expand Up @@ -870,6 +878,8 @@ macro_rules! common_visitor_and_walkers {
visit_visitable!($($mut)? vis, delegation),
ItemKind::DelegationMac(dm) =>
visit_visitable!($($mut)? vis, dm),
ItemKind::TestBinderConstraints(item) =>
visit_visitable!($($mut)? vis, item),
}
V::Result::output()
}
Expand Down Expand Up @@ -1133,6 +1143,10 @@ macro_rules! common_visitor_and_walkers {
pub fn walk_poly_trait_ref(PolyTraitRef);
pub fn walk_precise_capturing_arg(PreciseCapturingArg);
pub fn walk_qself(QSelf);
pub fn walk_test_binder_body(TestBinderBody);
pub fn walk_test_binder_constraint(TestBinderConstraint);
pub fn walk_test_binder_exists(TestBinderExists);
pub fn walk_test_binder_forall(TestBinderForall);
pub fn walk_trait_ref(TraitRef);
pub fn walk_ty_pat(TyPat);
pub fn walk_ty(Ty);
Expand Down
10 changes: 10 additions & 0 deletions compiler/rustc_ast_lowering/src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,4 +431,14 @@ impl<'a, 'hir> Visitor<'hir> for NodeCollector<'a, 'hir> {
}
intravisit::walk_precise_capturing_arg(self, arg);
}

fn visit_test_binder_forall(&mut self, forall: &'hir TestBinderForall<'hir>) -> Self::Result {
self.insert(forall.span, forall.hir_id, Node::TestBinderForall(forall));
self.with_parent(forall.hir_id, |this| intravisit::walk_test_binder_forall(this, forall))
}

fn visit_test_binder_exists(&mut self, exists: &'hir TestBinderExists<'hir>) -> Self::Result {
self.insert(exists.span, exists.hir_id, Node::TestBinderExists(exists));
self.with_parent(exists.hir_id, |this| intravisit::walk_test_binder_exists(this, exists))
}
}
Loading
Loading