Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f9679fa
Split IncrCompSession out of Session
bjorn3 Jul 8, 2026
7232830
std: move futex implementations into sys::sync::futex
valentynkit Jul 3, 2026
5b40f3d
std: connect sys::sync::futex and drop the pal declarations
valentynkit Jul 3, 2026
012c356
Select cache values to verify by key fingerprint, not value fingerprint
xmakro Jul 29, 2026
833ec34
[blocked] Link to proposed LLM policy in CONTRIBUTING and pull reques…
jyn514 Jun 18, 2026
ac1e5f4
Handle slice-tailed DSTs in autodiff type trees
Dnreikronos Aug 2, 2026
82317b3
Split `SpannedTypeVisitor` into its own crate, `rustc_ty_walk`
joshtriplett Aug 1, 2026
0f80d01
Bless bootstrap tests for new `rustc_ty_walk` crate
joshtriplett Aug 4, 2026
e3464ab
Avoid resolving path keywords outside TypeNS
mu001999 Aug 3, 2026
e0830fa
implement unsafe speculative flag to be used by `CmRefCell::borrow`, …
LorrensP-2158466 Aug 4, 2026
73f94b6
Make the `rustc_unsafe_specialization_marker` attribute actually `uns…
mejrs Aug 3, 2026
180c637
Remove rustc_middle dependency on rustc_hir_pretty
mejrs Aug 3, 2026
18e0dd9
Document zero-sized autodiff slice handling
Dnreikronos Aug 4, 2026
6794814
Add some tests for specialization.
jackh726 Aug 3, 2026
228bbb3
fix(bootstrap): Normalize the names of proc macro dependency crates
jamie-osec Aug 4, 2026
a6dfd0c
docs: fix typo in AllowExprMetavar comment
jewboi896-cmyk Aug 4, 2026
b568775
Update expect messages in tcp.rs doc examples to follow the style guide
CacinieP Aug 5, 2026
eace512
Suggest cast_signed for overflowing integer literals
YingqiDuan Aug 5, 2026
a91590b
move mir-opt miri tests to CI logic
RalfJung Aug 3, 2026
acbfd08
Rollup merge of #160130 - xmakro:cleanup/deterministic-verify-samplin…
jhpratt Aug 5, 2026
4b15b26
Rollup merge of #160360 - mejrs:hir_pretty, r=nnethercote
jhpratt Aug 5, 2026
4e24c34
Rollup merge of #160422 - RalfJung:miri-mir-opt-tests, r=Kobzol
jhpratt Aug 5, 2026
de8756e
Rollup merge of #160444 - mu001999-contrib:fix-160195, r=petrochenkov
jhpratt Aug 5, 2026
5703cb8
Rollup merge of #160510 - LorrensP-2158466:res-unsafe-speculative-fla…
jhpratt Aug 5, 2026
78d6462
Rollup merge of #155424 - jyn514:llm-policy, r=Mark-Simulacrum
jhpratt Aug 5, 2026
c51a695
Rollup merge of #158726 - valentynkit:sys-sync-futex, r=jhpratt
jhpratt Aug 5, 2026
afcea97
Rollup merge of #159225 - bjorn3:split_incr_comp_session, r=oli-obk
jhpratt Aug 5, 2026
838a127
Rollup merge of #159820 - mejrs:specialization_marker, r=JonathanBrouwer
jhpratt Aug 5, 2026
923f4ac
Rollup merge of #160362 - joshtriplett:ty-walk-crate, r=fee1-dead
jhpratt Aug 5, 2026
ad9ce8f
Rollup merge of #160390 - Dnreikronos:autodiff/slice_dst_typetree, r=…
jhpratt Aug 5, 2026
b233348
Rollup merge of #160420 - YingqiDuan:fix-160403-cast-signed-suggestio…
jhpratt Aug 5, 2026
0e88174
Rollup merge of #160520 - jackh726:specialization-tests, r=nikomatsakis
jhpratt Aug 5, 2026
af1d2a0
Rollup merge of #160522 - clubby789:normalize-proc-macro-deps, r=jiey…
jhpratt Aug 5, 2026
c0075b6
Rollup merge of #160531 - jewboi896-cmyk:patch-1, r=ShoyuVanilla
jhpratt Aug 5, 2026
c09ebd7
Rollup merge of #160538 - CacinieP:expect-tcp-precondition-style, r=j…
jhpratt Aug 5, 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
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ c682aa162b0d41e21cc6748f4fecfe01efb69d1f
1fcae03369abb4c2cc180cd5a49e1f4440a81300
# Breaking up of compiletest runtest.rs
60600a6fa403216bfd66e04f948b1822f6450af7

# std: move futex implementations into sys::sync::futex
7232830d10b6af772e0e4670a2ff61dd23830ed8
11 changes: 11 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<!-- homu-ignore:start -->

- [ ] I did not use an LLM to create a change in this PR.
- [ ] I used an LLM to create a change in this PR, and I have explained below how it was used.

<!--
Please read our [LLM policy] before opening a PR,
and check one of the boxes above to indicate whether you've used an LLM.
If you do not check a box, a reviewer may ask you whether an LLM was involved.
LLM contributions are not banned, but are held to a higher standard of review and correctness.

[LLM policy]: https://forge.rust-lang.org/policies/llm-usage.html

If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.
Expand Down
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ that you read and understand the [rustc-dev-guide] before making a contribution.
talks about the different bots in the Rust ecosystem, the Rust development tools,
bootstrapping, the compiler architecture, source code representation, and more.

## LLM policy

We have a policy for how LLMs are allowed to be used in contributions to `rust-lang/rust`.
You can read it [on Forge][LLM policy].
For suggestions about how to use LLMs *well*, and how to review LLM-created PRs, see [the dev-guide][llm-guidance].

[LLM policy]: https://forge.rust-lang.org/policies/llm-usage.html
[llm-guidance]: https://rustc-dev-guide.rust-lang.org/llm-guidance.html

## [Getting help](https://rustc-dev-guide.rust-lang.org/getting-started.html#asking-questions)

There are many ways you can get help when you're stuck. Rust has two platforms for this:
Expand Down
15 changes: 13 additions & 2 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3954,6 +3954,7 @@ dependencies = [
"rustc_errors",
"rustc_expand",
"rustc_feature",
"rustc_hir",
"rustc_hir_analysis",
"rustc_hir_pretty",
"rustc_index",
Expand Down Expand Up @@ -4414,7 +4415,6 @@ dependencies = [
"rustc_graphviz",
"rustc_hashes",
"rustc_hir",
"rustc_hir_pretty",
"rustc_index",
"rustc_lint_defs",
"rustc_macros",
Expand Down Expand Up @@ -4621,7 +4621,7 @@ dependencies = [
"rustc_middle",
"rustc_session",
"rustc_span",
"rustc_ty_utils",
"rustc_ty_walk",
"tracing",
]

Expand Down Expand Up @@ -4908,6 +4908,17 @@ dependencies = [
"rustc_span",
"rustc_target",
"rustc_trait_selection",
"rustc_ty_walk",
"tracing",
]

[[package]]
name = "rustc_ty_walk"
version = "0.0.0"
dependencies = [
"rustc_hir",
"rustc_middle",
"rustc_span",
"tracing",
]

Expand Down
15 changes: 11 additions & 4 deletions compiler/rustc_attr_parsing/src/attributes/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use std::mem;
use rustc_feature::AttributeStability;

use super::prelude::*;
use crate::AttributeSafety;
use crate::attributes::{NoArgsAttributeParser, SingleAttributeParser};
use crate::context::AcceptContext;
use crate::parser::ArgParser;
Expand Down Expand Up @@ -98,12 +99,18 @@ impl NoArgsAttributeParser for RustcSpecializationTraitParser {
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcSpecializationTrait;
}

pub(crate) struct RustcUnsafeSpecializationMarkerParser;
impl NoArgsAttributeParser for RustcUnsafeSpecializationMarkerParser {
const PATH: &[Symbol] = &[sym::rustc_unsafe_specialization_marker];
pub(crate) struct RustcAllowLifetimeDependentSpecializationParser;
impl NoArgsAttributeParser for RustcAllowLifetimeDependentSpecializationParser {
const PATH: &[Symbol] = &[sym::rustc_allow_lifetime_dependent_specialization];
const ALLOWED_TARGETS: AllowedTargets<'_> = AllowedTargets::AllowList(&[Allow(Target::Trait)]);
const STABILITY: AttributeStability = unstable!(rustc_attrs);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcUnsafeSpecializationMarker;
const CREATE: fn(Span) -> AttributeKind =
|_| AttributeKind::RustcAllowLifetimeDependentSpecialization;
const SAFETY: AttributeSafety = AttributeSafety::Unsafe {
note: "this attribute requires `unsafe` because lifetime constraints from \
the implementations of the trait are not considered when specializing",
unsafe_since: None,
};
}

// Coherence
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_attr_parsing/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ attribute_parsers!(
Single<WithoutArgs<RustcAllocatorParser>>,
Single<WithoutArgs<RustcAllocatorZeroedParser>>,
Single<WithoutArgs<RustcAllowIncoherentImplParser>>,
Single<WithoutArgs<RustcAllowLifetimeDependentSpecializationParser>>,
Single<WithoutArgs<RustcAsPtrParser>>,
Single<WithoutArgs<RustcCanonicalSymbolParser>>,
Single<WithoutArgs<RustcCaptureAnalysisParser>>,
Expand Down Expand Up @@ -355,7 +356,6 @@ attribute_parsers!(
Single<WithoutArgs<RustcStrictCoherenceParser>>,
Single<WithoutArgs<RustcTestEntrypointMarkerParser>>,
Single<WithoutArgs<RustcTrivialFieldReadsParser>>,
Single<WithoutArgs<RustcUnsafeSpecializationMarkerParser>>,
Single<WithoutArgs<SplatParser>>,
Single<WithoutArgs<ThreadLocalParser>>,
Single<WithoutArgs<TrackCallerParser>>,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_attr_parsing/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ fn expr_to_lit<'sess>(
}
}

/// Whether expansions of `expr` metavariables from decrarative macros
/// Whether expansions of `expr` metavariables from declarative macros
/// are permitted. Used when parsing meta items; currently, only `cfg` predicates
/// enable this option
#[derive(Clone, Copy, PartialEq, Eq)]
Expand Down
5 changes: 3 additions & 2 deletions compiler/rustc_codegen_cranelift/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ use rustc_codegen_ssa::traits::CodegenBackend;
use rustc_codegen_ssa::{CompiledModules, CrateInfo, TargetConfig, back};
use rustc_log::tracing::info;
use rustc_middle::dep_graph::WorkProductMap;
use rustc_session::Session;
use rustc_session::config::{NATIVE_CPU, OutputFilenames};
use rustc_session::{IncrCompSession, Session};
use rustc_span::{Symbol, sym};
use rustc_target::spec::{Arch, CfgAbi, Env, Os};

Expand Down Expand Up @@ -233,13 +233,14 @@ impl CodegenBackend for CraneliftCodegenBackend {
&self,
ongoing_codegen: Box<dyn Any>,
sess: &Session,
incr_comp_session: Option<&IncrCompSession>,
_outputs: &OutputFilenames,
crate_info: &CrateInfo,
) -> (CompiledModules, WorkProductMap) {
ongoing_codegen
.downcast::<rustc_codegen_ssa::back::write::OngoingCodegen<driver::aot::AotDriver>>()
.unwrap()
.join(sess, crate_info)
.join(sess, incr_comp_session, crate_info)
}

fn fallback_intrinsics(&self) -> Vec<Symbol> {
Expand Down
5 changes: 3 additions & 2 deletions compiler/rustc_codegen_gcc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ use rustc_errors::{DiagCtxt, DiagCtxtHandle};
use rustc_middle::dep_graph::{WorkProduct, WorkProductMap};
use rustc_middle::ty::TyCtxt;
use rustc_middle::util::Providers;
use rustc_session::Session;
use rustc_session::config::{OptLevel, OutputFilenames};
use rustc_session::{IncrCompSession, Session};
use rustc_span::{Symbol, sym};
use rustc_target::spec::{Arch, RelocModel};
use tempfile::TempDir;
Expand Down Expand Up @@ -297,13 +297,14 @@ impl CodegenBackend for GccCodegenBackend {
&self,
ongoing_codegen: Box<dyn Any>,
sess: &Session,
incr_comp_session: Option<&IncrCompSession>,
_outputs: &OutputFilenames,
crate_info: &CrateInfo,
) -> (CompiledModules, WorkProductMap) {
ongoing_codegen
.downcast::<rustc_codegen_ssa::back::write::OngoingCodegen<GccCodegenBackend>>()
.expect("Expected GccCodegenBackend's OngoingCodegen, found Box<Any>")
.join(sess, crate_info)
.join(sess, incr_comp_session, crate_info)
}

fn target_config(&self, sess: &Session) -> TargetConfig {
Expand Down
11 changes: 3 additions & 8 deletions compiler/rustc_codegen_llvm/src/builder/autodiff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,13 @@ pub(crate) fn adjust_activity_to_abi<'tcx>(
let mut del_activities = 0;
for (i, ty) in sig.inputs().iter().enumerate() {
if let Some(inner_ty) = ty.builtin_deref(true) {
if inner_ty.is_slice() {
let tail_ty = tcx.struct_tail_for_codegen(inner_ty, typing_env);
if let ty::Slice(element_ty) = tail_ty.kind() {
// Now we need to figure out the size of each slice element in memory to allow
// safety checks and usability improvements in the backend.
let sty = match inner_ty.builtin_index() {
Some(sty) => sty,
None => {
panic!("slice element type unknown");
}
};
let pci = PseudoCanonicalInput {
typing_env: TypingEnv::fully_monomorphized(),
value: sty,
value: *element_ty,
};

let layout = tcx.layout_of(pci);
Expand Down
5 changes: 3 additions & 2 deletions compiler/rustc_codegen_llvm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ use rustc_metadata::EncodedMetadata;
use rustc_middle::dep_graph::{WorkProduct, WorkProductMap};
use rustc_middle::ty::TyCtxt;
use rustc_middle::util::Providers;
use rustc_session::Session;
use rustc_session::config::{OptLevel, OutputFilenames, PrintKind, PrintRequest};
use rustc_session::{IncrCompSession, Session};
use rustc_span::{Symbol, sym};
use rustc_target::spec::{RelocModel, TlsModel};

Expand Down Expand Up @@ -380,13 +380,14 @@ impl CodegenBackend for LlvmCodegenBackend {
&self,
ongoing_codegen: Box<dyn Any>,
sess: &Session,
incr_comp_session: Option<&IncrCompSession>,
outputs: &OutputFilenames,
crate_info: &CrateInfo,
) -> (CompiledModules, WorkProductMap) {
let (compiled_modules, work_products) = ongoing_codegen
.downcast::<rustc_codegen_ssa::back::write::OngoingCodegen<LlvmCodegenBackend>>()
.expect("Expected LlvmCodegenBackend's OngoingCodegen, found Box<Any>")
.join(sess, crate_info);
.join(sess, incr_comp_session, crate_info);

if sess.opts.unstable_opts.llvm_time_trace {
sess.time("llvm_dump_timing_file", || {
Expand Down
25 changes: 19 additions & 6 deletions compiler/rustc_codegen_ssa/src/back/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ use rustc_metadata::fs::copy_to_stdout;
use rustc_middle::bug;
use rustc_middle::dep_graph::{WorkProduct, WorkProductMap};
use rustc_middle::ty::TyCtxt;
use rustc_session::Session;
use rustc_session::config::{
self, CrateType, Lto, OptLevel, OutFileName, OutputFilenames, OutputType, Passes,
SwitchWithOptPath,
};
use rustc_session::{IncrCompSession, Session};
use rustc_span::source_map::SourceMap;
use rustc_span::{FileName, InnerSpan, Span, SpanData};
use rustc_target::spec::{MergeFunctions, SanitizerSet};
Expand Down Expand Up @@ -465,6 +465,7 @@ pub(crate) fn start_async_codegen<B: WriteBackendMethods>(

fn copy_all_cgu_workproducts_to_incr_comp_cache_dir(
sess: &Session,
incr_comp_session: Option<&IncrCompSession>,
compiled_modules: &CompiledModules,
) -> WorkProductMap {
let mut work_products = WorkProductMap::default();
Expand Down Expand Up @@ -498,6 +499,7 @@ fn copy_all_cgu_workproducts_to_incr_comp_cache_dir(
}
let (id, product) = copy_cgu_workproduct_to_incr_comp_cache_dir(
sess,
incr_comp_session.unwrap(),
&module.name,
files.as_slice(),
&module.links_from_incr_cache,
Expand Down Expand Up @@ -1294,7 +1296,10 @@ fn start_executing_work<B: WriteBackendMethods>(
time_trace: sess.opts.unstable_opts.llvm_time_trace,
remark: sess.opts.cg.remark.clone(),
remark_dir,
incr_comp_session_dir: sess.incr_comp_session_dir_opt().map(|r| r.clone()),
incr_comp_session_dir: tcx
.incr_comp_session
.as_ref()
.map(|incr_comp_session| incr_comp_session.session_directory.clone()),
output_filenames: Arc::clone(tcx.output_filenames(())),
module_config: regular_config,
opt_level,
Expand Down Expand Up @@ -2126,7 +2131,12 @@ pub struct OngoingCodegen<B: WriteBackendMethods> {
}

impl<B: WriteBackendMethods> OngoingCodegen<B> {
pub fn join(self, sess: &Session, crate_info: &CrateInfo) -> (CompiledModules, WorkProductMap) {
pub fn join(
self,
sess: &Session,
incr_comp_session: Option<&IncrCompSession>,
crate_info: &CrateInfo,
) -> (CompiledModules, WorkProductMap) {
self.shared_emitter_main.check(sess, true);

let maybe_lto_modules = sess.time("join_worker_thread", || match self.coordinator.join() {
Expand Down Expand Up @@ -2204,8 +2214,11 @@ impl<B: WriteBackendMethods> OngoingCodegen<B> {
// out deterministic results.
compiled_modules.modules.sort_by(|a, b| a.name.cmp(&b.name));

let work_products =
copy_all_cgu_workproducts_to_incr_comp_cache_dir(sess, &compiled_modules);
let work_products = copy_all_cgu_workproducts_to_incr_comp_cache_dir(
sess,
incr_comp_session,
&compiled_modules,
);
produce_final_output_artifacts(sess, &compiled_modules, &self.output_filenames);

(compiled_modules, work_products)
Expand Down Expand Up @@ -2257,7 +2270,7 @@ pub(crate) fn submit_pre_lto_module_to_llvm<B: WriteBackendMethods>(
module: CachedModuleCodegen,
) {
let filename = pre_lto_bitcode_filename(&module.name);
let bitcode_path = in_incr_comp_dir_sess(tcx.sess, &filename);
let bitcode_path = in_incr_comp_dir_sess(tcx.incr_comp_session.unwrap(), &filename);
// Schedule the module to be loaded
drop(
coordinator
Expand Down
3 changes: 2 additions & 1 deletion compiler/rustc_codegen_ssa/src/traits/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use rustc_metadata::creader::MetadataLoaderDyn;
use rustc_middle::dep_graph::WorkProductMap;
use rustc_middle::ty::TyCtxt;
use rustc_middle::util::Providers;
use rustc_session::Session;
use rustc_session::config::{CrateType, OutputFilenames, PrintRequest};
use rustc_session::{IncrCompSession, Session};
use rustc_span::Symbol;

use super::CodegenObject;
Expand Down Expand Up @@ -127,6 +127,7 @@ pub trait CodegenBackend {
&self,
ongoing_codegen: Box<dyn Any>,
sess: &Session,
incr_comp_session: Option<&IncrCompSession>,
outputs: &OutputFilenames,
crate_info: &CrateInfo,
) -> (CompiledModules, WorkProductMap);
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_driver_impl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ rustc_data_structures = { path = "../rustc_data_structures" }
rustc_errors = { path = "../rustc_errors" }
rustc_expand = { path = "../rustc_expand" }
rustc_feature = { path = "../rustc_feature" }
rustc_hir = { path = "../rustc_hir" }
rustc_hir_analysis = { path = "../rustc_hir_analysis" }
rustc_hir_pretty = { path = "../rustc_hir_pretty" }
rustc_index = { path = "../rustc_index" }
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_driver_impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,8 @@ pub fn run_compiler(at_args: &[String], callbacks: &mut (dyn Callbacks + Send))

// Linking is done outside the `compiler.enter()` so that the
// `GlobalCtxt` within `Queries` can be freed as early as possible.
if let Some(linker) = linker {
linker.link(sess, codegen_backend);
if let (Some(linker), incr_comp_session) = linker {
linker.link(sess, incr_comp_session, codegen_backend);
}
})
}
Expand Down
10 changes: 7 additions & 3 deletions compiler/rustc_driver_impl/src/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ use std::io;

use rustc_ast as ast;
use rustc_ast_pretty::pprust as pprust_ast;
use rustc_hir::intravisit;
use rustc_hir_pretty as pprust_hir;
use rustc_hir_pretty::PpAnn;
use rustc_middle::bug;
use rustc_middle::mir::{write_mir_graphviz, write_mir_pretty};
use rustc_middle::ty::{self, TyCtxt};
Expand Down Expand Up @@ -71,7 +73,8 @@ struct HirIdentifiedAnn<'tcx> {

impl<'tcx> pprust_hir::PpAnn for HirIdentifiedAnn<'tcx> {
fn nested(&self, state: &mut pprust_hir::State<'_>, nested: pprust_hir::Nested) {
self.tcx.nested(state, nested)
let this = &self.tcx as &dyn intravisit::HirTyCtxt<'_>;
this.nested(state, nested)
}

fn pre(&self, s: &mut pprust_hir::State<'_>, node: pprust_hir::AnnNode<'_>) {
Expand Down Expand Up @@ -149,11 +152,12 @@ struct HirTypedAnn<'tcx> {

impl<'tcx> pprust_hir::PpAnn for HirTypedAnn<'tcx> {
fn nested(&self, state: &mut pprust_hir::State<'_>, nested: pprust_hir::Nested) {
let this = &self.tcx as &dyn intravisit::HirTyCtxt<'_>;
let old_maybe_typeck_results = self.maybe_typeck_results.get();
if let pprust_hir::Nested::Body(id) = nested {
self.maybe_typeck_results.set(Some(self.tcx.typeck_body(id)));
}
self.tcx.nested(state, nested);
this.nested(state, nested);
self.maybe_typeck_results.set(old_maybe_typeck_results);
}

Expand Down Expand Up @@ -281,7 +285,7 @@ pub fn print<'tcx>(sess: &Session, ppm: PpMode, ex: PrintExtra<'tcx>) {
)
};
match s {
PpHirMode::Normal => f(&tcx),
PpHirMode::Normal => f(&(&tcx as &dyn intravisit::HirTyCtxt<'_>) as &dyn PpAnn),
PpHirMode::Identified => {
let annotation = HirIdentifiedAnn { tcx };
f(&annotation)
Expand Down
Loading
Loading