Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
6cc4b6f
reflection: prefix reflection intrinsics with type_id
yara-blue Sep 15, 2026
13035c1
Iterate only once to get module inner attributes position
GuillaumeGomez Sep 30, 2026
9d32c00
bootstrap: Enable rustdoc mergeable CCI for std and internal docs
notriddle Oct 1, 2026
31b8740
Miri can do dirfd now
RalfJung Sep 30, 2026
13b380d
Several small span improvements
nnethercote Oct 1, 2026
29df41c
fix `ValidateBoundVars`
lcnr Oct 1, 2026
b533b26
Add mul_add_relaxed methods for floating-point types
landsharkiest Oct 2, 2026
6d70bb1
bump rustc-build-sysroot
RalfJung Oct 2, 2026
d85a18b
Partially revert previous wrong fix and do some hack instead
ShoyuVanilla Sep 14, 2026
3510be9
Revert "doc: Fix external mention of signum() return value regarding …
Darksonn Oct 2, 2026
5ec3896
Use 'evaluates to' wording
Darksonn Oct 2, 2026
9270acb
Fix `TypeOutlives` fast-path
ShoyuVanilla Oct 1, 2026
eb4108a
Add mailmap entry
Kobzol Oct 2, 2026
c39fbc4
Rename `rustc_driver::run_compiler` to `compiler_entrypoint`
blyxyas Oct 2, 2026
1859636
Change rustc_public `run` macro to also use `compiler_entrypoint`
blyxyas Oct 2, 2026
60f8e92
Remove variants from `feature-gate-autodiff-use` test
Kobzol Oct 2, 2026
9b60c2a
reflection: move type_id intrinsics to intrinsics::reflection
yara-blue Sep 15, 2026
e370c54
Rollup merge of #163582 - notriddle:revert-revert-mergeable-cci, r=Ko…
JonathanBrouwer Oct 2, 2026
522c673
Rollup merge of #151793 - landsharkiest:float_mul_add_relaxed-#151770…
JonathanBrouwer Oct 2, 2026
0d66027
Rollup merge of #162782 - ShoyuVanilla:issue-162557, r=lcnr
JonathanBrouwer Oct 2, 2026
41459a6
Rollup merge of #163010 - RalfJung:unix-dir-entry, r=Mark-Simulacrum
JonathanBrouwer Oct 2, 2026
12ea9e3
Rollup merge of #163535 - GuillaumeGomez:improve-doc-strings-perf, r=…
JonathanBrouwer Oct 2, 2026
12e214a
Rollup merge of #163576 - ShoyuVanilla:outlives-fast-path, r=lcnr
JonathanBrouwer Oct 2, 2026
3fa7cd2
Rollup merge of #163587 - nnethercote:small-span-improvements, r=petr…
JonathanBrouwer Oct 2, 2026
3951fd6
Rollup merge of #163603 - yara-blue:reflection-reorder, r=oli-obk
JonathanBrouwer Oct 2, 2026
211f337
Rollup merge of #163612 - lcnr:fix-validate-bound-vars, r=oli-obk
JonathanBrouwer Oct 2, 2026
f823263
Rollup merge of #163632 - RalfJung:miri-build-sysroot, r=oli-obk
JonathanBrouwer Oct 2, 2026
8c897a9
Rollup merge of #163635 - Darksonn:signum-nan, r=RalfJung
JonathanBrouwer Oct 2, 2026
da54cdd
Rollup merge of #163644 - Kobzol:austin-k-mailmap, r=jieyouxu
JonathanBrouwer Oct 2, 2026
b624ec2
Rollup merge of #163647 - blyxyas:change-run_compiler-to-compiler_ent…
JonathanBrouwer Oct 2, 2026
f784deb
Rollup merge of #163651 - Kobzol:feature-autodiff, r=jieyouxu
JonathanBrouwer Oct 2, 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
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Arthur Cohen <arthur.cohen@epita.fr>
Arthur Silva <arthurprs@gmail.com>
Arthur Woimbée <arthur.woimbee@gmail.com>
Artyom Pavlov <newpavlov@gmail.com>
Austin K. <akiekintveld@icloud.com>
Austin Seipp <mad.one@gmail.com> <as@hacks.yi.org>
Ayaz Hafiz <ayaz.hafiz.1@gmail.com>
Aydin Kim <ladinjin@hanmail.net> aydin.kim <aydin.kim@samsung.com>
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3493,9 +3493,9 @@ dependencies = [

[[package]]
name = "rustc-build-sysroot"
version = "0.5.13"
version = "0.5.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "569d545953ee9a1ab9d3e9112e961739ff0cfd50bce06b126937395940be69c9"
checksum = "0d0ed7817483b026efc0492f4ccca177f00fb711537f37943cc412bbf12682b4"
dependencies = [
"anyhow",
"rustc_version",
Expand Down
10 changes: 5 additions & 5 deletions compiler/rustc_const_eval/src/const_eval/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ impl<'tcx> interpret::Machine<'tcx> for CompileTimeMachine<'tcx> {
}
}

sym::type_of => {
sym::type_id_type_of => {
let ty = ecx.read_type_id(&args[0])?;
ecx.write_type_info(ty, dest)?;
}
Expand All @@ -627,7 +627,7 @@ impl<'tcx> interpret::Machine<'tcx> for CompileTimeMachine<'tcx> {
ecx.write_scalar(Scalar::from_bool(is_mutable), dest)?;
}

sym::size_of_type_id => {
sym::type_id_size_of => {
let ty = ecx.read_type_id(&args[0])?;
let layout = ecx.layout_of(ty)?;
let variant_index = if layout.is_sized() {
Expand Down Expand Up @@ -764,7 +764,7 @@ impl<'tcx> interpret::Machine<'tcx> for CompileTimeMachine<'tcx> {
ecx.write_scalar(Scalar::from_target_usize(variants_num as u64, ecx), dest)?;
}

sym::variant_name => {
sym::type_id_variant_name => {
let base = ecx.read_type_id(&args[0])?;

let field_name = if let ty::Adt(def, _) = base.kind() {
Expand All @@ -790,7 +790,7 @@ impl<'tcx> interpret::Machine<'tcx> for CompileTimeMachine<'tcx> {
)?;
}

sym::variant_non_exhaustive => {
sym::type_id_variant_non_exhaustive => {
let base = ecx.read_type_id(&args[0])?;

let non_exhaustive = if let ty::Adt(def, _) = base.kind() {
Expand Down Expand Up @@ -890,7 +890,7 @@ impl<'tcx> interpret::Machine<'tcx> for CompileTimeMachine<'tcx> {
ecx.write_type_id_generics(dest, ty)?;
}

sym::non_exhaustive => {
sym::type_id_non_exhaustive => {
let ty = ecx.read_type_id(&args[0])?;

// FIXME(reflection): need a way to obtain non-exhaustiveness of a variant's fields.
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_const_eval/src/const_eval/type_info/adt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ impl<'tcx> InterpCx<'tcx, CompileTimeMachine<'tcx>> {

match field.name {
sym::generics => self.write_generics(&field_place, generics)?,
sym::variants => {
sym::type_id_variants => {
self.allocate_fill_and_write_slice_ptr(
&field_place,
enum_def.variants().len() as u64,
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_driver_impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ impl Callbacks for TimePassesCallbacks {
}

/// This is the primary entry point for rustc.
pub fn run_compiler(at_args: &[String], callbacks: &mut (dyn Callbacks + Send)) {
pub fn compiler_entrypoint(at_args: &[String], callbacks: &mut (dyn Callbacks + Send)) {
let mut default_early_dcx = EarlyDiagCtxt::new(ErrorOutputType::default());

// Throw away the first argument, the name of the binary.
Expand Down Expand Up @@ -1386,7 +1386,7 @@ static ICE_PATH: OnceLock<Option<PathBuf>> = OnceLock::new();

// This function should only be called from the ICE hook.
//
// The intended behavior is that `run_compiler` will invoke `ice_path_with_config` early in the
// The intended behavior is that `compiler_entrypoint` will invoke `ice_path_with_config` early in the
// initialization process to properly initialize the ICE_PATH static based on parsed CLI flags.
//
// Subsequent calls to either function will then return the proper ICE path as configured by
Expand Down Expand Up @@ -1674,7 +1674,7 @@ pub fn main() -> ExitCode {
install_ctrlc_handler();

let exit_code =
catch_with_exit_code(|| run_compiler(&args::raw_args(&early_dcx), &mut callbacks));
catch_with_exit_code(|| compiler_entrypoint(&args::raw_args(&early_dcx), &mut callbacks));

if let Some(format) = callbacks.time_passes {
let end_rss = get_resident_set_size();
Expand Down
23 changes: 14 additions & 9 deletions compiler/rustc_hir_analysis/src/check/intrinsic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ fn intrinsic_operation_unsafety(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId) -> hi
| sym::minimumf128
| sym::mul_with_overflow
| sym::needs_drop
| sym::non_exhaustive
| sym::offload
| sym::offload_get_num_devices
| sym::offset_of
Expand Down Expand Up @@ -208,17 +207,19 @@ fn intrinsic_operation_unsafety(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId) -> hi
| sym::type_id_function_ptr
| sym::type_id_generics
| sym::type_id_is_signed
| sym::type_id_non_exhaustive
| sym::type_id_points_mutably
| sym::type_id_points_to
| sym::type_id_size_of
| sym::type_id_type_of
| sym::type_id_variant_name
| sym::type_id_variant_non_exhaustive
| sym::type_id_variants
| sym::type_id_vtable
| sym::type_name
| sym::type_of
| sym::ub_checks
| sym::va_copy
| sym::variant_count
| sym::variant_name
| sym::variant_non_exhaustive
| sym::wrapping_add
| sym::wrapping_mul
| sym::wrapping_sub
Expand Down Expand Up @@ -297,7 +298,7 @@ pub(crate) fn check_intrinsic_type(
sym::size_of_val | sym::align_of_val => {
(1, 0, vec![Ty::new_imm_ptr(tcx, param(0))], tcx.types.usize)
}
sym::size_of_type_id => (0, 0, vec![type_id_ty()], Ty::new_option(tcx, tcx.types.usize)),
sym::type_id_size_of => (0, 0, vec![type_id_ty()], Ty::new_option(tcx, tcx.types.usize)),
sym::offset_of => (1, 0, vec![tcx.types.u32, tcx.types.u32], tcx.types.usize),
sym::field_offset => (1, 0, vec![], tcx.types.usize),
sym::rustc_peek => (1, 0, vec![param(0)], param(0)),
Expand Down Expand Up @@ -340,8 +341,12 @@ pub(crate) fn check_intrinsic_type(
sym::type_id_points_mutably => (0, 0, vec![type_id_ty()], tcx.types.bool),
sym::type_id_points_to => (0, 0, vec![type_id_ty()], Ty::new_option(tcx, type_id_ty())),
sym::type_id_variants => (0, 0, vec![type_id_ty()], tcx.types.usize),
sym::variant_name => (0, 0, vec![type_id_ty(), tcx.types.usize], Ty::new_static_str(tcx)),
sym::variant_non_exhaustive => (0, 0, vec![type_id_ty(), tcx.types.usize], tcx.types.bool),
sym::type_id_variant_name => {
(0, 0, vec![type_id_ty(), tcx.types.usize], Ty::new_static_str(tcx))
}
sym::type_id_variant_non_exhaustive => {
(0, 0, vec![type_id_ty(), tcx.types.usize], tcx.types.bool)
}
sym::type_id_vtable => {
let dyn_metadata = tcx.require_lang_item(LangItem::DynMetadata, span);
let dyn_metadata_adt_ref = tcx.adt_def(dyn_metadata);
Expand All @@ -356,7 +361,7 @@ pub(crate) fn check_intrinsic_type(

(0, 0, vec![type_id_ty(); 2], ret_ty)
}
sym::type_of => (
sym::type_id_type_of => (
0,
0,
vec![type_id_ty()],
Expand All @@ -365,7 +370,7 @@ pub(crate) fn check_intrinsic_type(
sym::field_representing_type_actual_type_id => (0, 0, vec![type_id_ty()], type_id_ty()),
sym::field_representing_type_name => (0, 0, vec![type_id_ty()], Ty::new_static_str(tcx)),
sym::field_representing_type_offset => (0, 0, vec![type_id_ty()], tcx.types.usize),
sym::non_exhaustive => (0, 0, vec![type_id_ty()], tcx.types.bool),
sym::type_id_non_exhaustive => (0, 0, vec![type_id_ty()], tcx.types.bool),
sym::type_id_generics => (
0,
0,
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_public/src/rustc_internal/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ macro_rules! optional {
#[doc(hidden)]
macro_rules! run_driver {
($args:expr, $callback:expr $(, $with_tcx:ident)?) => {{
use rustc_driver::{Callbacks, Compilation, run_compiler};
use rustc_driver::{Callbacks, Compilation, compiler_entrypoint};
use rustc_middle::ty::TyCtxt;
use rustc_interface::interface;
use rustc_public::rustc_internal;
Expand Down Expand Up @@ -199,7 +199,7 @@ macro_rules! run_driver {
/// Runs the compiler against given target and tests it with `test_function`
pub fn run(&mut self, args: &[String]) -> Result<C, CompilerError<B>> {
let compiler_result = rustc_driver::catch_fatal_errors(|| -> interface::Result::<()> {
run_compiler(&args, self);
compiler_entrypoint(&args, self);
Ok(())
});
match (compiler_result, self.result.take()) {
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_resolve/src/late.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2861,12 +2861,14 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> {
}

fn resolve_item(&mut self, item: &'ast Item) {
let mut mod_inner_attrs_start = None;
match item.kind {
ItemKind::Mod(..) => {
// We only handle outer doc comments for modules here.
let attrs = if let Some(pos) = item.attrs.iter().position(|a| {
a.doc_resolution_scope().is_some_and(|style| style == AttrStyle::Inner)
}) {
mod_inner_attrs_start = Some(pos);
&item.attrs[..pos]
} else {
&item.attrs
Expand Down Expand Up @@ -2972,9 +2974,7 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> {
this.with_rib(TypeNS, RibKind::Module(module.expect_local()), |this| {
// Outer doc comments were already handled above, now we handle
// inner doc comments.
let attrs = if let Some(pos) = item.attrs.iter().position(|a| {
a.doc_resolution_scope().is_some_and(|style| style == AttrStyle::Inner)
}) {
let attrs = if let Some(pos) = mod_inner_attrs_start {
&item.attrs[pos..]
} else {
&[]
Expand Down
Loading
Loading