36 lines
1.1 KiB
Text
36 lines
1.1 KiB
Text
error[E0308]: mismatched types
|
|
--> $DIR/assert-macro-without-else.rs:4:5
|
|
|
|
|
LL | fn f() -> bool {
|
|
| ---- expected `bool` because of this return type
|
|
LL | assert!(1 < 2)
|
|
| ^^^^^^^^^^^^^^ expected `bool`, found `()`
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/assert-macro-without-else.rs:9:5
|
|
|
|
|
LL | assert_eq!(1, 1)
|
|
| ^^^^^^^^^^^^^^^^ expected `i32`, found `()`
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/assert-macro-without-else.rs:14:5
|
|
|
|
|
LL | assert_ne!(1, 2)
|
|
| ^^^^^^^^^^^^^^^^ expected `bool`, found `()`
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/assert-macro-without-else.rs:26:9
|
|
|
|
|
LL | assert!(1 < 2)
|
|
| ^^^^^^^^^^^^^^ expected `bool`, found `()`
|
|
...
|
|
LL | fn nested() -> bool {
|
|
| ---- expected `bool` because of this return type
|
|
LL | g!()
|
|
| ---- in this macro invocation
|
|
|
|
|
= 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)
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|