]> git.lizzy.rs Git - rust.git/commitdiff
fix: inner attribute followed by outer attribute causing ICE
authorEliseZeroTwo <mail@elise.moe>
Mon, 25 Oct 2021 15:31:27 +0000 (17:31 +0200)
committerEliseZeroTwo <mail@elise.moe>
Mon, 25 Oct 2021 15:31:27 +0000 (17:31 +0200)
compiler/rustc_ast/src/tokenstream.rs

index 5d994dbad4d1fcf128851668679a54ced7f92e41..51cabb50cd3de7280a1ddfd8cff2caaeabb1e3c6 100644 (file)
@@ -221,12 +221,6 @@ pub fn to_tokenstream(&self) -> TokenStream {
                     for attr in &data.attrs {
                         match attr.style {
                             crate::AttrStyle::Outer => {
-                                assert!(
-                                    inner_attrs.len() == 0,
-                                    "Found outer attribute {:?} after inner attrs {:?}",
-                                    attr,
-                                    inner_attrs
-                                );
                                 outer_attrs.push(attr);
                             }
                             crate::AttrStyle::Inner => {