-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #236 from mobusoperandi/no_key_type_param
feat: remove key_type parameter
- Loading branch information
Showing
5 changed files
with
56 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,51 @@ | ||
error[E0308]: mismatched types | ||
--> tests/compile_fail/key_type_mismatch.rs:3:38 | ||
--> tests/compile_fail/key_type_mismatch.rs:4:23 | ||
| | ||
3 | #[memoized(key_type = (), key_expr = a)] | ||
| -- ^ expected `()`, found `bool` | ||
| | | ||
| expected due to this | ||
4 | #[memoized(key_expr = a, store_type = HashMap<usize, bool>)] | ||
| ----------------------^------------------------------------- | ||
| | | | ||
| | expected `usize`, found `bool` | ||
| arguments to this function are incorrect | ||
| | ||
= note: expected reference `&usize` | ||
found reference `&bool` | ||
note: function defined here | ||
--> tests/compile_fail/key_type_mismatch.rs:4:1 | ||
| | ||
4 | #[memoized(key_expr = a, store_type = HashMap<usize, bool>)] | ||
| -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
= note: this error originates in the attribute macro `memoized` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error[E0308]: mismatched types | ||
--> tests/compile_fail/key_type_mismatch.rs:4:23 | ||
| | ||
4 | #[memoized(key_expr = a, store_type = HashMap<usize, bool>)] | ||
| ----------------------^------------------------------------- | ||
| | | | ||
| | expected `usize`, found `bool` | ||
| arguments to this function are incorrect | ||
| | ||
= note: expected reference `&usize` | ||
found reference `&bool` | ||
note: associated function defined here | ||
--> src/lib.rs | ||
| | ||
| fn get(&self, input: &I) -> Option<R>; | ||
| ^^^ | ||
= note: this error originates in the attribute macro `memoized` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error[E0308]: mismatched types | ||
--> tests/compile_fail/key_type_mismatch.rs:4:23 | ||
| | ||
4 | #[memoized(key_expr = a, store_type = HashMap<usize, bool>)] | ||
| ----------------------^------------------------------------- | ||
| | | | ||
| | expected `usize`, found `bool` | ||
| arguments to this function are incorrect | ||
| | ||
note: associated function defined here | ||
--> src/lib.rs | ||
| | ||
| fn insert(&mut self, input: I, return_value: R) -> R; | ||
| ^^^^^^ | ||
= note: this error originates in the attribute macro `memoized` (in Nightly builds, run with -Z macro-backtrace for more info) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters