-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Description
error: Could not compile `leap`.
warning: build failed, waiting for other jobs to finish...
error[E0308]: mismatched types
--> src/lib.rs:1:40
|
1 | pub fn is_leap_year(year: i32) -> bool {
| ________________________________________^
2 | | if year mod 4 == 0 {
3 | | true
4 | | } else {
5 | | false
6 | | }
7 | | }
| |_^ expected bool, found ()
|
= note: expected type `bool`
found type `()`
error: aborting due to 2 previous errors
error: Could not compile `leap`.
kennytm
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.