From fb7e604538bb45bf6119ca264c332c9aa634ef31 Mon Sep 17 00:00:00 2001 From: Caleb Cartwright Date: Sat, 28 Nov 2020 18:03:48 -0600 Subject: [PATCH] tests: backport an additional test case --- src/attr.rs | 2 +- tests/target/issue_4545.rs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 tests/target/issue_4545.rs diff --git a/src/attr.rs b/src/attr.rs index 9f77941e551..dab9cabccdc 100644 --- a/src/attr.rs +++ b/src/attr.rs @@ -2,7 +2,7 @@ use rustc_ast::ast; use rustc_ast::attr::HasAttrs; -use rustc_span::{symbol::sym, BytePos, Span, Symbol, DUMMY_SP}; +use rustc_span::{symbol::sym, Span, Symbol}; use self::doc_comment::DocCommentFormatter; use crate::comment::{contains_comment, rewrite_doc_comment, CommentStyle}; diff --git a/tests/target/issue_4545.rs b/tests/target/issue_4545.rs new file mode 100644 index 00000000000..f87c8103657 --- /dev/null +++ b/tests/target/issue_4545.rs @@ -0,0 +1,5 @@ +#[derive(Debug, Foo)] +enum Bar {} + +#[derive(Debug, , Default)] +struct Struct(i32);