<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Macros on rustbites</title><link>https://www.rustbites.com/tags/macros/</link><description>Recent content in Macros on rustbites</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sat, 30 May 2026 18:44:06 +0200</lastBuildDate><atom:link href="https://www.rustbites.com/tags/macros/index.xml" rel="self" type="application/rss+xml"/><item><title>171. assert_matches! — A Test Failure That Actually Tells You What Went Wrong</title><link>https://www.rustbites.com/posts/bite-171/</link><pubDate>Sat, 30 May 2026 09:00:00 +0100</pubDate><guid>https://www.rustbites.com/posts/bite-171/</guid><description>&lt;p&gt;&lt;code&gt;assert!(matches!(x, Foo::Bar))&lt;/code&gt; panics with &lt;code&gt;assertion failed: matches!(x, Foo::Bar)&lt;/code&gt; and zero hint about what &lt;code&gt;x&lt;/code&gt; actually was. Rust 1.96 stabilises &lt;code&gt;assert_matches!&lt;/code&gt;, which prints the offending value for you.&lt;/p&gt;</description></item></channel></rss>