We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I tried this code: https://godbolt.org/z/vTPqxfeMa
fn myfun((x, _): (i32, i32)) -> i32 { x }
I expected it to compile correctly and just throw warning function myfun is never used.
myfun
But instead it caused internal compiler error.
internal compiler error
The text was updated successfully, but these errors were encountered:
Trying out different irrefutable patterns as parameters, will comment if any other pattern causes error.
Sorry, something went wrong.
While investigating this bug, I tried out this: https://godbolt.org/z/3s398sW1r
The below code compiles correctly.
fn myfun() -> i32 { let (x, a) = (1, 2); x }
This causes internal compiler error.
fn myfun() -> i32 { let (x, _) = (1, 2); x }
TuplePattern
ICE backtrace:
crab1: internal compiler error: in function_set_parameters, at rust/rust-gcc.cc:2284 0x236722c internal_error(char const*, ...) ???:0 0x9fc228 fancy_abort(char const*, int, char const*) ???:0 0xd8e28d Rust::Compile::HIRCompileBase::compile_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Rust::HIR::SelfParam&, std::vector<Rust::HIR::FunctionParam, std::allocator<Rust::HIR::FunctionParam> >&, Rust::HIR::FunctionQualifiers const&, Rust::HIR::Visibility&, std::vector<Rust::AST::Attribute, std::allocator<Rust::AST::Attribute> >&, unsigned int, Rust::HIR::BlockExpr*, Rust::Resolver::CanonicalPath const*, Rust::TyTy::FnType*) ???:0 0xd64d3a Rust::Compile::CompileItem::visit(Rust::HIR::Function&) ???:0 0xb3c829 Rust::Compile::CompileCrate::go() ???:0 0xb3c8a8 Rust::Compile::CompileCrate::Compile(Rust::HIR::Crate&, Rust::Compile::Context*) ???:0 0xb37b7c 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
No branches or pull requests
I tried this code: https://godbolt.org/z/vTPqxfeMa
I expected it to compile correctly and just throw warning function
myfun
is never used.But instead it caused
internal compiler error
.The text was updated successfully, but these errors were encountered: