You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
crab1: internal compiler error: Segmentation fault
0x27a7a8c internal_error(char const*, ...)
???:0
0xde47f4 Rust::TyTy::BaseType::get_kind() const
???:0
0xe2fe91 Rust::Resolver::TypeCheckType::visit(Rust::HIR::TypePath&)
???:0
0xe2dea5 Rust::Resolver::TypeCheckType::Resolve(Rust::HIR::Type*)
???:0
0xe1f2df Rust::Resolver::TypeCheckItem::visit(Rust::HIR::TypeAlias&)
???:0
0xe1f950 Rust::Resolver::TypeCheckItem::Resolve(Rust::HIR::Item&)
???:0
0xe74553 Rust::Resolver::query_type(unsigned int, Rust::TyTy::BaseType**)
???:0
0xe2ef48 Rust::Resolver::TypeCheckType::resolve_root_path(Rust::HIR::TypePath&, unsigned long*, unsigned int*)
???:0
0xe2fe86 Rust::Resolver::TypeCheckType::visit(Rust::HIR::TypePath&)
???:0
0xe2dea5 Rust::Resolver::TypeCheckType::Resolve(Rust::HIR::Type*)
???:0
0xe1f2df Rust::Resolver::TypeCheckItem::visit(Rust::HIR::TypeAlias&)
???:0
0xe1f950 Rust::Resolver::TypeCheckItem::Resolve(Rust::HIR::Item&)
???:0
0xddbb9b Rust::Resolver::TypeResolution::Resolve(Rust::HIR::Crate&)
???:0
0xc35907 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
Expected behavior
I expected to see...
error[E0391]: cycle detected when computing type of `C`
--> <source>:1:10
|
1 | type C = crate::C;
| ^^^^^^^^
|
= note: ...which again requires computing type of `C`, completing the cycle
note: cycle used when collecting item types in top-level module
--> <source>:1:1
|
1 | / type C = crate::C;
2 | |
3 | | type A = crate::B;
4 | | type B = crate::A;
| |__________________^
error[E0391]: cycle detected when computing type of `A`
--> <source>:3:10
|
3 | type A = crate::B;
| ^^^^^^^^
|
note: ...which requires computing type of `B`...
--> <source>:4:10
|
4 | type B = crate::A;
| ^^^^^^^^
= note: ...which again requires computing type of `A`, completing the cycle
note: cycle used when collecting item types in top-level module
--> <source>:1:1
|
1 | / type C = crate::C;
2 | |
3 | | type A = crate::B;
4 | | type B = crate::A;
| |__________________^
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0391`.
Compiler returned: 1
GCC Version
master
The text was updated successfully, but these errors were encountered:
We actually don't have any handling for recursive types because its complicated for both typechecking and code generation. I am holding off fixing it until i am more confident after we fix more bugs in generics and method resolution first.
Summary
might be related to #1178 and #2757
But the name resolver is the cause
Reproducer
I tried this code:
Does the code make use of any (1.49) nightly feature ?
Godbolt link
https://godbolt.org/z/dP6vb8Yf3
Actual behavior
The current behavior is...
Expected behavior
I expected to see...
GCC Version
master
The text was updated successfully, but these errors were encountered: