From 09d4a823d5242cf37ecb03c4aa3acf70f563b118 Mon Sep 17 00:00:00 2001 From: bohan Date: Tue, 20 Jun 2023 22:54:12 +0800 Subject: [PATCH] test(resolve): update_resolution for remove single import --- .../ui/resolve/auxiliary/issue-112831-aux.rs | 13 ++++++++++++ tests/ui/resolve/issue-112831.rs | 20 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 tests/ui/resolve/auxiliary/issue-112831-aux.rs create mode 100644 tests/ui/resolve/issue-112831.rs diff --git a/tests/ui/resolve/auxiliary/issue-112831-aux.rs b/tests/ui/resolve/auxiliary/issue-112831-aux.rs new file mode 100644 index 00000000000..df436fb9929 --- /dev/null +++ b/tests/ui/resolve/auxiliary/issue-112831-aux.rs @@ -0,0 +1,13 @@ +// force-host +// no-prefer-dynamic + +#![crate_type = "proc-macro"] + +extern crate proc_macro; + +struct Zeroable; + +#[proc_macro_derive(Zeroable)] +pub fn derive_zeroable(_: proc_macro::TokenStream) -> proc_macro::TokenStream { + proc_macro::TokenStream::default() +} diff --git a/tests/ui/resolve/issue-112831.rs b/tests/ui/resolve/issue-112831.rs new file mode 100644 index 00000000000..ffd83ea8bc1 --- /dev/null +++ b/tests/ui/resolve/issue-112831.rs @@ -0,0 +1,20 @@ +// check-pass +// aux-build:issue-112831-aux.rs + +mod zeroable { + pub trait Zeroable {} +} + +use zeroable::*; + +mod pod { + use super::*; + pub trait Pod: Zeroable {} +} + +use pod::*; + +extern crate issue_112831_aux; +use issue_112831_aux::Zeroable; + +fn main() {}