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
Compare assert and assert_ng when there is a type error, and you’ll see assert_ng isn’t faring well.
assert_ng:
a.rs:12:5: 12:25 error: mismatched types: expected `int`, found `&int` (expected int, found &-ptr)
a.rs:12 assert_ng!(a == &a);
^~~~~~~~~~~~~~~~~~~~
a.rs:1:1: 14:1 note: in expansion of assert_ng!
a.rs:12:5: 12:25 note: expansion site
assert:
a.rs:13:18: 13:20 error: mismatched types: expected `int`, found `&int` (expected int, found &-ptr)
a.rs:13 assert!(a == &a);
^~
<std macros>:1:1: 12:2 note: in expansion of assert!
a.rs:13:5: 13:22 note: expansion site
Using quote_expr just isn’t going to cut it for getting it perfect; it’s going to need a manually constructed AST with spans carefully arranged in some way to get the correspondence correct.
The text was updated successfully, but these errors were encountered:
Compare
assert
andassert_ng
when there is a type error, and you’ll seeassert_ng
isn’t faring well.assert_ng
:assert
:Using
quote_expr
just isn’t going to cut it for getting it perfect; it’s going to need a manually constructed AST with spans carefully arranged in some way to get the correspondence correct.The text was updated successfully, but these errors were encountered: