-
Notifications
You must be signed in to change notification settings - Fork 217
Open
Labels
Description
auto-reduced (treereduce-rust):
//@compile-flags: -frust-incomplete-and-experimental-compiler-do-not-use
mod openssl {
pub use ::*;
}original:
#![feature(no_core)]
#![no_core]
//@ check-pass
// https://github.com/rust-lang/rust/pull/112743#issuecomment-1601986883
#![warn(ambiguous_glob_imports)]
macro_rules! m {
() => {
pub fn id() {}
};
}
mod openssl {
pub use ::*;
//~^ WARNING ambiguous glob re-exports
pub use self::main::*;
mod evp {
main!();
}
mod handwritten {
m!();
}
}
pub use self::evp::*;
fn main() {
{
pub use self::evp::*;
//~^ WARNING ambiguous glob re-exports
pub use self::handwritten::*;
mod evp {
m!();
}
mod handwritten {
m!();
}
};
//~^ WARNING `id` is ambiguous
// https://github.com/rust-lang/rust/pull/112743#issuecomment-1601986883
}Version information:
Possibly related line of code:
gccrs/gcc/rust/resolve/rust-forever-stack.hxx
Lines 710 to 722 in 1a91028
| ForeverStack<N>::resolve_path ( | |
| const std::vector<S> &segments, ResolutionMode mode, | |
| std::function<void (const S &, NodeId)> insert_segment_resolution, | |
| std::vector<Error> &collect_errors, | |
| std::reference_wrapper<Node> starting_point) | |
| { | |
| rust_assert (!segments.empty ()); | |
| switch (mode) | |
| { | |
| case ResolutionMode::Normal: | |
| break; // default | |
| case ResolutionMode::FromRoot: |
Command:
/home/matthias/vcs/github/gccrs/gccrs-build/gcc/crab1 -frust-incomplete-and-experimental-compiler-do-not-use
Program output
crab1: error: failed to locate crate ‘core’
crab1: error: failed to locate crate ‘std’
crab1: error: unknown crate ‘core’
crab1: error: unknown crate ‘std’
crab1: internal compiler error: in resolve_path, at rust/resolve/rust-forever-stack.hxx:716
0x3097ef9 internal_error(char const*, ...)
../../gcc/diagnostic-global-context.cc:787
0xc3aa61 fancy_abort(char const*, int, char const*)
../../gcc/diagnostics/context.cc:1813
0xfaf4e3 tl::optional<Rust::Resolver2_0::Rib::Definition> Rust::Resolver2_0::ForeverStack<(Rust::Resolver2_0::Namespace)1>::resolve_path<Rust::AST::SimplePathSegment>(std::vector<Rust::AST::SimplePathSegment, std::allocator<Rust::AST::SimplePathSegment> > const&, Rust::Resolver2_0::ResolutionMode, std::function<void (Rust::AST::SimplePathSegment const&, unsigned int)>, std::vector<Rust::Error, std::allocator<Rust::Error> >&, std::reference_wrapper<Rust::Resolver2_0::ForeverStack<(Rust::Resolver2_0::Namespace)1>::Node>)
../../gcc/rust/resolve/rust-forever-stack.hxx:716
0xfb1e84 tl::optional<Rust::Resolver2_0::Rib::Definition> Rust::Resolver2_0::ForeverStack<(Rust::Resolver2_0::Namespace)1>::resolve_path<Rust::AST::SimplePathSegment>(std::vector<Rust::AST::SimplePathSegment, std::allocator<Rust::AST::SimplePathSegment> > const&, Rust::Resolver2_0::ResolutionMode, std::function<void (Rust::AST::SimplePathSegment const&, unsigned int)>, std::vector<Rust::Error, std::allocator<Rust::Error> >&)
../../gcc/rust/resolve/rust-forever-stack.hxx:704
0xfb1e84 tl::optional<Rust::Resolver2_0::Rib::Definition> Rust::Resolver2_0::NameResolutionContext::resolve_path<Rust::AST::SimplePathSegment>(std::vector<Rust::AST::SimplePathSegment, std::allocator<Rust::AST::SimplePathSegment> > const&, Rust::Resolver2_0::ResolutionMode, std::vector<Rust::Error, std::allocator<Rust::Error> >&, Rust::Resolver2_0::Namespace)
../../gcc/rust/resolve/rust-name-resolution-context.h:575
0xfa76f5 tl::optional<Rust::Resolver2_0::Rib::Definition> Rust::Resolver2_0::NameResolutionContext::resolve_path<Rust::AST::SimplePathSegment>(std::vector<Rust::AST::SimplePathSegment, std::allocator<Rust::AST::SimplePathSegment> > const&, Rust::Resolver2_0::ResolutionMode, tl::optional<std::vector<Rust::Error, std::allocator<Rust::Error> >&>, Rust::Resolver2_0::Namespace)
../../gcc/rust/resolve/rust-name-resolution-context.h:633
0xfa76f5 tl::optional<Rust::Resolver2_0::Rib::Definition> Rust::Resolver2_0::NameResolutionContext::resolve_path<Rust::AST::SimplePathSegment>(std::vector<Rust::AST::SimplePathSegment, std::allocator<Rust::AST::SimplePathSegment> > const&, bool, tl::optional<std::vector<Rust::Error, std::allocator<Rust::Error> >&>, Rust::Resolver2_0::Namespace)
../../gcc/rust/resolve/rust-name-resolution-context.h:671
0xfa76f5 tl::optional<Rust::Resolver2_0::Rib::Definition> Rust::Resolver2_0::NameResolutionContext::resolve_path<Rust::AST::SimplePathSegment>(std::vector<Rust::AST::SimplePathSegment, std::allocator<Rust::AST::SimplePathSegment> > const&, bool, Rust::Resolver2_0::Namespace)
../../gcc/rust/resolve/rust-name-resolution-context.h:681
0xfa76f5 tl::optional<Rust::Resolver2_0::Rib::Definition> Rust::Resolver2_0::NameResolutionContext::resolve_path<Rust::Resolver2_0::Namespace>(Rust::AST::SimplePath const&, Rust::Resolver2_0::Namespace&&)
../../gcc/rust/resolve/rust-name-resolution-context.h:699
0xfa76f5 Rust::Resolver2_0::Early::resolve_glob_import(unsigned int, Rust::Resolver2_0::TopLevel::ImportKind&&)
../../gcc/rust/resolve/rust-early-name-resolver-2.0.cc:78
0xfa99fb Rust::Resolver2_0::Early::build_import_mapping(std::pair<unsigned int, std::vector<Rust::Resolver2_0::TopLevel::ImportKind, std::allocator<Rust::Resolver2_0::TopLevel::ImportKind> > >&&)
../../gcc/rust/resolve/rust-early-name-resolver-2.0.cc:167
0xfa9ec5 Rust::Resolver2_0::Early::visit(Rust::AST::UseDeclaration&)
../../gcc/rust/resolve/rust-early-name-resolver-2.0.cc:499
0xe300bf void Rust::AST::DefaultASTVisitor::visit<Rust::AST::Item>(std::unique_ptr<Rust::AST::Item, std::default_delete<Rust::AST::Item> >&)
../../gcc/rust/ast/rust-ast-visitor.h:423
0xe300bf Rust::AST::DefaultASTVisitor::visit(Rust::AST::Module&)
../../gcc/rust/ast/rust-ast-visitor.cc:849
0xf93189 operator()
../../gcc/rust/resolve/rust-default-resolver.cc:61
0xf93189 scope_inner<Rust::Resolver2_0::CanonicalPathCtx::scope<Rust::Resolver2_0::DefaultResolver::visit(Rust::AST::Module&)::<lambda()> >(Rust::NodeId, std::string, Rust::Resolver2_0::DefaultResolver::visit(Rust::AST::Module&)::<lambda()>&&)::<lambda()>, Rust::Resolver2_0::DefaultResolver::visit(Rust::AST::Module&)::<lambda()> >
../../gcc/rust/resolve/rust-name-resolution-context.h:470
0xf93189 scope<Rust::Resolver2_0::DefaultResolver::visit(Rust::AST::Module&)::<lambda()> >
../../gcc/rust/resolve/rust-name-resolution-context.h:413
0xf93189 scope<Rust::Resolver2_0::DefaultResolver::visit(Rust::AST::Module&)::<lambda()> >
../../gcc/rust/resolve/rust-name-resolution-context.h:406
0xf93189 operator()
../../gcc/rust/resolve/rust-default-resolver.cc:64
0xf93189 __invoke_impl<void, Rust::Resolver2_0::DefaultResolver::visit(Rust::AST::Module&)::<lambda()>&>
/usr/include/c++/15.2.1/bits/invoke.h:63
/home/matthias/vcs/github/gccrs/gccrs-build/gcc/crab1 /tmp/icemaker_global_tempdir.6L6WNx0nPA0K/rustc_testrunner_tmpdir_reporting.SrsQgFOHOlh9/mvce.rs -o/tmp/icemaker_global_tempdir.6L6WNx0nPA0K/rustc_testrunner_tmpdir_reporting.SrsQgFOHOlh9/binaryname -frust-incomplete-and-experimental-compiler-do-not-use
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Reactions are currently unavailable