diff options
| author | jackh726 <git@jackhuey.me> | 2025-08-01 14:29:21 +0000 |
|---|---|---|
| committer | jackh726 <git@jackhuey.me> | 2025-08-09 16:08:58 +0000 |
| commit | eb2bbbb9134ae3fc4d043ea12b3546b73cd90efd (patch) | |
| tree | ecfb46ef30ec9fd6fd94ecf8121ccd1e0a4bf8dc /src/tools/rust-analyzer/crates/test-utils | |
| parent | 840d8130a13a1123886922fa1d581be3e5717a01 (diff) | |
| download | rust-eb2bbbb9134ae3fc4d043ea12b3546b73cd90efd.tar.gz rust-eb2bbbb9134ae3fc4d043ea12b3546b73cd90efd.zip | |
Implement next trait solver
Diffstat (limited to 'src/tools/rust-analyzer/crates/test-utils')
| -rw-r--r-- | src/tools/rust-analyzer/crates/test-utils/src/minicore.rs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/tools/rust-analyzer/crates/test-utils/src/minicore.rs b/src/tools/rust-analyzer/crates/test-utils/src/minicore.rs index 7b719b5dec7..b735b323ce4 100644 --- a/src/tools/rust-analyzer/crates/test-utils/src/minicore.rs +++ b/src/tools/rust-analyzer/crates/test-utils/src/minicore.rs @@ -35,7 +35,7 @@ //! error: fmt //! fmt: option, result, transmute, coerce_unsized, copy, clone, derive //! fmt_before_1_89_0: fmt -//! fn: tuple +//! fn: sized, tuple //! from: sized, result //! future: pin //! coroutine: pin @@ -325,6 +325,18 @@ pub mod clone { *self } } + + impl<T: Clone> Clone for [T; 0] { + fn clone(&self) -> Self { + [] + } + } + + impl<T: Clone> Clone for [T; 1] { + fn clone(&self) -> Self { + [self[0].clone()] + } + } // endregion:builtin_impls // region:derive @@ -1035,6 +1047,7 @@ pub mod ops { #[lang = "coroutine"] pub trait Coroutine<R = ()> { + #[lang = "coroutine_yield"] type Yield; #[lang = "coroutine_return"] type Return; |
