You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| ---- expected `bool` because of this return type
6
+
LL | assert!(1 < 2)
7
+
| ^^^^^^^^^^^^^^ expected `bool`, found `()`
8
+
9
+
error[E0308]: mismatched types
10
+
--> $DIR/assert-macro-without-else.rs:9:5
11
+
|
12
+
LL | assert_eq!(1, 1)
13
+
| ^^^^^^^^^^^^^^^^ expected `i32`, found `()`
14
+
|
15
+
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
16
+
17
+
error[E0308]: mismatched types
18
+
--> $DIR/assert-macro-without-else.rs:14:5
19
+
|
20
+
LL | assert_ne!(1, 2)
21
+
| ^^^^^^^^^^^^^^^^ expected `bool`, found `()`
22
+
|
23
+
= note: this error originates in the macro `assert_ne` (in Nightly builds, run with -Z macro-backtrace for more info)
24
+
25
+
error[E0308]: mismatched types
26
+
--> $DIR/assert-macro-without-else.rs:26:9
27
+
|
28
+
LL | assert!(1 < 2)
29
+
| ^^^^^^^^^^^^^^ expected `bool`, found `()`
30
+
...
31
+
LL | fn nested() -> bool {
32
+
| ---- expected `bool` because of this return type
33
+
LL | g!()
34
+
| ---- in this macro invocation
35
+
|
36
+
= note: this error originates in the macro `assert` which comes from the expansion of the macro `g` (in Nightly builds, run with -Z macro-backtrace for more info)
37
+
38
+
error: aborting due to 4 previous errors
39
+
40
+
For more information about this error, try `rustc --explain E0308`.
0 commit comments