Merge pull request #19127 from ChayimFriedman2/different-generic-args

feat: Refactor path lowering and serve a new path diagnostic
This commit is contained in:
Lukas Wirth 2025-02-17 08:30:10 +00:00 committed by GitHub
commit 09db657439
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 1222 additions and 1144 deletions

View file

@ -647,18 +647,21 @@ pub mod ops {
#[lang = "fn"]
#[fundamental]
#[rustc_paren_sugar]
pub trait Fn<Args: Tuple>: FnMut<Args> {
extern "rust-call" fn call(&self, args: Args) -> Self::Output;
}
#[lang = "fn_mut"]
#[fundamental]
#[rustc_paren_sugar]
pub trait FnMut<Args: Tuple>: FnOnce<Args> {
extern "rust-call" fn call_mut(&mut self, args: Args) -> Self::Output;
}
#[lang = "fn_once"]
#[fundamental]
#[rustc_paren_sugar]
pub trait FnOnce<Args: Tuple> {
#[lang = "fn_once_output"]
type Output;
@ -736,12 +739,14 @@ pub mod ops {
#[lang = "async_fn"]
#[fundamental]
#[rustc_paren_sugar]
pub trait AsyncFn<Args: Tuple>: AsyncFnMut<Args> {
extern "rust-call" fn async_call(&self, args: Args) -> Self::CallRefFuture<'_>;
}
#[lang = "async_fn_mut"]
#[fundamental]
#[rustc_paren_sugar]
pub trait AsyncFnMut<Args: Tuple>: AsyncFnOnce<Args> {
#[lang = "call_ref_future"]
type CallRefFuture<'a>: Future<Output = Self::Output>
@ -752,6 +757,7 @@ pub mod ops {
#[lang = "async_fn_once"]
#[fundamental]
#[rustc_paren_sugar]
pub trait AsyncFnOnce<Args: Tuple> {
#[lang = "async_fn_once_output"]
type Output;