From 1864bf6a510a7e9df23777591f3389b6feb27e90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jana=20D=C3=B6nszelmann?= Date: Sat, 18 Oct 2025 11:25:13 +0200 Subject: [PATCH] ICE when applying test to crate root --- tests/crashes/114920.rs | 2 -- tests/ui/macros/test-on-crate-root.rs | 8 ++++++++ 2 files changed, 8 insertions(+), 2 deletions(-) delete mode 100644 tests/crashes/114920.rs create mode 100644 tests/ui/macros/test-on-crate-root.rs diff --git a/tests/crashes/114920.rs b/tests/crashes/114920.rs deleted file mode 100644 index 9aa7598e10fc..000000000000 --- a/tests/crashes/114920.rs +++ /dev/null @@ -1,2 +0,0 @@ -//@ known-bug: #114920 -#![core::prelude::v1::test] diff --git a/tests/ui/macros/test-on-crate-root.rs b/tests/ui/macros/test-on-crate-root.rs new file mode 100644 index 000000000000..80635a458902 --- /dev/null +++ b/tests/ui/macros/test-on-crate-root.rs @@ -0,0 +1,8 @@ +// ICE when applying `#![test]` to the crate root, +// though only when specified with a full path. `#![test]` is not enough. +// Fixes #114920 +#![core::prelude::v1::test] + + + +fn main() {} // not important to reproduce the issue