Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Name resolution 2.0 trait methods ICE #2934

Open
P-E-P opened this issue Mar 27, 2024 · 0 comments
Open

Name resolution 2.0 trait methods ICE #2934

P-E-P opened this issue Mar 27, 2024 · 0 comments

Comments

@P-E-P
Copy link
Member

P-E-P commented Mar 27, 2024

Code

Requires the following flag: -frust-name-resolution-2.0

pub mod example {
    pub trait MyTrait {
        fn test(self);
    }
}

pub mod bis {
    use super::example::MyTrait;
    pub struct Toto;

    impl MyTrait for Toto {
        fn test(self) {

        }
    }
}

use example::MyTrait;

fn main() {
    let toto = bis::Toto;
    toto.test();
}

Meta

Error output

Backtrace

crab1: internal compiler error: in get_type, at rust/ast/rust-item.h:533
0x273d33c internal_error(char const*, ...)
  ???:0
0xacfe79 fancy_abort(char const*, int, char const*)
  ???:0
0xd57268 Rust::Resolver2_0::NameResolutionContext::scoped(Rust::Resolver2_0::Rib, unsigned int, std::function<void ()>, tl::optional<Rust::Identifier>)
  ???:0
0xd5a30b Rust::Resolver2_0::DefaultResolver::visit(Rust::AST::Function&)
  ???:0
0xd57268 Rust::Resolver2_0::NameResolutionContext::scoped(Rust::Resolver2_0::Rib, unsigned int, std::function<void ()>, tl::optional<Rust::Identifier>)
  ???:0
0xd5a5f5 Rust::Resolver2_0::DefaultResolver::visit(Rust::AST::Trait&)
  ???:0
0xd57268 Rust::Resolver2_0::NameResolutionContext::scoped(Rust::Resolver2_0::Rib, unsigned int, std::function<void ()>, tl::optional<Rust::Identifier>)
  ???:0
0xd5e1e0 Rust::Resolver2_0::TopLevel::visit(Rust::AST::Module&)
  ???:0
0xd5ca0f Rust::Resolver2_0::TopLevel::go(Rust::AST::Crate&)
  ???:0
0xd6a80e Rust::Resolver2_0::Early::go(Rust::AST::Crate&)
  ???:0
0xc07082 Rust::Session::expansion(Rust::AST::Crate&, Rust::Resolver2_0::NameResolutionContext&)
  ???:0
0xc12ddd Rust::Session::compile_crate(char const*)
  ???:0
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.
Compiler returned: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants