Closed
Description
auto-reduced (treereduce-rust):
mod framing {
mod public_message_in {
mod public_message {
pub struct ConfirmedTranscriptHashInput;
}
mod public_message_in {
#[derive(Debug)]
pub struct ConfirmedTranscriptHashInput;
}
pub use self::public_message::*;
pub use self::public_message_in::*;
}
pub use self::public_message_in::*;
}
use crate::framing::ConfirmedTranscriptHashInput::public_message_in;
fn main() {}
original code
original:
// https://github.com/rust-lang/rust/pull/113099
//~^ WARNING `ConfirmedTranscriptHashInput` is ambiguous
mod framing {
mod public_message_in {
mod public_message {
use super::*;
#[derive(Debug)]
pub struct ConfirmedTranscriptHashInput;
}
mod public_message_in {
use super::*;
#[derive(Debug)]
pub struct ConfirmedTranscriptHashInput;
}
pub use self::public_message::*;
pub use self::public_message_in::*;
}
mod framing {
mod public_message {
use super::*;
#[derive(Debug)]
pub struct ConfirmedTranscriptHashInput;
}
mod public_message_in {
use super::*;
#[derive(Debug)]
pub struct ConfirmedTranscriptHashInput;
}
pub use self::public_message::*;
pub use self::public_message_in::*;
}
pub use self::public_message_in::*;
pub use super::*;
}
use crate::framing::ConfirmedTranscriptHashInput::public_message_in;
//~^ WARNING `ConfirmedTranscriptHashInput` is ambiguous
// https://github.com/rust-lang/rust/pull/113099
fn main() { }
Version information
rustc 1.78.0-nightly (d377991ba 2024-02-28)
binary: rustc
commit-hash: d377991bad40c0d5c79bfa58465295751e8542fe
commit-date: 2024-02-28
host: x86_64-unknown-linux-gnu
release: 1.78.0-nightly
LLVM version: 18.1.0
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc
Program output
warning: `ConfirmedTranscriptHashInput` is ambiguous
--> /tmp/icemaker_global_tempdir.A9iMdoxm4bt7/rustc_testrunner_tmpdir_reporting.IXnzClC1fpP8/mvce.rs:21:21
|
21 | use crate::framing::ConfirmedTranscriptHashInput::public_message_in;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ambiguous name
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #114095 <https://github.com/rust-lang/rust/issues/114095>
= note: ambiguous because of multiple glob imports of a name in the same module
note: `ConfirmedTranscriptHashInput` could refer to the struct imported here
--> /tmp/icemaker_global_tempdir.A9iMdoxm4bt7/rustc_testrunner_tmpdir_reporting.IXnzClC1fpP8/mvce.rs:14:17
|
14 | pub use self::public_message::*;
| ^^^^^^^^^^^^^^^^^^^^^^^
= help: consider adding an explicit import of `ConfirmedTranscriptHashInput` to disambiguate
note: `ConfirmedTranscriptHashInput` could also refer to the struct imported here
--> /tmp/icemaker_global_tempdir.A9iMdoxm4bt7/rustc_testrunner_tmpdir_reporting.IXnzClC1fpP8/mvce.rs:15:17
|
15 | pub use self::public_message_in::*;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: consider adding an explicit import of `ConfirmedTranscriptHashInput` to disambiguate
= note: `#[warn(ambiguous_glob_imports)]` on by default
warning: unused import: `self::public_message_in::*`
--> /tmp/icemaker_global_tempdir.A9iMdoxm4bt7/rustc_testrunner_tmpdir_reporting.IXnzClC1fpP8/mvce.rs:15:17
|
15 | pub use self::public_message_in::*;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: struct `ConfirmedTranscriptHashInput` is never constructed
--> /tmp/icemaker_global_tempdir.A9iMdoxm4bt7/rustc_testrunner_tmpdir_reporting.IXnzClC1fpP8/mvce.rs:5:24
|
5 | pub struct ConfirmedTranscriptHashInput;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: struct `ConfirmedTranscriptHashInput` is never constructed
--> /tmp/icemaker_global_tempdir.A9iMdoxm4bt7/rustc_testrunner_tmpdir_reporting.IXnzClC1fpP8/mvce.rs:11:24
|
11 | pub struct ConfirmedTranscriptHashInput;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `ConfirmedTranscriptHashInput` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
warning: 4 warnings emitted
note: no errors encountered even though delayed bugs were created
note: those delayed bugs will now be shown as internal compiler errors
error: internal compiler error: no resolution for an import
--> /tmp/icemaker_global_tempdir.A9iMdoxm4bt7/rustc_testrunner_tmpdir_reporting.IXnzClC1fpP8/mvce.rs:21:5
|
21 | use crate::framing::ConfirmedTranscriptHashInput::public_message_in;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: delayed at compiler/rustc_ast_lowering/src/lib.rs:743:24
0: <rustc_errors::DiagCtxtInner>::emit_diagnostic
1: <rustc_errors::DiagCtxt>::emit_diagnostic
2: <rustc_span::ErrorGuaranteed as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
3: <rustc_ast_lowering::LoweringContext>::lower_import_res
4: <rustc_ast_lowering::LoweringContext>::lower_use_tree
5: <rustc_ast_lowering::LoweringContext>::lower_item_kind
6: <rustc_ast_lowering::item::ItemLowerer>::lower_node
7: rustc_ast_lowering::lower_to_hir
8: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::hir_crate::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
9: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
10: rustc_query_impl::query_impl::hir_crate::get_query_non_incr::__rust_end_short_backtrace
11: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::hir_attrs::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 8]>>
12: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::VecCache<rustc_hir::hir_id::OwnerId, rustc_middle::query::erase::Erased<[u8; 8]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
13: rustc_query_impl::query_impl::hir_attrs::get_query_non_incr::__rust_end_short_backtrace
14: <rustc_middle::hir::map::Map>::attrs
15: rustc_passes::entry::entry_fn
16: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::entry_fn::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 12]>>
17: <rustc_query_impl::query_impl::entry_fn::dynamic_query::{closure#2} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, ())>>::call_once
18: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 12]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
19: rustc_query_impl::query_impl::entry_fn::get_query_non_incr::__rust_end_short_backtrace
20: rustc_interface::passes::analysis
21: rustc_query_impl::plumbing::__rust_begin_short_backtrace::<rustc_query_impl::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle::query::erase::Erased<[u8; 1]>>
22: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::DynamicConfig<rustc_query_system::query::caches::SingleCache<rustc_middle::query::erase::Erased<[u8; 1]>>, false, false, false>, rustc_query_impl::plumbing::QueryCtxt, false>
23: rustc_query_impl::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
24: rustc_interface::interface::run_compiler::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}
25: std::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
26: <<std::thread::Builder>::spawn_unchecked_<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
27: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
at /rustc/d377991bad40c0d5c79bfa58465295751e8542fe/library/alloc/src/boxed.rs:2016:9
28: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
at /rustc/d377991bad40c0d5c79bfa58465295751e8542fe/library/alloc/src/boxed.rs:2016:9
29: std::sys::pal::unix::thread::Thread::new::thread_start
at /rustc/d377991bad40c0d5c79bfa58465295751e8542fe/library/std/src/sys/pal/unix/thread.rs:108:17
30: <unknown>
31: <unknown>
--> /tmp/icemaker_global_tempdir.A9iMdoxm4bt7/rustc_testrunner_tmpdir_reporting.IXnzClC1fpP8/mvce.rs:21:5
|
21 | use crate::framing::ConfirmedTranscriptHashInput::public_message_in;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.78.0-nightly (d377991ba 2024-02-28) running on x86_64-unknown-linux-gnu
query stack during panic:
end of query stack
Metadata
Metadata
Assignees
Labels
Area: Name/path resolution done by `rustc_resolve` specificallyCategory: This is a bug.Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Status: A Minimal Complete and Verifiable Example has been found for this issueRelevant to the compiler team, which will review and decide on the PR/issue.