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
Clone
Copy
I tried this code:
#[lang = "copy"] trait Copy {} #[lang = "clone"] trait Clone { fn clone(&self) -> Self; } #[derive(Copy, Clone)] struct Empty;
I expected to see this happen: no error.
Instead, this happened:
crab1: internal compiler error: in go, at rust/expand/rust-derive-clone.cc:106 0x23e9f13 Rust::AST::DeriveClone::go(Rust::AST::Item&) /home/kagounard/Git/rust-gcc/gccrs/build/gcc/../../gcc/rust/expand/rust-derive-clone.cc:106 0x23e870c Rust::AST::DeriveVisitor::derive(Rust::AST::Item&, Rust::AST::Attribute const&, Rust::BuiltinMacro) /home/kagounard/Git/rust-gcc/gccrs/build/gcc/../../gcc/rust/expand/rust-derive.cc:37 0x23daaed Rust::builtin_derive_item(Rust::AST::Item&, Rust::AST::Attribute const&, Rust::BuiltinMacro) /home/kagounard/Git/rust-gcc/gccrs/build/gcc/../../gcc/rust/expand/rust-expand-visitor.cc:49 0x23da6cd Rust::ExpandVisitor::expand_inner_items(std::vector<std::unique_ptr<Rust::AST::Item, std::default_delete<Rust::AST::Item> >, std::allocator<std::unique_ptr<Rust::AST::Item, std::default_delete<Rust::AST::Item> > > >&) /home/kagounard/Git/rust-gcc/gccrs/build/gcc/../../gcc/rust/expand/rust-expand-visitor.cc:192 0x23dbf80 Rust::ExpandVisitor::visit(Rust::AST::Crate&) /home/kagounard/Git/rust-gcc/gccrs/build/gcc/../../gcc/rust/expand/rust-expand-visitor.cc:443 0x23d9ff0 Rust::ExpandVisitor::go(Rust::AST::Crate&) /home/kagounard/Git/rust-gcc/gccrs/build/gcc/../../gcc/rust/expand/rust-expand-visitor.cc:42 0x22ec683 Rust::Session::expansion(Rust::AST::Crate&, Rust::Resolver2_0::NameResolutionContext&) /home/kagounard/Git/rust-gcc/gccrs/build/gcc/../../gcc/rust/rust-session-manager.cc:933 0x22eaf0f Rust::Session::compile_crate(char const*) /home/kagounard/Git/rust-gcc/gccrs/build/gcc/../../gcc/rust/rust-session-manager.cc:604 0x22ea8b1 Rust::Session::handle_input_files(int, char const**) /home/kagounard/Git/rust-gcc/gccrs/build/gcc/../../gcc/rust/rust-session-manager.cc:416 0x2144872 grs_langhook_parse_file() /home/kagounard/Git/rust-gcc/gccrs/build/gcc/../../gcc/rust/rust-lang.cc:165 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.
if the order of Clone and Copy is switched, then this happens:
crab1: internal compiler error: in go, at rust/expand/rust-derive-copy.cc:34 0x23eb6a3 Rust::AST::DeriveCopy::go(Rust::AST::Item&) /home/kagounard/Git/rust-gcc/gccrs/build/gcc/../../gcc/rust/expand/rust-derive-copy.cc:34 0x23e873f Rust::AST::DeriveVisitor::derive(Rust::AST::Item&, Rust::AST::Attribute const&, Rust::BuiltinMacro) /home/kagounard/Git/rust-gcc/gccrs/build/gcc/../../gcc/rust/expand/rust-derive.cc:39 0x23daaed Rust::builtin_derive_item(Rust::AST::Item&, Rust::AST::Attribute const&, Rust::BuiltinMacro) /home/kagounard/Git/rust-gcc/gccrs/build/gcc/../../gcc/rust/expand/rust-expand-visitor.cc:49 0x23da6cd Rust::ExpandVisitor::expand_inner_items(std::vector<std::unique_ptr<Rust::AST::Item, std::default_delete<Rust::AST::Item> >, std::allocator<std::unique_ptr<Rust::AST::Item, std::default_delete<Rust::AST::Item> > > >&) /home/kagounard/Git/rust-gcc/gccrs/build/gcc/../../gcc/rust/expand/rust-expand-visitor.cc:192 0x23dbf80 Rust::ExpandVisitor::visit(Rust::AST::Crate&) /home/kagounard/Git/rust-gcc/gccrs/build/gcc/../../gcc/rust/expand/rust-expand-visitor.cc:443 0x23d9ff0 Rust::ExpandVisitor::go(Rust::AST::Crate&) /home/kagounard/Git/rust-gcc/gccrs/build/gcc/../../gcc/rust/expand/rust-expand-visitor.cc:42 0x22ec683 Rust::Session::expansion(Rust::AST::Crate&, Rust::Resolver2_0::NameResolutionContext&) /home/kagounard/Git/rust-gcc/gccrs/build/gcc/../../gcc/rust/rust-session-manager.cc:933 0x22eaf0f Rust::Session::compile_crate(char const*) /home/kagounard/Git/rust-gcc/gccrs/build/gcc/../../gcc/rust/rust-session-manager.cc:604 0x22ea8b1 Rust::Session::handle_input_files(int, char const**) /home/kagounard/Git/rust-gcc/gccrs/build/gcc/../../gcc/rust/rust-session-manager.cc:416 0x2144872 grs_langhook_parse_file() /home/kagounard/Git/rust-gcc/gccrs/build/gcc/../../gcc/rust/rust-lang.cc:165 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.
8a72566
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I tried this code:
I expected to see this happen: no error.
Instead, this happened:
if the order of
Clone
andCopy
is switched, then this happens:Meta
8a72566
The text was updated successfully, but these errors were encountered: