Skip to content

Commit 440b1f1

Browse files
Recognize #[std::prelude::vX::test] (not just #[core::prelude::vX::test]
1 parent f87c527 commit 440b1f1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crates/hir-def/src/attrs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ fn match_attr_flags(attr_flags: &mut AttrFlags, attr: ast::Meta) -> ControlFlow<
200200
let segment4 = segment4.and_then(|it| it.segment()?.name_ref());
201201
segment1.text() == "test"
202202
&& segment3.is_none_or(|it| it.text() == "prelude")
203-
&& segment4.is_none_or(|it| it.text() == "core")
203+
&& segment4.is_none_or(|it| matches!(&*it.text(), "core" | "std"))
204204
});
205205
if is_test {
206206
attr_flags.insert(AttrFlags::IS_TEST);

0 commit comments

Comments
 (0)