Skip to content

Commit 7f8cd05

Browse files
committed
fix(upstream): FnDef gains binder
1 parent c4b2ccb commit 7f8cd05

8 files changed

Lines changed: 18 additions & 15 deletions

File tree

‎.zed/settings.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"preferred_line_length": 100,
23
"lsp": {
34
"rust-analyzer": {
45
"initialization_options": {

‎flake.lock‎

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎rust-toolchain.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
# SPDX-License-Identifier: MIT OR Apache-2.0
44

55
[toolchain]
6-
channel = "nightly-2026-06-29"
6+
channel = "nightly-2026-07-14"
77
components = ["llvm-tools-preview", "rustc-dev", "rust-src"]

‎src/binary_analysis/reconstruct.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ pub fn recover_fn_call_span<'tcx>(
117117
tcx,
118118
ty::TypingEnv::fully_monomorphized(),
119119
def_id,
120-
args,
120+
args.no_bound_vars().unwrap(),
121121
terminator.source_info.span,
122122
);
123123
if tcx.symbol_name(instance).name != callee {

‎src/monomorphize_collector.rs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ impl<'a, 'tcx> MirVisitor<'tcx> for MirUsedCollector<'a, 'tcx> {
688688
self.tcx,
689689
ty::TypingEnv::fully_monomorphized(),
690690
def_id,
691-
args,
691+
args.no_bound_vars().unwrap(),
692692
source,
693693
)
694694
&& instance.def.requires_caller_location(self.tcx)
@@ -791,6 +791,7 @@ fn visit_fn_use<'tcx>(
791791
output: &mut MonoItems<'tcx>,
792792
) {
793793
if let ty::FnDef(def_id, args) = *ty.kind() {
794+
let args = args.no_bound_vars().unwrap();
794795
let instance = if is_direct_call {
795796
ty::Instance::expect_resolve(
796797
tcx,
@@ -1167,6 +1168,7 @@ fn visit_mentioned_item<'tcx>(
11671168
match *item {
11681169
MentionedItem::Fn(ty) => {
11691170
if let ty::FnDef(def_id, args) = *ty.kind() {
1171+
let args = args.no_bound_vars().unwrap();
11701172
let instance = Instance::expect_resolve(
11711173
tcx,
11721174
ty::TypingEnv::fully_monomorphized(),

‎src/preempt_count/check.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ impl<'mir, 'tcx, 'cx> MirNeighborVisitor<'mir, 'tcx, 'cx> {
163163
let fn_ty = self.monomorphize(fn_ty);
164164
if let ty::FnDef(def_id, args) = *fn_ty.kind() {
165165
let instance =
166-
ty::Instance::try_resolve(self.cx.tcx, self.typing_env, def_id, args)
166+
ty::Instance::try_resolve(self.cx.tcx, self.typing_env, def_id, args.no_bound_vars().unwrap())
167167
.unwrap()
168168
.ok_or(Error::TooGeneric)?;
169169
self.check_fn_pointer_cast(instance, span)?;
@@ -252,7 +252,7 @@ impl<'mir, 'tcx, 'cx> MirNeighborVisitor<'mir, 'tcx, 'cx> {
252252

253253
if let ty::FnDef(def_id, args) = *callee_ty.kind() {
254254
let instance =
255-
ty::Instance::try_resolve(self.cx.tcx, self.typing_env, def_id, args)
255+
ty::Instance::try_resolve(self.cx.tcx, self.typing_env, def_id, args.no_bound_vars().unwrap())
256256
.unwrap()
257257
.ok_or(Error::TooGeneric)?;
258258
self.cx.call_stack.borrow_mut().push(UseSite {
@@ -290,7 +290,7 @@ impl<'mir, 'tcx, 'cx> MirNeighborVisitor<'mir, 'tcx, 'cx> {
290290
self.cx.tcx,
291291
self.typing_env,
292292
def_id,
293-
args,
293+
args.no_bound_vars().unwrap(),
294294
)
295295
.unwrap()
296296
.ok_or(Error::TooGeneric)?;

‎src/preempt_count/dataflow.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ impl<'tcx> Analysis<'tcx> for AdjustmentComputation<'_, 'tcx, '_> {
149149
self.checker.tcx,
150150
self.typing_env,
151151
def_id,
152-
args,
152+
args.no_bound_vars().unwrap(),
153153
)
154154
.unwrap()
155155
{

‎src/preempt_count/expectation.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ impl<'tcx> AnalysisCtxt<'tcx> {
4444
v
4545
} else {
4646
let callee_instance =
47-
ty::Instance::try_resolve(self.tcx, typing_env, def_id, args)
47+
ty::Instance::try_resolve(self.tcx, typing_env, def_id, args.no_bound_vars().unwrap())
4848
.unwrap()
4949
.ok_or(Error::TooGeneric)?;
5050
self.call_stack.borrow_mut().push(UseSite {
@@ -155,7 +155,7 @@ impl<'tcx> AnalysisCtxt<'tcx> {
155155
return Ok(());
156156
} else {
157157
let callee_instance =
158-
ty::Instance::try_resolve(self.tcx, typing_env, def_id, args)
158+
ty::Instance::try_resolve(self.tcx, typing_env, def_id, args.no_bound_vars().unwrap())
159159
.unwrap()
160160
.ok_or(Error::TooGeneric)?;
161161

0 commit comments

Comments
 (0)