-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsF-explicit_tail_calls`#![feature(explicit_tail_calls)]``#![feature(explicit_tail_calls)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-incomplete-featuresThis issue requires the use of incomplete features.This issue requires the use of incomplete features.
Description
Code
#![feature(explicit_tail_calls)]
#![allow(incomplete_features)]
fn foo<'a>(_: fn(&'a ())) {
become bar(dummy);
}
fn bar(_: fn(&())) {}
fn dummy(_: &()) {}
fn main() {}
Current output
error: mismatched signatures
--> src/main.rs:5:5
|
5 | become bar(dummy);
| ^^^^^^^^^^^^^^^^^
|
= note: `become` requires caller and callee to have matching signatures
= note: caller signature: `fn(fn(&()))`
= note: callee signature: `fn(for<'a> fn(&'a ()))`
Desired output
error: mismatched signatures
--> src/main.rs:5:5
|
5 | become bar(dummy);
| ^^^^^^^^^^^^^^^^^
|
= note: `become` requires caller and callee to have matching signatures
= note: caller signature: `fn(fn(&'a ()))`
= note: callee signature: `fn(for<'a> fn(&'a ()))`
Rust Version
1.91.0-nightly (2025-08-04 0060d5a2a8a86a31f629)
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsF-explicit_tail_calls`#![feature(explicit_tail_calls)]``#![feature(explicit_tail_calls)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-incomplete-featuresThis issue requires the use of incomplete features.This issue requires the use of incomplete features.