]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_expand/src/base.rs
Rollup merge of #104657 - hi-rustin:rustin-patch-check-transmute, r=compiler-errors
[rust.git] / compiler / rustc_expand / src / base.rs
index 95fff929d46fec32ff55fdb5666afe3884b9f6d7..bdcd53349492ccb98945ee4a41a8fe5c39e8adda 100644 (file)
@@ -507,7 +507,7 @@ fn make_pat(self: Box<Self>) -> Option<P<ast::Pat>> {
             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,
@@ -1436,7 +1436,7 @@ fn pretty_printing_compatibility_hack(item: &Item, sess: &ParseSess) -> bool {
                             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