return Some(p);
}
if let Some(e) = self.expr {
- if let ast::ExprKind::Lit(_) = e.kind {
+ if matches!(e.kind, ast::ExprKind::Lit(_) | ast::ExprKind::IncludedBytes(_)) {
return Some(P(ast::Pat {
id: ast::DUMMY_NODE_ID,
span: e.span,
/// A token-based derive macro.
Derive(
- /// An expander with signature TokenStream -> TokenStream (not yet).
+ /// An expander with signature TokenStream -> TokenStream.
/// The produced TokenSteam is appended to the input TokenSteam.
+ ///
+ /// FIXME: The text above describes how this should work. Currently it
+ /// is handled identically to `LegacyDerive`. It should be migrated to
+ /// a token-based representation like `Bang` and `Attr`, instead of
+ /// using `MultiItemModifier`.
Box<dyn MultiItemModifier + sync::Sync + sync::Send>,
),
let crate_matches = if c.starts_with("allsorts-rental") {
true
} else {
- let mut version = c.trim_start_matches("rental-").split(".");
+ let mut version = c.trim_start_matches("rental-").split('.');
version.next() == Some("0")
&& version.next() == Some("5")
&& version