mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-30 03:27:44 +00:00
Merge pull request #19127 from ChayimFriedman2/different-generic-args
feat: Refactor path lowering and serve a new path diagnostic
This commit is contained in:
commit
09db657439
19 changed files with 1222 additions and 1144 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue