Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 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
dc42f11
Add two comments relating to new-solver performance
nnethercote Aug 24, 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
18a2dd1
make sure paramenv is smol
jdonszelmann Jul 13, 2026
536f0a3
Add codegen test for static table search loop unrolling
zakrad Aug 24, 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
c7b5764
caller bounds returns iterator
jdonszelmann Jul 14, 2026
a4eb66f
always construct paramenv from iterator
jdonszelmann Jul 14, 2026
0da5e32
fixup rustdoc
jdonszelmann Aug 24, 2026
2573b5c
Rollup merge of #161443 - khyperia:abbys-tests, r=BoxyUwU
JonathanBrouwer Aug 25, 2026
e6e6227
Rollup merge of #161617 - maxdexh:can-i-has-map-allocator, r=nia-e
JonathanBrouwer Aug 25, 2026
70dfa9d
Rollup merge of #161726 - Walnut356:pdb_tuple_fields, r=Kobzol
JonathanBrouwer Aug 25, 2026
28213ff
Rollup merge of #161729 - RalfJung:miri, r=RalfJung
JonathanBrouwer Aug 25, 2026
f1c0e2d
Rollup merge of #161745 - RalfJung:repr-exhaustive, r=mati865
JonathanBrouwer Aug 25, 2026
9bedded
Rollup merge of #161447 - jdonszelmann:paramenv-from-iter, r=lcnr
JonathanBrouwer Aug 25, 2026
f6be3fd
Rollup merge of #161522 - folkertdev:gcc-fma16-correctly-rounded, r=t…
JonathanBrouwer Aug 25, 2026
4dc9fd0
Rollup merge of #161631 - nnethercote:new-solver-perf-comments, r=jdo…
JonathanBrouwer Aug 25, 2026
a672ea0
Rollup merge of #161724 - zakrad:regr-test-44041, r=chenyukang
JonathanBrouwer Aug 25, 2026
6513fa5
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