diff options
| author | bors <bors@rust-lang.org> | 2023-02-01 10:23:33 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-02-01 10:23:33 +0000 |
| commit | bfe82cda48dbccc4c4eb52b515e83ec4bb12464b (patch) | |
| tree | d72f91d76b223ffd5d0f82c7705295f5300d6a06 /crates/test-utils | |
| parent | a4d3a4a75bffccd569882bed402327d048097321 (diff) | |
| parent | 4ff6f3845fb68ab5e90cbc37ecb125a0436cb93f (diff) | |
| download | rust-bfe82cda48dbccc4c4eb52b515e83ec4bb12464b.tar.gz rust-bfe82cda48dbccc4c4eb52b515e83ec4bb12464b.zip | |
Auto merge of #14036 - Veykril:write-method-resolution, r=Veykril
Record method resolution for remaining operator expressions This allows goto def and future substituted hover to work for the concrete impls.
Diffstat (limited to 'crates/test-utils')
| -rw-r--r-- | crates/test-utils/src/minicore.rs | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/crates/test-utils/src/minicore.rs b/crates/test-utils/src/minicore.rs index 5634bafd062..3b033e1aae5 100644 --- a/crates/test-utils/src/minicore.rs +++ b/crates/test-utils/src/minicore.rs @@ -106,6 +106,11 @@ pub mod marker { impl<T: ?Sized> Copy for &T {} } // endregion:copy + + // region:fn + #[lang = "tuple_trait"] + pub trait Tuple {} + // endregion:fn } // region:default @@ -347,19 +352,26 @@ pub mod ops { // region:fn mod function { + use crate::marker::Tuple; + #[lang = "fn"] #[fundamental] - pub trait Fn<Args>: FnMut<Args> {} + pub trait Fn<Args: Tuple>: FnMut<Args> { + extern "rust-call" fn call(&self, args: Args) -> Self::Output; + } #[lang = "fn_mut"] #[fundamental] - pub trait FnMut<Args>: FnOnce<Args> {} + pub trait FnMut<Args: Tuple>: FnOnce<Args> { + extern "rust-call" fn call_mut(&mut self, args: Args) -> Self::Output; + } #[lang = "fn_once"] #[fundamental] - pub trait FnOnce<Args> { + pub trait FnOnce<Args: Tuple> { #[lang = "fn_once_output"] type Output; + extern "rust-call" fn call_once(self, args: Args) -> Self::Output; } } pub use self::function::{Fn, FnMut, FnOnce}; |
