aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ChangeLog
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/ChangeLog')
-rw-r--r--gcc/rust/ChangeLog4668
1 files changed, 4668 insertions, 0 deletions
diff --git a/gcc/rust/ChangeLog b/gcc/rust/ChangeLog
index d6f94f5..2a5219d 100644
--- a/gcc/rust/ChangeLog
+++ b/gcc/rust/ChangeLog
@@ -1,3 +1,4671 @@
+2025-06-26 Martin Jambor <mjambor@suse.cz>
+
+ * checks/errors/borrowck/rust-borrow-checker-diagnostics.cc
+ (BorrowCheckerDiagnostics::get_loan): Type cast loan to uint32_t.
+
+2025-04-28 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * checks/errors/borrowck/rust-bir-place.h
+ (IndexVec::size_type): Add.
+ (IndexVec::MAX_INDEX): Add.
+ (IndexVec::size): Change the return type to the type of the
+ internal value used by the index type.
+ (PlaceDB::lookup_or_add_variable): Use the return value from the
+ PlaceDB::add_place call.
+ * checks/errors/borrowck/rust-bir.h
+ (struct BasicBlockId): Move this definition before the
+ definition of the struct Function.
+
+2025-04-28 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Visit visibility.
+
+2025-04-28 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-ast-visitor.cc
+ (DefaultASTVisitor::visit): Visit the loop labels of
+ WhileLetLoopExpr instances before visiting their scrutinee
+ expressions.
+ * resolve/rust-early-name-resolver-2.0.cc
+ (Early::resolve_glob_import): Pass the glob import's path
+ directly to NameResolutionContext::resolve_path.
+ * resolve/rust-toplevel-name-resolver-2.0.cc
+ (TopLevel::visit): Remove unnecessary call to
+ Identifier::as_string.
+ (flatten_glob): Improve handling of cases where a glob use tree
+ has no path.
+
+2025-04-28 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-derive-clone.cc (DeriveClone::clone_enum_struct): Clone
+ path to avoid using the same nodeid.
+
+2025-04-28 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit_function_params):
+ Add specialized function to visit function parameters.
+ (DefaultASTVisitor::visit): Remove parameter visit and call specialized
+ function instead.
+ * ast/rust-ast-visitor.h: Add function prototye.
+ * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Remove
+ function.
+ (Late::visit_function_params): Override specialized visit function.
+ * resolve/rust-late-name-resolver-2.0.h: Add overriden function
+ prototype.
+
+2025-04-28 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-name-resolution-context.h: Use BindingLayer instead.
+ * resolve/rust-name-resolution-context.cc (BindingLayer::BindingLayer):
+ Add new constructor for binding layer.
+ (BindingLayer::bind_test): Add a function to test a binding constraint.
+ (BindingLayer::push): Push a new binding group.
+ (BindingLayer::and_binded): Add function to test and-binding
+ constraint.
+ (BindingLayer::or_binded): Add function to test or-binding constraints.
+ (BindingLayer::insert_ident): Insert a new identifier in the current
+ binding group.
+ (BindingLayer::merge): Merge current binding group with it's parent.
+ (BindingLayer::get_source): Get the source of the current binding
+ group.
+ * resolve/rust-late-name-resolver-2.0.cc: Use stacked context for
+ binding group.
+ * util/rust-stacked-contexts.h: Add mutable peek function.
+
+2025-04-28 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Add binding
+ creation in visitor.
+ * resolve/rust-late-name-resolver-2.0.h: Add function prototypes.
+ * resolve/rust-name-resolution-context.h: Add binding context.
+
+2025-04-28 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-name-resolution-context.h (struct Binding): Add Binding
+ struct to differentiate Or and Product bindings in patterns.
+ (enum class): Add Binding kind.
+ (class BindingContext): Add binding context with Binding stack.
+
+2025-04-28 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.h: Add hash function.
+
+2025-04-28 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.h: Add equality operator.
+
+2025-04-28 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-default-resolver.cc (DefaultResolver::visit): Add visit
+ function for TypeParam.
+ * resolve/rust-default-resolver.h: Add function prototype.
+ * resolve/rust-forever-stack.h: Add function to check for forward
+ declaration ban.
+ * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Check forward
+ declarations.
+
+2025-04-28 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Remove error kind
+ and change function call.
+ * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Change call name.
+ * ast/rust-path.cc (ConstGenericParam::as_string): Likewise.
+ * ast/rust-path.h: Remove error kind.
+ * hir/rust-ast-lower-type.cc (ASTLowerGenericParam::visit): Change call
+ name.
+ * parse/rust-parse-impl.h (Parser::parse_generic_param): Use optional
+ on parsing failure.
+ (Parser::parse_generic_arg): Likewise.
+ (Parser::parse_path_generic_args): Likewise.
+ * parse/rust-parse.h: Likewise.
+ * resolve/rust-ast-resolve-type.h: Change call name.
+
+2025-04-28 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Change error
+ message.
+
+2025-04-28 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-early-name-resolver-2.0.cc
+ (Early::build_import_mapping): Avoid outputting an "unresolved
+ import" error if other errors are outputted during resolution.
+ * resolve/rust-early-name-resolver-2.0.h
+ (Early::resolve_path_in_all_ns): Collect path resolution errors
+ while avoiding duplicate errors for resolutions in each
+ namespace.
+ * resolve/rust-forever-stack.h
+ (ForeverStack::resolve_path): Add parameter for collecting
+ errors.
+ (ForeverStack::find_starting_point): Likewise.
+ (ForeverStack::resolve_segments): Likewise.
+ * resolve/rust-forever-stack.hxx
+ (check_leading_kw_at_start): Likewise.
+ (ForeverStack::find_starting_point): Likewise.
+ (ForeverStack::resolve_segments): Likewise.
+ (ForeverStack::resolve_path): Likewise.
+ * resolve/rust-name-resolution-context.h
+ (NameResolutionContext::resolve_path): Add optional parameter
+ for collecting errors.
+
+2025-04-28 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::array_copied_expr): prealloc the vector
+
+2025-04-28 Philip Herron <herron.philip@googlemail.com>
+
+ * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): add guard
+ * expand/rust-expand-visitor.cc (ExpandVisitor::visit): add guard
+
+2025-04-28 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-ast-resolve-path.cc
+ (ResolvePath::resolve_path): Adjust error messages.
+ * resolve/rust-ast-resolve-type.cc
+ (ResolveRelativeTypePath::go): Likewise.
+ * resolve/rust-forever-stack.hxx
+ (check_leading_kw_at_start): Likewise.
+
+2025-04-28 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): fix bad assertion
+
+2025-04-28 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-forever-stack.hxx
+ (ForeverStack::resolve_path): Pass instance of Node to lambda by
+ reference instead of by value.
+
+2025-04-28 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-struct-field.h: keep reference to parent expression
+ * typecheck/rust-hir-type-check-struct.cc (TypeCheckStructExpr::TypeCheckStructExpr):
+ update ctor
+ (TypeCheckStructExpr::resolve): remove bad rust_fatal_errors
+ (TypeCheckStructExpr::visit): cleanup errors
+
+2025-04-28 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): Handle StructPatternFieldIdent.
+ * resolve/rust-late-name-resolver-2.0.h
+ (Late::visit): Likewise.
+
+2025-04-28 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Dump llvm inline
+ asm tokens.
+
+2025-04-28 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Remove unreachable
+ code.
+ * ast/rust-expr.h (struct LlvmOperand): Add LlvmOperand struct to
+ represent input and outputs.
+ (class LlvmInlineAsm): Add input, output and clobber operands.
+ (struct TupleTemplateStr): Add locus getter.
+ * backend/rust-compile-block.h: Add visit for LlvmInlineAsm.
+ * backend/rust-compile-expr.cc (CompileExpr::visit): Add llvm inline
+ asm stmt compilation.
+ * backend/rust-compile-expr.h: Add function prototype.
+ * backend/rust-compile-asm.h (class CompileLlvmAsm): Add llvm asm hir
+ not to gimple.
+ * backend/rust-compile-asm.cc (CompileLlvmAsm::CompileLlvmAsm): Add
+ constructor.
+ (CompileLlvmAsm::construct_operands): Add function to construct operand
+ tree.
+ (CompileLlvmAsm::construct_clobbers): Add function to construct clobber
+ tree.
+ (CompileLlvmAsm::tree_codegen_asm): Generate the whole tree for a given
+ llvm inline assembly node.
+ * checks/errors/borrowck/rust-bir-builder-expr-stmt.cc (ExprStmtBuilder::visit):
+ Add visit function.
+ * checks/errors/borrowck/rust-bir-builder-expr-stmt.h: Add function
+ prototype.
+ * checks/errors/borrowck/rust-bir-builder-lazyboolexpr.h: Add visit
+ function.
+ * checks/errors/borrowck/rust-bir-builder-struct.h: Likewise.
+ * checks/errors/borrowck/rust-function-collector.h: Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::visit):
+ Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.h: Add visit function
+ prototype.
+ * checks/errors/rust-const-checker.cc (ConstChecker::visit): Add visit
+ function.
+ * checks/errors/rust-const-checker.h: Add visit function prototype.
+ * checks/errors/rust-hir-pattern-analysis.cc (PatternChecker::visit):
+ Add visit function.
+ * checks/errors/rust-hir-pattern-analysis.h: Add visit function
+ prototype.
+ * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): Add
+ visit function.
+ * checks/errors/rust-unsafe-checker.h: Add function prototype.
+ * expand/rust-macro-builtins-asm.cc (parse_llvm_templates): Parse
+ templates.
+ (parse_llvm_arguments): Add function to parse non template tokens.
+ (parse_llvm_operands): Add function to parse operands, either input or
+ output.
+ (parse_llvm_outputs): Add function to parse and collect llvm asm
+ outputs.
+ (parse_llvm_inputs): Likewise with inputs.
+ (parse_llvm_clobbers): Add function to parse llvm asm clobbers.
+ (parse_llvm_options): Add function to parse llvm asm options.
+ (parse_llvm_asm): Add function to parse llvm asm.
+ * expand/rust-macro-builtins-asm.h (class LlvmAsmContext): Add context
+ for llvm asm parser.
+ (parse_llvm_outputs): Add function prototype.
+ (parse_llvm_inputs): Likewise.
+ (parse_llvm_clobbers): Likewise.
+ (parse_llvm_options): Likewise.
+ * hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Lower AST llvm
+ asm node to HIR.
+ * hir/rust-ast-lower-expr.h: Add function prototype.
+ * hir/rust-hir-dump.cc (Dump::visit): Add visit function.
+ * hir/rust-hir-dump.h: Add function prototype.
+ * hir/tree/rust-hir-expr-abstract.h: Add HIR llvm asm node kind.
+ * hir/tree/rust-hir-expr.h (struct LlvmOperand): Add LlvmOperand type
+ to represent input and outputs.
+ (class LlvmInlineAsm): Add LlvmInlineAsm hir node.
+ * hir/tree/rust-hir-full-decls.h (class LlvmInlineAsm): Add
+ LlvmInlineAsm hir node forward declaration.
+ * hir/tree/rust-hir-visitor.h: Add visit functions for LlvmInlineAsm
+ hir node.
+ * hir/tree/rust-hir.cc (LlvmInlineAsm::accept_vis): Add hir node
+ visitor related functions.
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit):
+ Type check input and output operands.
+ * typecheck/rust-hir-type-check-expr.h: Add function prototype.
+ * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Visit input and
+ output operand expressions.
+ * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Resolve input
+ and output expressions.
+ * resolve/rust-ast-resolve-expr.h: Add function prototypes.
+
+2025-04-28 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Make visitor
+ unreachable.
+ * ast/rust-ast-collector.h: Add visit for LlvmInlineAsmNode.
+ * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Add visit
+ function for the default ast visitor.
+ * ast/rust-ast-visitor.h: Add function prototype.
+ * ast/rust-ast.cc (LlvmInlineAsm::accept_vis): Add accept_vis to
+ LlvmInlineAsm node.
+ * ast/rust-ast.h: Add LlvmInlineAsm node kind.
+ * ast/rust-expr.h (class LlvmInlineAsm): Add LlvmInlineAsm node.
+ * expand/rust-derive.h: Add visit function for LlvmInlineAsm node.
+ * expand/rust-macro-builtins-asm.cc (MacroBuiltin::llvm_asm_handler):
+ Add handler for llvm inline assembly nodes.
+ (parse_llvm_asm): Add function to parse llvm assembly nodes.
+ * expand/rust-macro-builtins-asm.h (parse_llvm_asm): Add function
+ prototypes.
+ * expand/rust-macro-builtins.cc (inline_llvm_asm_maker): Add macro
+ transcriber.
+ * expand/rust-macro-builtins.h: Add transcriber function prototype.
+ * hir/rust-ast-lower-base.cc (ASTLoweringBase::visit): Add visit
+ function for LlvmInlineAsm node.
+ * hir/rust-ast-lower-base.h: Add visit function prototype.
+ * resolve/rust-ast-resolve-base.cc (ResolverBase::visit): Add visit
+ function for LlvmInlineAsm node.
+ * resolve/rust-ast-resolve-base.h: Add visit function prototype.
+
+2025-04-28 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * expand/rust-macro-builtins-asm.cc (parse_asm_arg): Emit error
+ message.
+
+2025-04-28 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): add diagnostic
+ * typecheck/rust-tyty.cc (BaseType::contains_infer): new helper to grab first infer var
+ * typecheck/rust-tyty.h: prototype
+
+2025-04-28 Philip Herron <herron.philip@googlemail.com>
+
+ * rust-gcc.cc (arithmetic_or_logical_expression): Ensure this is an integer
+
+2025-04-28 Philip Herron <herron.philip@googlemail.com>
+
+ * hir/rust-hir-dump.cc (Dump::visit): add guard for optional label
+
+2025-04-28 Yap Zhi Heng <yapzhhg@gmail.com>
+
+ * typecheck/rust-tyty.h: Remove extra redundant comment.
+ * typecheck/rust-hir-type-check-base.cc: Update comment on repr
+ handling.
+
+2025-04-28 Zhi Heng <yapzhhg@gmail.com>
+
+ * typecheck/rust-hir-type-check-base.cc: Set enum representing
+ type properly if repr is an integer type.
+ * typecheck/rust-hir-type-check-item.cc: Update comments.
+
+2025-04-28 Zhi Heng <yapzhhg@gmail.com>
+
+ * typecheck/rust-tyty.h: Add new `ReprKind` enum to
+ `ReprOptions`.
+ * typecheck/rust-hir-type-check-base.cc: Handle setting of
+ `repr_kind`.
+ * typecheck/rust-hir-type-check-item.cc: New check for
+ zero-variant enums.
+
+2025-04-28 Philip Herron <herron.philip@googlemail.com>
+
+ * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): add null check
+ * hir/tree/rust-hir-item.h: add has_type helper
+ * typecheck/rust-hir-trait-resolve.cc (TraitItemReference::resolve_item):
+ add missing type checking
+
+2025-04-14 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-lang-item.h: Add new manually_drop lang item.
+ * util/rust-lang-item.cc: Likewise.
+
+2025-04-14 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-attribute-values.h: Add RUSTFMT value.
+ * util/rust-attributes.cc: Define the attribute.
+ * util/rust-attributes.h (enum CompilerPass): Add EXTERNAL variant.
+ * expand/rust-macro-builtins.cc: Fix formatting.
+
+2025-04-14 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-early-name-resolver-2.0.cc (Early::visit_attributes): Remove assertion.
+
+2025-04-14 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-attribute-values.h: Add missing attributes.
+ * util/rust-attributes.cc: Likewise.
+ * util/rust-attributes.h (enum CompilerPass): Mention adding something for const
+ functions.
+
+2025-04-14 beamandala <mandalapubhavesh@gmail.com>
+
+ * expand/rust-macro-builtins.cc (MacroBuiltin::builtin_transcribers):
+ Add entry for track_caller.
+ * util/rust-attribute-values.h: add `TRACK_CALLER` attribute.
+ * util/rust-attributes.cc: add `track_caller` attribute definition.
+
+2025-04-14 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * checks/errors/rust-const-checker.cc
+ (ConstChecker::visit): Visit the enum items of enums.
+ * resolve/rust-ast-resolve-item.cc
+ (ResolveItem::visit): Resolve enum discriminants during nr1.0.
+
+2025-04-14 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-macro-builtins-format-args.cc (format_args_parse_arguments): Improve safety,
+ allow extra commas after end of argument list.
+
+2025-04-14 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-macro-expand.cc (MacroExpander::expand_decl_macro): Call into
+ TokenTreeDesugar.
+ * expand/rust-token-tree-desugar.cc: New file.
+ * expand/rust-token-tree-desugar.h: New file.
+ * Make-lang.in: Compile them.
+
+2025-04-14 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-macro-expand.cc (MacroExpander::match_n_matches): Do not
+ insert fragments and substack fragments if the matcher failed.
+
+2025-04-14 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust-session-manager.cc (Session::compile_crate): Call the visitor later in the pipeline.
+
+2025-04-14 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast.h (DelimTokenTree::get_locus): New function.
+
+2025-04-14 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-expr.h (class RangeExpr): Add empty outer attributes and allow getting them
+ and setting them.
+
+2025-04-14 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Return if module
+ is unloaded.
+
+2025-04-14 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * typecheck/rust-hir-type-check-expr.cc (is_default_fn): New.
+ (emit_ambiguous_resolution_error): New.
+ (handle_multiple_candidates): Properly handle multiple candidates in
+ the case of specialization.
+ (TypeCheckExpr::visit): Call `handle_multiple_candidates`.
+
+2025-04-14 Andrew Pinski <quic_apinski@quicinc.com>
+
+ PR rust/119342
+ * rust-gcc.cc (block): Add comment on why chaining
+ the variables of the scope toether.
+
+2025-04-14 Andrew Pinski <quic_apinski@quicinc.com>
+
+ PR rust/119341
+ * rust-gcc.cc (function_type): Use range fors.
+ (function_type_variadic): Likewise.
+ (fill_in_fields): Likewise.
+ (statement_list): Likewise.
+ (block): Likewise.
+ (block_add_statements): Likewise.
+ (function_set_parameters): Likewise.
+ (write_global_definitions): Likewise.
+
+2025-04-14 Andrew Pinski <quic_apinski@quicinc.com>
+
+ * rust-gcc.cc (Bvariable::get_tree): Use error_operand_p.
+ (pointer_type): Likewise.
+ (reference_type): Likewise.
+ (immutable_type): Likewise.
+ (function_type): Likewise.
+ (function_type_variadic): Likewise.
+ Cleanup the check for receiver.type first.
+ (function_ptr_type): Use error_operand_p.
+ (fill_in_fields): Likewise.
+ (fill_in_array): Likewise.
+ (named_type): Likewise.
+ (type_size): Likewise.
+ (type_alignment): Likewise.
+ (type_field_alignment): Likewise.
+ (type_field_offset): Likewise.
+ (zero_expression): Likewise.
+ (float_constant_expression): Likewise.
+ (convert_expression): Likewise.
+ (struct_field_expression): Likewise.
+ (compound_expression): Likewise.
+ (conditional_expression): Likewise.
+ (negation_expression): Likewise.
+ (arithmetic_or_logical_expression): Likewise.
+ (arithmetic_or_logical_expression_checked): Likewise.
+ (comparison_expression): Likewise.
+ (lazy_boolean_expression): Likewise.
+ (constructor_expression): Likewise.
+ (array_constructor_expression): Likewise.
+ (array_index_expression): Likewise.
+ (call_expression): Likewise.
+ (init_statement): Likewise.
+ (assignment_statement): Likewise.
+ (return_statement): Likewise.
+ (exception_handler_statement): Likewise.
+ (if_statement): Likewise.
+ (compound_statement): Likewise.
+ Tighten up the code, removing t variable.
+ (statement_list): Use error_operand_p.
+ (block): Likewise.
+ (block_add_statements): Likewise.
+ (convert_tree): Likewise.
+ (global_variable): Likewise.
+ (global_variable_set_init): Likewise.
+ (local_variable): Likewise.
+ (parameter_variable): Likewise.
+ (static_chain_variable): Likewise.
+ (temporary_variable): Likewise.
+ (function): Likewise. Tighten up the code.
+ (function_defer_statement): Use error_operand_p.
+ (function_set_parameters): Use error_operand_p.
+ (write_global_definitions): Use error_operand_p.
+ Tighten up the code around the loop.
+
+2025-04-14 Andrew Pinski <quic_apinski@quicinc.com>
+
+ * rust-gcc.cc (is_floating_point): Use FLOAT_TYPE_P
+ instead of manually checking the type.
+
+2025-04-08 Matty Kuhn <matty.kuhn.1@gmail.com>
+
+ * ast/rust-ast.h: (AST::Attribute): add empty_input function
+ * checks/errors/rust-feature-gate.cc: (FeatureGate::visit): check for empty feature gate
+
+2025-04-08 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Update label
+ getter call.
+ * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Likewise.
+ * ast/rust-ast.cc (BreakExpr::as_string): Likewise.
+ * hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Likewise.
+ * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Likewise.
+ * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Likewise.
+ * ast/rust-expr.h: Add optional getter and rename label getter to
+ get_label_unchecked.
+
+2025-04-08 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit):
+ Call unchecked getter.
+ * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit):
+ Likewise.
+ * ast/rust-ast.cc (ContinueExpr::as_string): Likewise.
+ * hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Likewise.
+ * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Likewise.
+ * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Likewise.
+ * ast/rust-expr.h: Add new getter for the optional and rename getter
+ to get_label_unchecked.
+
+2025-04-08 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * parse/rust-parse-impl.h (Parser::parse_loop_label): Change function
+ return type to expected.
+ (Parser::parse_labelled_loop_expr): Adapt call location to new return
+ type.
+ * parse/rust-parse.h (enum class): Update function prototype.
+
+2025-04-08 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Add call
+ to label resolution if there is one label.
+ (Late::resolve_label): Look for labels and emit an error message on
+ failure.
+ * resolve/rust-late-name-resolver-2.0.h: Add function prototypes.
+
+2025-04-08 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit):
+ Change error message to match rustc.
+
+2025-04-08 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-builder.cc (Builder::self_ref_param): Remove error state
+ and use optional.
+ * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Check label
+ before visiting.
+ * ast/rust-ast.cc (ContinueExpr::as_string): Retrieve label value.
+ (Lifetime::as_string): Retrieve lifetime value.
+ (ReferenceType::as_string): Likewise.
+ (SelfParam::as_string): Likewise.
+ * ast/rust-ast.h: Remove lifetime and LifetimeParam error state.
+ * ast/rust-desugar-for-loops.cc (DesugarForLoops::DesugarCtx::make_break_arm):
+ Use optional instead of error state.
+ * ast/rust-expr.h (class ContinueExpr): Make label optional.
+ * ast/rust-item.h (class SelfParam): Make lifetime optional.
+ * ast/rust-type.h (class ReferenceType): Likewise.
+ * backend/rust-compile-base.cc: Use optional for self param instead
+ of error state.
+ * backend/rust-compile-base.h: Update function prototype.
+ * expand/rust-derive-clone.cc (DeriveClone::clone_fn): Use optional.
+ * hir/rust-ast-lower-base.cc (ASTLoweringBase::lower_self): Lower
+ lifetime only if it exists.
+ * hir/rust-ast-lower-block.h: Lower loop label only if it exists.
+ * hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Likewise.
+ * hir/rust-ast-lower-implitem.cc (ASTLowerImplItem::visit): Remove
+ references to error state.
+ (ASTLowerTraitItem::visit): Lower self param only if it exists.
+ * hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): Use nullopt
+ for default value instead of SelfParam error state.
+ * hir/rust-ast-lower.cc (ASTLoweringExprWithBlock::visit): Lower label
+ only if it exists.
+ * hir/rust-hir-dump.cc (Dump::do_traitfunctiondecl): Print self only if
+ it exists.
+ (Dump::visit): Liewise.
+ * hir/tree/rust-hir-bound.h: Remove error state.
+ * hir/tree/rust-hir-expr.cc (ContinueExpr::ContinueExpr): Use optional
+ in constructor for loop label.
+ (BreakExpr::BreakExpr): Likewise.
+ * hir/tree/rust-hir-expr.h (class ContinueExpr): Remove error state
+ implementation.
+ (class BreakExpr): Likewise.
+ * hir/tree/rust-hir-generic-param.h: Likewise.
+ * hir/tree/rust-hir-item.cc (SelfParam::SelfParam): Make lifetime
+ optional.
+ (Function::Function): Make self param optional.
+ * hir/tree/rust-hir-item.h (class Function): Likewise.
+ * hir/tree/rust-hir-type.cc (ReferenceType::ReferenceType): Make
+ lifetime optional.
+ * hir/tree/rust-hir-type.h (class ReferenceType): Likewise.
+ * hir/tree/rust-hir.cc (ContinueExpr::as_string): Use new getter.
+ (BreakExpr::as_string): Likewise.
+ (Lifetime::as_string): Likewise.
+ (ReferenceType::as_string): Likewise.
+ (TraitFunctionDecl::as_string): Likewise.
+ (SelfParam::as_string): Remove error state checking.
+ * parse/rust-parse-impl.h (Parser::parse_generic_param): Adapt to
+ optional.
+ (Parser::parse_lifetime_params): Likewise.
+ (Parser::parse_lifetime_params_objs): Likewise.
+ (Parser::parse_lifetime_param): Likewise.
+ (Parser::parse_lifetime_where_clause_item): Likewise.
+ (Parser::parse_type_param_bound): Likewise.
+ (Parser::parse_lifetime_bounds): Likewise.
+ (Parser::parse_path_generic_args): Likewise.
+ (Parser::parse_self_param): Likewise.
+ (Parser::parse_break_expr): Likewise.
+ (Parser::parse_continue_expr): Likewise.
+ (Parser::parse_reference_type_inner): Likewise.
+ * parse/rust-parse.h (class ParseLifetimeParamError): Add new class for
+ lifetime param parsing errors.
+ (class ParseLifetimeError): Add new class for lifetime parsing errors.
+ (enum ParseSelfError): Add new class for self param parsing errors.
+ * typecheck/rust-hir-type-check-implitem.cc (TypeCheckImplItem::visit):
+ Use unchecked getter in checked context. And make anonymous region.
+ * typecheck/rust-hir-type-check.cc (TraitItemReference::get_type_from_fn):
+ Likewise.
+
+2025-04-08 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Add
+ check for loop label before visiting it.
+
+2025-04-08 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-expr.h: Remove error getter and constructor.
+
+2025-04-08 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-builder.cc (Builder::block): Call with a nullopt instead
+ of an error loop label.
+ (WhileLetLoopExpr::as_string): Use getter function and adapt to
+ newtype.
+ * ast/rust-ast.cc (WhileLoopExpr::as_string): Likewise.
+ (LoopExpr::as_string): Likewise.
+ (BreakExpr::as_string): Likewise.
+ (ForLoopExpr::as_string): Likewise.
+ * ast/rust-expr.h (class BlockExpr): Make loop label optional.
+ (class BreakExpr): Likewise.
+ * expand/rust-derive-clone.cc (DeriveClone::clone_fn): Use nullopt.
+ * expand/rust-derive-debug.cc (DeriveDebug::stub_debug_fn): Likewise.
+ * expand/rust-derive-default.cc (DeriveDefault::default_fn): Likewise.
+ * expand/rust-derive-eq.cc: Likewise.
+ * parse/rust-parse-impl.h (Parser::parse_block_expr): Use optional
+ for arguments.
+ (Parser::parse_loop_expr): Likewise.
+ (Parser::parse_while_loop_expr): Likewise.
+ (Parser::parse_while_let_loop_expr): Likewise.
+ (Parser::parse_for_loop_expr): Likewise.
+ (Parser::parse_labelled_loop_expr): Likewise.
+ (Parser::parse_loop_label): Return an optional.
+ * parse/rust-parse.h: Update function prototype and use nullopt for
+ default values.
+
+2025-04-08 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Change default
+ visit order.
+
+2025-04-08 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Visit loop label
+ only if it exists.
+
+2025-04-08 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * hir/rust-ast-lower.cc (ASTLoweringBlock::visit): Lower label only if
+ it exists.
+ * hir/tree/rust-hir-expr.cc (BlockExpr::BlockExpr): Make loop label
+ optional.
+ (BaseLoopExpr::BaseLoopExpr): Likewise.
+ (LoopExpr::LoopExpr): Likewise.
+ (WhileLoopExpr::WhileLoopExpr): Likewise.
+ * hir/tree/rust-hir-expr.h: Use optional for lifetime and labels.
+ * hir/tree/rust-hir.cc (WhileLoopExpr::as_string): Use getter.
+ (WhileLetLoopExpr::as_string): Likewise.
+ (LoopExpr::as_string): Likewise.
+ * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Resolve labels.
+ * resolve/rust-late-name-resolver-2.0.h: Add visit function prototype
+ for loop labels.
+
+2025-04-08 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/expected.h: Use gcc_unreachable within gcc context.
+
+2025-04-08 Sri Ganesh Thota <sriganeshthota12345@gmail.com>
+
+ * resolve/rust-ast-resolve-base.h (redefined_error): created a function for
+ rust_error_at for redefined at multiple times.
+ * resolve/rust-ast-resolve-implitem.h: changed rust_error_at to redefined_error.
+ * resolve/rust-ast-resolve-stmt.cc (ResolveStmt::visit): changed rust_error_at to
+ redefined_error.
+ * resolve/rust-ast-resolve-stmt.h: changed rust_error_at to redefined_error.
+ * resolve/rust-ast-resolve-toplevel.h: changed rust_error_at to redefined_error.
+
+2025-04-08 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-ast-visitor.cc
+ (DefaultASTVisitor::visit): Remove explicit visitation of a
+ function's self parameter, as if it exists it'll be visited as
+ one of the function parameters.
+
+2025-04-08 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-typecheck-context.cc (TypeCheckContext::lookup_lifetime): emit error
+
+2025-04-08 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast.cc (Function::Function): Rename is_default -> has_default.
+ (Function::operator=): Likewise.
+ * ast/rust-item.h (class Function): Add `is_default` method.
+ * hir/rust-ast-lower-implitem.cc (ASTLowerImplItem::visit): Lower default qualifier.
+ * hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): Likewise.
+ * hir/tree/rust-hir-item.cc (Function::Function): Add `is_default` member.
+ (Function::operator=): Likewise.
+ * hir/tree/rust-hir-item.h (enum class Defaultness): New enum.
+ (class Function): Use it.
+
+2025-04-08 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * checks/errors/rust-feature.cc (Feature::create): Handle `#![feature(min_specialization)]`.
+ * checks/errors/rust-feature.h: Likewise.
+
+2025-04-08 Philip Herron <herron.philip@googlemail.com>
+
+ * resolve/rust-ast-resolve-type.cc (ResolveRelativeTypePath::go): fix error msg
+ * typecheck/rust-substitution-mapper.cc (SubstMapper::Resolve): add validation
+ (SubstMapper::valid_type): new check
+ (SubstMapper::visit): check if can resolve
+ * typecheck/rust-substitution-mapper.h: new prototype
+
+2025-04-08 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-base.cc (HIRCompileBase::address_expression): allow optional type
+ * backend/rust-compile-base.h: update prototype
+ * backend/rust-compile-expr.cc (CompileExpr::visit): update borrow expr
+ * backend/rust-compile-extern.h: remove unused debug
+ * backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile): update usage
+ * hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): lower raw ref
+ * hir/tree/rust-hir-expr.cc (BorrowExpr::BorrowExpr): add flag for raw ref
+ * hir/tree/rust-hir-expr.h (class BorrowExpr): add new raw ref field
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): add handle for raw ref
+
+2025-04-08 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit): emit error
+
+2025-04-08 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-trait-resolve.cc (TraitResolver::resolve_trait): new argument
+ * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::TypeCheckBase): new helper
+ * typecheck/rust-hir-type-check-base.h: new helper prototype
+ * typecheck/rust-hir-type-check-implitem.cc (TypeCheckTopLevelExternItem::visit):
+ remove comment out code
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_root_path): check for null
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::resolve_root_path): likewise
+ (TypeResolveGenericParam::Resolve): new args
+ (TypeResolveGenericParam::ApplyAnyTraitBounds): new helper
+ (TypeResolveGenericParam::apply_trait_bounds): new field
+ (TypeResolveGenericParam::visit): update
+ * typecheck/rust-hir-type-check-type.h: new args
+ * typecheck/rust-hir-type-check.cc (TraitItemReference::get_type_from_fn): reuse helper
+ * typecheck/rust-type-util.cc (query_type): check for recursive query
+ * typecheck/rust-tyty-subst.cc (SubstitutionParamMapping::SubstitutionParamMapping):
+ remove const
+ (SubstitutionParamMapping::get_generic_param): likewise
+ * typecheck/rust-tyty-subst.h: likewise
+ * typecheck/rust-tyty-variance-analysis.cc (GenericTyVisitorCtx::process_type): likewise
+
+2025-04-08 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-base.cc: new flag is_root_item
+ * backend/rust-compile-base.h: update prototype
+ * backend/rust-compile-implitem.cc (CompileTraitItem::visit): update call
+ * backend/rust-compile-implitem.h: remove old debug internal error
+ * backend/rust-compile-item.cc (CompileItem::visit): update call
+ * backend/rust-compile-item.h: remove old debug
+ * backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile): update calls
+ * backend/rust-compile.cc: likewise
+ * typecheck/rust-hir-trait-resolve.cc (TraitResolver::resolve_path_to_trait):
+ remove assertion and error
+
+2025-04-08 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-base.cc: remove assertion
+
+2025-04-08 Philip Herron <herron.philip@googlemail.com>
+
+ * rust-gcc.cc (arithmetic_or_logical_expression): unwrap const decls
+
+2025-04-08 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-forever-stack.h
+ (ForeverStack::ForeverStack): Initialize extern_prelude.
+ (ForeverStack::resolve_path): Add parameter
+ has_opening_scope_resolution.
+ (ForeverStack::extern_prelude): Add field.
+ * resolve/rust-forever-stack.hxx: Include rust-edition.h.
+ (ForeverStacl::resolve_path): Handle global paths (paths with an
+ opening scope resolution operator).
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): Handle global paths.
+ * resolve/rust-name-resolution-context.h
+ (NameResolutionContext::resolve_path): Handle global paths.
+
+2025-04-08 Ryutaro Okada <1015ryu88@gmail.com>
+
+ * backend/rust-compile-resolve-path.cc: Evaluate the enum's discriminant in a const context
+
+2025-03-31 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::resolve_root_path):
+ catch nullptr root_tyty
+
+2025-03-31 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::parse_repr_options):
+ check for null and empty and add missing delete call
+
+2025-03-31 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-tyty-subst.h: check for min range
+
+2025-03-31 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::parse_repr_options): check for input
+
+2025-03-31 Philip Herron <herron.philip@googlemail.com>
+
+ * hir/rust-hir-dump.cc (Dump::visit): check has type
+ * hir/tree/rust-hir-type.cc (BareFunctionType::BareFunctionType): likewise
+
+2025-03-31 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-constexpr.cc (eval_store_expression): turn this back on
+
+2025-03-31 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * expand/rust-macro-builtins-log-debug.cc:
+ Add newline to end of file.
+
+2025-03-31 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-forever-stack.h
+ (ForeverStack::get_prelude): Rename to...
+ (ForeverStack::get_lang_prelude): ...here.
+ (ForeverStack::prelude): Rename to...
+ (ForeverStack::lang_prelude): ...here.
+ (ForeverStack::ForeverStack): Handle renames.
+ * resolve/rust-forever-stack.hxx
+ (ForeverStack::push_inner): Likewise.
+ (ForeverStack::resolve_segments): Likewise.
+ (ForeverStack::resolve_path): Likewise.
+ (ForeverStack::get_prelude): Rename to...
+ (ForeverStack::get_lang_prelude): ...here and handle renames.
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): Handle renames.
+
+2025-03-31 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-context.h: only push named types
+ * backend/rust-compile-type.cc (TyTyResolveCompile::visit): run the type hasher
+
+2025-03-31 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile): check for Expr trait
+ * hir/rust-hir-dump.cc (Dump::visit): expr is optional
+
+2025-03-31 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-forever-stack.hxx: Add a new specialized function
+ to retrieve the last "real" segment depending on the namespace.
+ * resolve/rust-forever-stack.h: Add new function prototype.
+ * resolve/rust-early-name-resolver-2.0.cc (Early::finalize_rebind_import):
+ Set declared name according to the selected segment, if there is a self
+ suffix in the use declaration then select the previous segment.
+
+2025-03-31 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-base.cc (HIRCompileBase::unit_expression): pass ctx
+ * backend/rust-compile-base.h: cant be static
+ * backend/rust-compile-intrinsic.cc (try_handler_inner): pass ctx
+ * backend/rust-compile-type.cc
+ (TyTyResolveCompile::get_unit_type): update to grab the first locus
+ (TyTyResolveCompile::visit): pass ctx
+ * backend/rust-compile-type.h: likewise
+
+2025-03-31 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-dot-operator.cc:
+
+2025-03-31 Philip Herron <herron.philip@googlemail.com>
+
+ * resolve/rust-ast-resolve-path.cc (ResolvePath::resolve_path): check for super mid path
+
+2025-03-31 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-base.cc (HIRCompileBase::address_expression): new helper constexpr
+ * backend/rust-compile-base.h: prototype
+ * backend/rust-compile-type.cc (TyTyResolveCompile::visit): call constexpr helper
+
+2025-03-31 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::resolve_impl_block_substitutions):
+ Track the polarity
+ * typecheck/rust-tyty-bounds.cc (TypeBoundPredicate::validate_type_implements_this):
+ new validator
+ * typecheck/rust-tyty.h: new prototypes
+
+2025-03-31 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::array_value_expr): add value chk for array expr
+
+2025-03-31 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-trait-reference.h: add default infer arg
+ * typecheck/rust-hir-trait-resolve.cc: dont add new infer vars
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_segments): dont infer
+
+2025-03-31 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * checks/errors/rust-ast-validation.cc
+ (ASTValidation::visit): Allow constant items lacking expressions
+ if and only if they're associated with a trait definition, not a
+ trait implementation.
+
+2025-03-31 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * hir/rust-ast-lower-base.cc
+ (ASTLoweringBase::lower_literal): Lower raw string literals into
+ normal string literals.
+
+2025-03-31 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * checks/errors/borrowck/ffi-polonius/Cargo.lock: Regenerate.
+ * checks/errors/borrowck/ffi-polonius/Cargo.toml: Update to use source patching instead of
+ vendoring, lower edition to 2018.
+ * checks/errors/borrowck/ffi-polonius/vendor/log/Cargo.toml: Change edition to 2018.
+ * checks/errors/borrowck/ffi-polonius/vendor/log/src/lib.rs: Remove uses of unstable
+ feature.
+ * checks/errors/borrowck/ffi-polonius/.cargo/config.toml: Removed.
+
+2025-03-31 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * hir/tree/rust-hir-stmt.h (class LetStmt): Add optional diverging else expression.
+ * hir/tree/rust-hir-stmt.cc: Likewise.
+ * hir/rust-ast-lower-stmt.cc (ASTLoweringStmt::visit): Add handling for lowering
+ diverging else.
+
+2025-03-31 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-ast-resolve-stmt.h: Add handling for diverging else.
+ * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Likewise.
+
+2025-03-31 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Add handling for diverging else
+ expression.
+
+2025-03-31 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * parse/rust-parse-impl.h (Parser::parse_let_stmt): Add new parsing in case of `else` token.
+
+2025-03-31 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-stmt.h (class LetStmt): Add optional expression for diverging else.
+ * ast/rust-ast-builder.cc (Builder::let): Use new API.
+
+2025-03-26 Iain Sandoe <iain@sandoe.co.uk>
+
+ * metadata/rust-export-metadata.cc
+ (PublicInterface::write_to_path): Use 'lbasename()' instead of
+ 'basename()'.
+
+2025-03-24 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-path-probe.cc: update call
+ * typecheck/rust-hir-trait-reference.cc (TraitReference::lookup_trait_item): track predicate
+ (TraitReference::is_equal): likewise
+ (TraitReference::is_object_safe): likewise
+ (TraitReference::satisfies_bound): likewise
+ * typecheck/rust-hir-trait-reference.h: likewise
+ * typecheck/rust-hir-trait-resolve.cc (TraitResolver::resolve_trait): likewise
+ * typecheck/rust-tyty-bounds.cc (TypeBoundPredicate::TypeBoundPredicate): track super traits
+ (TypeBoundPredicate::operator=): likewise
+ (TypeBoundPredicate::apply_generic_arguments): ensure we apply to super predicates
+ (TypeBoundPredicateItem::operator=): take copy of parent predicate
+ (TypeBoundPredicateItem::error): pass error instead of nullptr
+ (TypeBoundPredicateItem::is_error): update to no longer check for nullptr
+ (TypeBoundPredicateItem::get_parent): updated
+ (TypeBoundPredicateItem::get_tyty_for_receiver): likewise
+ (TypeBoundPredicate::get_associated_type_items): likewise
+ * typecheck/rust-tyty-bounds.h (class TypeBoundPredicateItem): move
+ * typecheck/rust-tyty-subst.cc: flag to handle placeholder Self on traits
+ * typecheck/rust-tyty-subst.h (class TypeBoundPredicateItem): likewise
+ * typecheck/rust-tyty.h (class TypeBoundPredicateItem): refactored
+
+2025-03-24 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): Add visitor for StructExprFieldIdentifier.
+ * resolve/rust-late-name-resolver-2.0.h
+ (Late::visit): Likewise.
+
+2025-03-24 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): Make sure to return early after a resolution
+ error, improve the resolution error message, fix a typo, handle
+ ambiguous resolutions, and remove an old comment.
+
+2025-03-24 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-ast-resolve-expr.cc
+ (ResolveExpr::visit): Modify error message.
+ * resolve/rust-ast-resolve-implitem.h
+ (ResolveToplevelImplItem::visit): Likewise.
+ (ResolveTopLevelTraitItems::visit): Likewise.
+ (ResolveToplevelExternItem::visit): Likewise.
+ * resolve/rust-ast-resolve-stmt.cc
+ (ResolveStmt::visit): Likewise.
+ * resolve/rust-ast-resolve-stmt.h
+ (ResolveStmt::visit): Likewise.
+ * resolve/rust-ast-resolve-toplevel.h
+ (ResolveTopLevel::visit): Likewise.
+ * resolve/rust-ast-resolve-type.h
+ (ResolveGenericParams::visit): Likewise.
+
+2025-03-24 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-ast-visitor.cc
+ (DefaultASTVisitor::visit): Make sure to always visit the struct
+ name.
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): Avoid visiting the struct name twice.
+
+2025-03-24 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * expand/rust-derive-clone.cc
+ (DeriveClone::clone_impl): Avoid using the same node id multiple
+ times.
+ (DeriveClone::clone_enum_identifier): Likewise.
+ (DeriveClone::clone_enum_tuple): Likewise.
+ * expand/rust-derive-copy.cc
+ (DeriveCopy::copy_impl): Likewise.
+ * resolve/rust-ast-resolve-item.cc
+ (flatten_list): Likewise.
+ * resolve/rust-ast-resolve-path.cc
+ (ResolvePath::resolve_path): Prevent reinsertion of resolutions.
+ * resolve/rust-ast-resolve-type.cc
+ (ResolveRelativeTypePath::go): Likewise.
+ * typecheck/rust-hir-type-check-expr.cc
+ (TypeCheckExpr::resolve_fn_trait_call): Likewise.
+ * resolve/rust-name-resolver.cc
+ (Resolver::insert_resolved_name): Catch multiple resolution
+ insertions.
+ (Resolver::insert_resolved_type): Likewise.
+
+2025-03-24 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-ast-resolve-path.cc
+ (ResolvePath::resolve_path): Adjust the error message for a lower
+ self segment in the middle of a path.
+ * resolve/rust-ast-resolve-type.cc
+ (ResolveRelativeTypePath::go): Likewise.
+
+2025-03-24 Ryutaro Okada <1015ryu88@gmail.com>
+
+ * typecheck/rust-hir-type-check-implitem.cc (TypeCheckTopLevelExternItem::visit):
+ emit an error for type or const parameters on foreign items
+
+2025-03-24 Liam Naddell <liamnprg@gmail.com>
+
+ * resolve/rust-forever-stack.h (ForeverStack): Add a dedicated prelude node for
+ the Language prelude
+ * resolve/rust-forever-stack.hxx (ForeverStack): Add support code for the
+ prelude node
+ * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Move
+ language prelude builtins to the prelude context
+ * resolve/rust-name-resolution-context.cc
+ (NameResolutionContext::scoped): Add code for handling
+ the prelude corner case
+ * resolve/rust-rib.h (Rib::Kind): Add a special Prelude rib type
+
+2025-03-24 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-forever-stack.hxx: Fix the id comparison.
+
+2025-03-24 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-forever-stack.hxx: Insert a new segment with the crate's
+ name as canonical's path prefix.
+
+2025-03-24 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * util/rust-hir-map.cc (Mappings::lookup_crate_num): Add function to
+ retrieve crate number from it's node id.
+ (Mappings::node_is_crate): change function with call to
+ lookup_crate_num to avoid looping through all crates.
+ (Mappings::insert_ast_crate): Populate node id to crate number map.
+ * util/rust-hir-map.h: Change function prototype.
+
+2025-03-24 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-finalize-imports-2.0.cc (FinalizeImports::FinalizeImports):
+ Remove constructor.
+ (FinalizeImports::go): Remove function.
+ (FinalizeImports::visit): Likewise.
+ * resolve/rust-finalize-imports-2.0.h (class FinalizeImports): Remove
+ FinalizeImports class.
+
+2025-03-24 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-early-name-resolver-2.0.cc (Early::Early): Move the
+ top level visitor from the function scope to attributes.
+ (Early::go): Remove top level visitor creation and adapt calling code.
+ Remove call to mapping resolution and import finalization.
+ (Early::finalize_simple_import): Move the finalization from it's
+ visitor.
+ (Early::finalize_glob_import): Likewise.
+ (Early::finalize_rebind_import): Likewise.
+ (Early::visit): Add mapping resolution and finalization in
+ UseDeclaration visitor function.
+ * resolve/rust-finalize-imports-2.0.cc (finalize_simple_import): Move
+ function.
+ (finalize_glob_import): Likewise.
+ (finalize_rebind_import): Likewise.
+ (FinalizeImports::visit): Remove call to finalizers.
+ * resolve/rust-early-name-resolver-2.0.h (class Early): Add top level
+ attribute.
+ * resolve/rust-finalize-imports-2.0.h: Add function prototypes.
+ * resolve/rust-toplevel-name-resolver-2.0.h: Change getter return type
+ to reference.
+
+2025-03-24 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-trait-resolve.cc (TraitResolver::ResolveHirItem): new helper
+ * typecheck/rust-hir-trait-resolve.h: add helper prototype
+ * typecheck/rust-type-util.cc (query_type): add debug
+ * typecheck/rust-tyty-bounds.cc (TypeBoundsProbe::scan): check for recursion
+ * typecheck/rust-tyty.cc (VariantDef::is_equal): fix is equal check
+
+2025-03-24 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): track DefId of origin
+ * typecheck/rust-tyty.cc (BaseType::monomorphized_clone): likewise
+ (ADTType::ADTType): likewise
+ (ADTType::get_id): likewise
+ (ADTType::clone): likewise
+ * typecheck/rust-tyty.h: likewise
+
+2025-03-24 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-resolve-path.cc (ResolvePathRef::Compile): remove visitor
+ (ResolvePathRef::ResolvePathRef): likewise
+ (ResolvePathRef::visit): likewise
+ * backend/rust-compile-resolve-path.h (class ResolvePathRef): likewise
+
+2025-03-24 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * backend/rust-compile-intrinsic.cc
+ (assume_handler): Fix copy/paste error.
+ * typecheck/rust-hir-type-check-pattern.cc
+ (TypeCheckPattern::visit): Fix spelling mistake.
+
+2025-03-24 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-rib.cc (Rib::Definition::to_string): Add enum variant
+ status.
+
+2025-03-24 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-forever-stack.h: Add new function to insert enum
+ variants and add argument to resolver's get function to explicitely
+ skip enum variants.
+ * resolve/rust-forever-stack.hxx: Update function
+ definitions.
+ * resolve/rust-name-resolution-context.cc (NameResolutionContext::insert_variant):
+ Add function to insert enum variants.
+ * resolve/rust-name-resolution-context.h: Add function's prototype.
+ * resolve/rust-rib.cc (Rib::Definition::Definition): Add new boolean to
+ hint at enum variant provenance.
+ (Rib::Definition::is_variant): New getter for variant status.
+ (Rib::Definition::Shadowable): Update constructor to opt out of enum
+ variants.
+ (Rib::Definition::Globbed): Likewise.
+ (Rib::Definition::NonShadowable): Change constructor to forward enum
+ variant provenance status.
+ * resolve/rust-rib.h: Update function prototypes.
+ * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::insert_enum_variant_or_error_out):
+ Add function to insert enum variants in the name resolver.
+ (TopLevel::visit): Update several enum variant's visitor function
+ with the new enum variant name resolving code.
+ * resolve/rust-toplevel-name-resolver-2.0.h: Update function
+ prototypes.
+
+2025-03-24 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-forever-stack.hxx: Output rib kind.
+ * resolve/rust-rib.h: Add function to get string representation from
+ a rib kind.
+
+2025-03-24 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-forever-stack.h
+ (ForeverStack::ForeverStack): Set the node id of the root node
+ to that of the current crate.
+ * resolve/rust-forever-stack.hxx
+ (ForeverStack::find_starting_point): Use the node id of the root
+ node during resolution of crate segments.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-macro-expand.cc: Use new SubstituteCtx API.
+ * expand/rust-macro-expand.h: Likewise.
+ * expand/rust-macro-substitute-ctx.cc: Implement proper expansion of $crate.
+ * expand/rust-macro-substitute-ctx.h: Adapt APIs to take macro definition when
+ substituting.
+ * util/rust-hir-map.cc (Mappings::insert_macro_def): Store crate information when
+ inserting macro definition in mappings.
+ (Mappings::lookup_macro_def_crate): New.
+ * util/rust-hir-map.h: Adapt mappings to store crate in which macros were defined.
+
+2025-03-24 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): Call DefaultResolver::visit earlier, in order to
+ ensure it is called even if Late::visit returns early.
+
+2025-03-24 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * util/rust-edition.cc: New file.
+ * util/rust-edition.h: New file.
+ * Make-lang.in: Add rust-edition.o to the object list.
+ * ast/rust-pattern.cc: Remove inclusion of
+ rust-session-manager.h.
+ * expand/rust-macro-expand.cc: Likewise.
+ * expand/rust-macro-builtins-helpers.h: Likewise.
+ * expand/rust-macro-builtins-include.cc: Include
+ rust-session-manager.h.
+ * expand/rust-macro-builtins-utility.cc: Likewise.
+ * lex/rust-lex.cc: Include rust-edition.h instead of
+ rust-session-manager.h.
+ (Lexer::classify_keyword): Use get_rust_edition instead of
+ Session and CompileOptions.
+ * parse/rust-parse-impl.h: Include rust-edition.h instead of
+ rust-session-manager.h.
+ (Parser::parse_async_item): Use get_rust_edition instead of
+ Session and CompileOptions.
+ * checks/errors/rust-feature.h: Include rust-edition.h instead
+ of rust-session-manager.h.
+ (class Feature): Use Rust::Edition instead of
+ Rust::CompileOptions::Edition.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust-session-manager.cc (Session::compile_crate): Call DesugarQuestionMark::go().
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * hir/rust-ast-lower-base.cc: Adapt functions for ErrorPropagationExpr and MacroInvocation.
+ * hir/rust-ast-lower-base.h: Mark them as final.
+ * hir/rust-ast-lower-expr.cc: Remove previous definition for those overrides.
+ * hir/rust-ast-lower-expr.h: Likewise.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * Make-lang.in: Compile it.
+ * ast/rust-desugar-question-mark.cc: New file.
+ * ast/rust-desugar-question-mark.h: New file.
+
+2025-03-24 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-early-name-resolver-2.0.cc
+ (Early::visit): Adjust error produced when macro resolution
+ fails.
+ * resolve/rust-early-name-resolver.cc
+ (EarlyNameResolver::visit): Likewise.
+
+2025-03-24 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-forever-stack.hxx
+ (ForeverStack::find_starting_point): Stop when hitting a lang
+ item segment.
+ (ForeverStack::resolve_segments): Resolve lang item segments.
+ (ForeverStacl::resolve_path): Handle single segment lang item
+ paths and add comment.
+ * util/rust-unwrap-segment.cc
+ (unwrap_segment_get_lang_item): Add.
+ * util/rust-unwrap-segment.h
+ (unwrap_segment_get_lang_item): Add.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-expand-visitor.cc (ExpandVisitor::visit): Correctly visit the generic args
+ of a generic type path segment.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-early-name-resolver.cc: Remove definitions.
+ * resolve/rust-early-name-resolver.h: Remove declarations.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * hir/rust-ast-lower-base.cc (ASTLoweringBase::visit): Add base implementation
+ for visitor.
+
+2025-03-24 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-early-name-resolver-2.0.cc:
+ Include rust-attribute-values.h.
+ (Early::visit): If a module has a macro_use attribute, avoid
+ pushing a new textual macro scope.
+
+2025-03-24 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-ast-resolve-type.cc
+ (ResolveRelativeTypePath::go): Adjust error message to match
+ the 2.0 name resolver.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * hir/rust-hir-dump.cc: Check unique_ptr members are present before
+ visiting them.
+ * hir/tree/rust-hir-path.h: Add `has_{type, trait}` methods to
+ QualifiedPathInType.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * Make-lang.in: Compile it.
+ * expand/rust-derive.cc (DeriveVisitor::derive): Call it.
+ * expand/rust-derive-hash.cc: New file.
+ * expand/rust-derive-hash.h: New file.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-debug.cc (ptrify): Remove function.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-builder.cc (Builder::statementify): New.
+ (Builder::function): Add generic params optional argument.
+ (Builder::path_in_expression): Add opening_scope_resolution optional argument.
+ (Builder::block): Add function for creating empty blocks.
+ (Builder::generic_type_param): New.
+ * ast/rust-ast-builder.h (ptrify): New.
+
+2025-03-24 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-ast.h
+ (SingleASTNode::take_trait_item): Remove.
+ (SingleASTNode::take_impl_item): Remove.
+ (SingleASTNode::take_trait_impl_item): Remove.
+ * expand/rust-expand-visitor.cc
+ (ExpandVisitor::visit): Replace calls to aforementioned
+ functions with calls to SingleASTNode::take_assoc_item.
+
+2025-03-24 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * expand/rust-expand-visitor.cc
+ (ExpandVisitor::visit): Override DefaultASTVisitor in order to
+ expand a module's items, rather than directly visit them.
+ * expand/rust-expand-visitor.h
+ (ExpandVisitor::visit): Add override.
+
+2025-03-24 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-path.h
+ (PathInExpression::get_pattern_node_id): Remove.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-eq.cc: Copy `Eq` typepath.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-eq.cc: Adapt functions to return two generated impls.
+ * expand/rust-derive-eq.h: Likewise.
+ * expand/rust-derive.cc (DeriveVisitor::derive): Likewise.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-partial-eq.cc: Adapt signatures to generate two impls.
+ * expand/rust-derive-partial-eq.h: Likewise.
+ * expand/rust-derive.cc (DeriveVisitor::derive): Adapt to multiple item generation.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive.cc (DeriveVisitor::derive): Return a vector of items.
+ * expand/rust-derive.h: Change return type.
+ * expand/rust-expand-visitor.cc: Insert all generated items into the AST.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-partial-eq.cc: New file.
+ * expand/rust-derive-partial-eq.h: New file.
+ * expand/rust-derive.cc (DeriveVisitor::derive): Call them.
+ * Make-lang.in: Compile them.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-clone.cc: Cleanup implementation, avoid repetitions.
+ * expand/rust-derive-clone.h: Likewise.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-builder.cc (Builder::literal_bool): New method.
+ (Builder::comparison_expr): Likewise.
+ (Builder::boolean_operation): Likewise.
+ * ast/rust-ast-builder.h: Declare them.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-builder.cc (Builder::block): Change return type.
+ (Builder::loop): Use new APIs.
+ * ast/rust-ast-builder.h: Change return type of block functions.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive.cc (DeriveVisitor::derive): Call into DeriveEq.
+ * expand/rust-derive-eq.cc: New file.
+ * expand/rust-derive-eq.h: New file.
+ * Make-lang.in: Compile them.
+
+2025-03-24 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): When visiting a PathInExpression instance, call
+ into DefaultResolver::visit, ensuring generic arguments are
+ visited.
+
+2025-03-24 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-toplevel-name-resolver-2.0.cc
+ (TopLevel::visit): When visiting an external crate declaration,
+ handle failed crate name lookups. This can happen when
+ Session::load_extern_crate fails to load a crate during the
+ CfgStrip phase.
+
+2025-03-24 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-forever-stack.hxx
+ (ForeverStack::resolve_segments): Add comments explaining
+ the behaviour of a while loop.
+
+2025-03-24 Benjamin Thos <benjamin.thos@epita.fr>
+
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit):
+ Add check on if-expr.
+
+2025-03-24 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-forever-stack.hxx
+ (ForeverStack::find_starting_point): Be more careful about
+ applying ForeverStack::find_closest_module.
+ (ForeverStack::resolve_segments): Allow traversal into parent
+ nodes when not in a module node or root node, which
+ ForeverStack::find_starting_point previously made moot through
+ use of ForeverStack::find_closest_module. Also, when a child
+ node lookup fails when resolving in the type namespace, attempt
+ a rib lookup as a fallback.
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): Avoid throwing a resolution error for type paths
+ when the typechecker may be able to finish the resolution. Also,
+ throw an error when a resolution is ambiguous.
+
+2025-03-24 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-type.cc (TyTyResolveCompile::visit): new tyty::OpaqueType
+ * backend/rust-compile-type.h: likewise
+ * checks/errors/borrowck/rust-bir-fact-collector.h: likewise
+ * checks/errors/borrowck/rust-bir-place.h: likewise
+ * checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::check_base_type_privacy):
+ likewise
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit): likewise
+ * typecheck/rust-hir-type-check-type.h: likewise
+ * typecheck/rust-substitution-mapper.cc (SubstMapperInternal::visit): likewise
+ * typecheck/rust-substitution-mapper.h: likewise
+ * typecheck/rust-tyty-bounds.cc (TypeBoundsProbe::assemble_sized_builtin): likewise
+ * typecheck/rust-tyty-call.h: likewise
+ * typecheck/rust-tyty-cmp.h (class OpaqueCmp): likewise
+ * typecheck/rust-tyty-variance-analysis-private.h: likewise
+ * typecheck/rust-tyty-visitor.h: likewise
+ * typecheck/rust-tyty.cc (TypeKindFormat::to_string): likewise
+ (BaseType::is_unit): likewise
+ (BaseType::destructure): likewise
+ (BaseType::has_substitutions_defined): likewise
+ (BaseType::needs_generic_substitutions): likewise
+ (OpaqueType::OpaqueType): likewise
+ (OpaqueType::can_resolve): likewise
+ (OpaqueType::accept_vis): likewise
+ (OpaqueType::as_string): likewise
+ (OpaqueType::get_name): likewise
+ (OpaqueType::can_eq): likewise
+ (OpaqueType::clone): likewise
+ (OpaqueType::resolve): likewise
+ (OpaqueType::is_equal): likewise
+ (OpaqueType::handle_substitions): likewise
+ * typecheck/rust-tyty.h (enum TypeKind): likewise
+ (class OpaqueType): likewise
+ * typecheck/rust-unify.cc (UnifyRules::go): likewise
+ (UnifyRules::expect_inference_variable): likewise
+ (UnifyRules::expect_adt): likewise
+ (UnifyRules::expect_str): likewise
+ (UnifyRules::expect_reference): likewise
+ (UnifyRules::expect_pointer): likewise
+ (UnifyRules::expect_param): likewise
+ (UnifyRules::expect_array): likewise
+ (UnifyRules::expect_slice): likewise
+ (UnifyRules::expect_fndef): likewise
+ (UnifyRules::expect_fnptr): likewise
+ (UnifyRules::expect_tuple): likewise
+ (UnifyRules::expect_bool): likewise
+ (UnifyRules::expect_char): likewise
+ (UnifyRules::expect_int): likewise
+ (UnifyRules::expect_uint): likewise
+ (UnifyRules::expect_float): likewise
+ (UnifyRules::expect_isize): likewise
+ (UnifyRules::expect_usize): likewise
+ (UnifyRules::expect_placeholder): likewise
+ (UnifyRules::expect_projection): likewise
+ (UnifyRules::expect_dyn): likewise
+ (UnifyRules::expect_opaque): likewise
+ * typecheck/rust-unify.h: likewise
+
+2025-03-24 Philip Herron <herron.philip@googlemail.com>
+
+ * checks/errors/borrowck/rust-bir-builder-struct.h: remove HIR::ImplTraitTypeOneBound
+ * checks/errors/borrowck/rust-function-collector.h: likewise
+ * checks/errors/rust-const-checker.cc (ConstChecker::visit): likewise
+ * checks/errors/rust-const-checker.h: likewise
+ * checks/errors/rust-hir-pattern-analysis.cc (PatternChecker::visit): likewise
+ * checks/errors/rust-hir-pattern-analysis.h: likewise
+ * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): likewise
+ * checks/errors/rust-unsafe-checker.h: likewise
+ * hir/rust-ast-lower-type.cc (ASTLoweringType::translate): likewise
+ (ASTLoweringType::visit): likewise
+ * hir/rust-ast-lower-type.h: cleanup
+ * hir/rust-hir-dump.cc (Dump::visit): remove ImplTraitTypeOneBound
+ * hir/rust-hir-dump.h: likewise
+ * hir/tree/rust-hir-full-decls.h (class ImplTraitTypeOneBound): likewise
+ * hir/tree/rust-hir-type.h (class ImplTraitTypeOneBound): likewise
+ * hir/tree/rust-hir-visitor.h: likewise
+ * hir/tree/rust-hir.cc (ImplTraitTypeOneBound::as_string): likewise
+ (ImplTraitTypeOneBound::accept_vis): likewise
+ * resolve/rust-ast-resolve-type.cc (ResolveType::go): likewise
+ (ResolveType::visit): likewise
+ * resolve/rust-ast-resolve-type.h: add name resolution
+ * typecheck/rust-hir-type-check-type.h: likewise
+
+2025-03-24 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): improve error diag
+
+2025-03-24 Philip Herron <herron.philip@googlemail.com>
+
+ * hir/rust-ast-lower-base.cc (ASTLoweringBase::lower_self): add location mappings
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_root_path): check for self
+
+2025-03-24 Philip Herron <herron.philip@googlemail.com>
+
+ * resolve/rust-ast-resolve-item.cc (ResolveTraitItems::visit): use new api
+ (ResolveItem::visit): likewise
+ (ResolveExternItem::visit): likewise
+ * resolve/rust-ast-resolve-stmt.h: likewise
+ * resolve/rust-ast-resolve-type.h (class ResolveGenericParam): remove
+ (class ResolveGenericParams): added new api
+
+2025-03-24 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-base.cc (walk_types_to_constrain): recursive walker
+ * typecheck/rust-tyty.cc (BaseType::get_subst_argument_mappings): new helper
+ * typecheck/rust-tyty.h: prototype
+
+2025-03-24 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-base.h: add flag
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit): likewise
+ * typecheck/rust-tyty-bounds.cc: new diagnostic
+
+2025-03-24 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit): remove name resolution info
+ (TypeCheckType::resolve_root_path): likewise
+ * typecheck/rust-hir-type-check-type.h: likewise
+
+2025-03-24 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-type.cc (TyTyResolveCompile::get_implicit_enumeral_node_type):
+ use repr
+ (TyTyResolveCompile::visit): update prototype
+ * backend/rust-compile-type.h: likewise
+
+2025-03-24 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-intrinsic.cc (variant_count_handler): new intrinsic
+
+2025-03-24 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-intrinsic.cc (discriminant_value_handler): new handler
+ * typecheck/rust-hir-trait-resolve.cc (TraitItemReference::resolve_item): track the defid
+ * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::parse_repr_options): default isize
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): special case CallExpr
+ * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): parse repr options enum
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit): remove bad diagnostic
+ * typecheck/rust-tyty.cc (PlaceholderType::PlaceholderType): track defid
+ (PlaceholderType::clone): likewise
+ (PlaceholderType::get_def_id): likeiwse
+ * typecheck/rust-tyty.h: placeholder track defid
+ * util/rust-lang-item.cc: add new lang items
+ * util/rust-lang-item.h: likewise
+
+2025-03-24 GS-GOAT <86884129+GS-GOAT@users.noreply.github.com>
+
+ * typecheck/rust-autoderef.cc
+ (insert_implicit_type): Update single-parameter call to
+ pass explicit HirId.
+ * typecheck/rust-hir-type-check-expr.cc: Same.
+ * typecheck/rust-hir-type-check-pattern.cc: Same.
+ * typecheck/rust-hir-type-check.h: Removed call
+ to the duplicate interface.
+ * typecheck/rust-typecheck-context.cc
+ (TypeCheckContext::insert_implicit_type): Removed the
+ interface with no HirId field.
+
+2025-03-24 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-tyty-subst.cc (SubstitutionRef::monomorphize): remove diagnostic
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust-session-manager.cc (Session::compile_crate): Call the visitor.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-desugar-for-loops.cc: New file.
+ * ast/rust-desugar-for-loops.h: New file.
+ * hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Make lowering of for-loops an
+ unreachable.
+ * Make-lang.in: Compile it.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-builder.h: Mark all arguments as &&.
+ * ast/rust-ast-builder.cc (Builder::let): Likewise.
+
+2025-03-24 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * util/rust-unwrap-segment.cc: New file.
+ * util/rust-unwrap-segment.h: New file.
+ * Make-lang.in: Add rust-unwrap-segment.o to the object list.
+ * resolve/rust-forever-stack.hxx: Include rust-unwrap-segment.h.
+ (ForeverStack::find_starting_point): Use unwrap_type_segment.
+ (ForeverStack::resolve_segments): Likewise.
+ (ForeverStack::resolve_path): Likewise.
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): Resolve type paths using
+ NameResolutionContext::resolve_path.
+ * resolve/rust-name-resolution-context.h
+ (NameResolutionContext::resolve_path): Use
+ unwrap_segment_node_id.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-macro-builtins-asm.cc (strip_double_quotes): Special case empty
+ strings ("\"\"").
+ (parse_reg_operand): Remove use of the `struct` keyword.
+ (parse_reg_operand_in): Likewise.
+ (parse_reg_operand_out): Likewise.
+ * expand/rust-macro-builtins.cc: Add llvm_asm! built-in macro as an alias to asm!.
+
+2025-03-24 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Add
+ warning about current code.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive.cc (DeriveVisitor::derive): Call DeriveDefault.
+ * expand/rust-derive-default.cc: New file.
+ * expand/rust-derive-default.h: New file.
+ * Make-lang.in: Compile them.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-builder.cc (Builder::qualified_path_in_expression): New.
+ (Builder::function): Change the return type.
+ * ast/rust-ast-builder.h: Declare qualified_path_in_expression functions.
+ * expand/rust-derive-debug.cc (DeriveDebug::stub_debug_fn): Adapt to new APIs.
+
+2025-03-24 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::visit): remove receiver interface
+ * backend/rust-compile-item.cc (CompileItem::visit): monomorphize trait to impl item
+ * backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile): use trait item Self
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): remove receiver interface
+ (TypeCheckExpr::resolve_fn_trait_call): likewise
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::visit): likewise
+ (TypeCheckExpr::resolve_segments): likewise
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit): likewise
+ * typecheck/rust-hir-type-check.h: likewise
+ * typecheck/rust-typecheck-context.cc (TypeCheckContext::insert_receiver): remove
+ (TypeCheckContext::lookup_receiver): remove
+
+2025-03-24 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-substitution-mapper.cc (SubstMapperInternal::visit):
+ continue on for trait item mode.
+
+2025-03-24 Philip Herron <herron.philip@googlemail.com>
+
+ * checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::check_base_type_privacy):
+ Add guard for placeholder
+
+2025-03-24 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-type-util.cc (coercion_site): allow inference vars
+
+2025-03-24 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-path-probe.cc (PathProbeType::visit): remove assertion
+
+2025-03-24 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-tyty.cc (ClosureType::setup_fn_once_output): add checks for lang items
+
+2025-03-24 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-early-name-resolver-2.0.cc
+ (Early::resolve_glob_import): Use
+ NameResolutionContext::resolve_path instead of
+ ForeverStack::resolve_path.
+ (Early::visit): Likewise.
+ (Early::visit_attributes): Likewise.
+ * resolve/rust-early-name-resolver-2.0.h
+ (Early::resolve_path_in_all_ns): Likewise.
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): Likewise, insert segment resolutions not
+ handled by NameResolutionContext::resolve_path, and avoid throwing
+ an error when path resolution could be finished by the typechecker.
+ * resolve/rust-name-resolution-context.h
+ (NameResolutionContext::resolve_path): Add.
+ * typecheck/rust-hir-type-check-path.cc
+ (TypeCheckExpr::resolve_root_path): Use segment node ids instead
+ of the path node id to look up segment resolutions when using
+ the 2.0 resolver, as is done with the 1.0 resolver.
+ * typecheck/rust-hir-type-check-type.cc
+ (TypeCheckType::resolve_root_path): Likewise.
+ * resolve/rust-forever-stack.h
+ (ForeverStack::resolve_path): Add callback parameter for
+ inserting segment resolutions.
+ (ForeverStack::find_starting_point): Likewise.
+ (ForeverStack::resolve_segments): Likewise.
+ * resolve/rust-forever-stack.hxx
+ (ForeverStack::find_starting_point): Likewise.
+ (ForeverStack::resolve_segments): Likewise.
+ (ForeverStack::resolve_path): Likewise and avoid resolving
+ inside TraitOrImpl ribs.
+
+2025-03-24 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * backend/rust-compile-expr.cc
+ (CompileExpr::generate_closure_function): Take
+ NameResolutionContext by reference instead of by value.
+ * backend/rust-compile-item.cc
+ (CompileItem::visit): Likewise.
+ * backend/rust-compile-resolve-path.cc
+ (ResolvePathRef::resolve): Likewise.
+ * checks/lints/rust-lint-marklive.cc
+ (MarkLive::find_ref_node_id): Likewise.
+ * typecheck/rust-hir-type-check-enumitem.cc
+ (TypeCheckEnumItem::visit): Likewise.
+ * typecheck/rust-hir-type-check-implitem.cc
+ (TypeCheckImplItem::visit): Likewise.
+ * typecheck/rust-hir-type-check-item.cc
+ (TypeCheckItem::visit): Likewise.
+ * typecheck/rust-hir-type-check-path.cc
+ (TypeCheckExpr::resolve_root_path): Likewise.
+ * typecheck/rust-hir-type-check-type.cc
+ (TypeCheckType::resolve_root_path): Likewise.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-builder.h: Declare it.
+ * ast/rust-ast-builder.cc (Builder::return_expr): Define it.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-debug.cc: New file.
+ * expand/rust-derive-debug.h: New file.
+ * Make-lang.in: Compile them.
+ * expand/rust-derive.cc (DeriveVisitor::derive): Call into DeriveDebug.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-clone.cc: Cleanup using DeriveVisitor::setup_impl_generics.
+ * expand/rust-derive-copy.cc: Likewise.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive.cc (DeriveVisitor::setup_impl_generics): New method.
+ * expand/rust-derive.h: Declare it, define DeriveVisitor::ImplGenerics struct.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-builder.cc: New methods.
+ * ast/rust-ast-builder.h: Declare them.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-builder.cc (Builder::type_path): New functions.
+ * ast/rust-ast-builder.h: Declare them.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * checks/lints/rust-lint-scan-deadcode.h: Check if the field name starts with an
+ underscore before warning.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-lang-item.cc: New items.
+ * util/rust-lang-item.h: Likewise.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Special case lang item paths.
+
+2025-03-24 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-forever-stack.hxx
+ (ForeverStack::dfs_rib): Fix const implementation.
+
+2025-03-24 Liam Naddell <liamnprg@gmail.com>
+
+ * expand/rust-macro-builtins-utility.cc: Add macro expansion for
+ option_env with eager expansion
+ * expand/rust-macro-builtins.cc: Add option_env to builtin list
+ * expand/rust-macro-builtins.h: Add option_env handler to header
+ file
+ * resolve/rust-late-name-resolver-2.0.cc: Prevent NR2.0 from
+ recursing into lang-item segments
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast.h: Add new Expr::Kinds.
+ * ast/rust-expr.h: Implement missing get_expr_kind(), Add get_function_expr_ptr()
+
+2025-03-24 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-pattern.cc (CompilePatternBindings::visit): make recursive
+ * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit): handle ref flag
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-lang-item.h: Declare it.
+ * util/rust-lang-item.cc: Use it.
+
+2025-03-24 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::visit): disable overflow checks
+ * lang.opt: new flag
+
+2025-03-24 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * backend/rust-compile-resolve-path.cc (ResolvePathRef::resolve): Do
+ not use query system for unit struct but compile it's constructor
+ instead.
+
+2025-03-24 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * typecheck/rust-hir-trait-resolve.cc (TraitResolver::resolve_path_to_trait):
+ Query all namespaces.
+
+2025-03-24 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-forever-stack.h: Make debug functions const.
+ * resolve/rust-forever-stack.hxx: Likewise.
+
+2025-03-24 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * typecheck/rust-hir-type-check-enumitem.cc (TypeCheckEnumItem::visit):
+ Clone expr instead of taking it.
+
+2025-03-24 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * backend/rust-compile-item.h: Remove query mode.
+ * backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile):
+ Likewise.
+
+2025-03-24 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-ast-resolve-toplevel.h: Add struct to name namespace.
+
+2025-03-24 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-name-resolver.h: Add new degug dump for old name
+ resolver.
+
+2025-03-24 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Change label
+ push function from type rib to label rib.
+ * resolve/rust-ast-resolve-item.cc (ResolveTraitItems::visit):
+ Likewise.
+ (ResolveItem::visit): Likewise.
+ (ResolveExternItem::visit): Likewise.
+ * resolve/rust-ast-resolve-stmt.h: Likewise.
+ * resolve/rust-ast-resolve.cc (NameResolution::go): Likewise.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * backend/rust-compile-resolve-path.cc (ResolvePathRef::visit): Call into
+ resolve_path_like instead.
+ (ResolvePathRef::resolve_path_like): New.
+ (ResolvePathRef::resolve): Call into resolve_with_node_id.
+ * backend/rust-compile-resolve-path.h: Declare new functions and document them.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-path.h: New function.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * checks/lints/rust-lint-marklive.cc (MarkLive::visit): Adapt to lang items.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * backend/rust-compile-resolve-path.cc (ResolvePathRef::visit): Adapt visitor to lang item
+ HIR::PathInExpressions.
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::visit): Likewise.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * hir/tree/rust-hir-path.h: Adapt PathPattern to accept lang-item paths.
+ * hir/tree/rust-hir-path.cc: Assert we are dealing with a segmented path, create lang-item
+ constructors.
+ * hir/tree/rust-hir.cc (PathPattern::convert_to_simple_path): Likewise.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Adapt visitor to lang item
+ PathInExpressions.
+ * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Likewise.
+ * expand/rust-cfg-strip.cc (CfgStrip::visit): Likewise.
+ * expand/rust-expand-visitor.cc (ExpandVisitor::visit): Likewise.
+ * hir/rust-ast-lower.cc (ASTLoweringExprWithBlock::visit): Likewise.
+ (ASTLowerPathInExpression::visit): Likewise.
+ * resolve/rust-ast-resolve-path.cc (ResolvePath::resolve_path): Likewise.
+ * resolve/rust-early-name-resolver.cc (EarlyNameResolver::visit): Likewise.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-lang-item.cc (LangItem::IsEnumVariant): New function.
+ * util/rust-lang-item.h: Declare it.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-hir-map.cc (Mappings::get_lang_item_node): Better formatting when a lang
+ item does not exist when it should.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-collect-lang-items.h: Declare visitor.
+ * ast/rust-collect-lang-items.cc (CollectLangItems::visit): New.
+
+2025-03-24 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile): add guard
+
+2025-03-24 Dylan Gardner <dylan@gardnermedia.com>
+
+ * rust-session-manager.cc (Session::handle_crate_name): Remove
+ crate name inference
+ (Session::compile_crate): Add crate name inference and error if
+ inferred name is empty. Remove CompileOptions::get_instance ()
+ that returned a local copy of the options. Rename
+ crate_name_changed to crate_name_found to match semantics.
+ (rust_crate_name_validation_test): Test inferring ".rs" name
+ * rust-session-manager.h: Modify handle_crate_name definition to
+ include filename.
+
+2025-03-24 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Add
+ ClosureExprInnerTyped visit implementation.
+ (add_captures): Add a function to avoid code duplication.
+ * resolve/rust-late-name-resolver-2.0.h: Add function prototype.
+
+2025-03-24 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Add environment
+ collection.
+ * resolve/rust-late-name-resolver-2.0.h: Add function prototype.
+ * resolve/rust-name-resolver.cc (Resolver::get_captures): Add assertion
+ to prevent NR2 usage with nr1 capture functions.
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Use
+ nr2 captures.
+ * util/rust-hir-map.cc (Mappings::add_capture): Add function to
+ register capture for a given closure.
+ (Mappings::lookup_captures): Add a function to lookup all captures
+ available for a given closure.
+ * util/rust-hir-map.h: Add function prototypes.
+
+2025-03-24 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): Error out if a type path has multiple segments,
+ as we currently ignore every segment except the last.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * backend/rust-compile-expr.cc (check_match_scrutinee): Allow anything to be used as a
+ match scrutinee, not just ADTs.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-lang-item.h: Add handling for Result::Ok, Result::Err, Try, Try::into_result,
+ Try::from_ok, Try::from_err.
+ * util/rust-lang-item.cc: Likewise.
+
+2025-03-24 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Add "rust"
+ identifier detection akin to nr1.
+ (funny_ice_finalizer): Copy ICE finalizer from nr1.
+ * resolve/rust-late-name-resolver-2.0.h: Add funny_error member
+ context state.
+ * Make-lang.in: Add new translation unit for new ice finalizer.
+ * resolve/rust-ast-resolve-expr.cc: Move ice
+ finalizer to it's own file.
+ * resolve/rust-ice-finalizer.cc: New file.
+ * resolve/rust-ice-finalizer.h: New file.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-copy.cc: Always add an extra Copy bound on generic Copy impls.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-clone.cc (DeriveClone::visit_union): Use lang items for Copy and
+ Sized bounds.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-clone.cc: Add extra bound when deriving generic Clone
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-builder.cc (Builder::new_type_param): Add optional extra trait bounds.
+ * ast/rust-ast-builder.h: Likewise.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * hir/rust-hir-dump.cc (Dump::do_typepathsegment): Add handling for lang items.
+
+2025-03-24 lishin <lishin1008@gmail.com>
+
+ * util/rust-lang-item.cc: Add receiver to map.
+ * util/rust-lang-item.h: Define LangItem::Kind::RECEIVER.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): Register auto traits in mappings.
+ * util/rust-hir-map.cc (Mappings::insert_auto_trait): New.
+ (Mappings::get_auto_traits): New.
+ * util/rust-hir-map.h: Declare them.
+ * typecheck/rust-tyty-bounds.cc (TypeBoundsProbe::scan): Add auto trait bounds when
+ scanning.
+
+2025-03-24 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * typecheck/rust-tyty-bounds.cc (TypeBoundsProbe::add_trait_bound): New function.
+ * typecheck/rust-hir-type-bounds.h: Declare it.
+ (TypeBoundsProbe::assemble_builtin_candidate): Call into add_trait_bound.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Improve formatting.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-clone.cc (DeriveClone::clone_enum_struct): New function for deriving
+ enum struct variants.
+ (DeriveClone::visit_enum): Call into the new function.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-clone.cc (DeriveClone::variant_match_path): New function.
+ (DeriveClone::clone_enum_identifier): Rename.
+ (DeriveClone::clone_enum_tuple): New function.
+ (DeriveClone::visit_enum): Visit tuple variants properly.
+ * expand/rust-derive-clone.h: Declare new functions.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-builder.cc: Add new methods for constructing struct exprs.
+ * ast/rust-ast-builder.h: Mention how to build tuple expressions.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-clone.cc: Clone enum identifier variants properly
+ * expand/rust-derive-clone.h: Declare new functions used.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-clone.cc (DeriveClone::clone_call): Mention using `clone_fn`
+ lang item in the future.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-clone.cc (DeriveClone::visit_union): Create a lang item path
+ instead of a regular path.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-builder.cc: New functions.
+ * ast/rust-ast-builder.h: Declare them.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-copy.cc: Use lang item path.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-clone.cc (DeriveClone::visit_union): Manually generate
+ the struct used for asserting a union implements Copy.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-builder.cc (Builder::struct_struct): New function.
+ * ast/rust-ast-builder.h (vec): New function.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Visit tuple pattern items as
+ separated by commas.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Fix collector to better
+ handle lang item type path segments.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-hir-map.cc (Mappings::get_lang_item_node): New.
+ * util/rust-hir-map.h: New function.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-lang-item.cc (LangItem::PrettyString): New.
+ * util/rust-lang-item.h: New.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-collect-lang-items.cc (CollectLangItems::visit): New.
+ * ast/rust-collect-lang-items.h: New.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * hir/rust-ast-lower-type.cc (ASTLowerTypePath::visit): Adapt code to lang item
+ type path segments.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::resolve_root_path): Adapt
+ code to handle lang item type paths.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-path.h: Rework how lang item paths are represented.
+ * ast/rust-path.cc: Likewise.
+ * ast/rust-item.h: Likewise.
+ * ast/rust-ast.cc: Likewise.
+ * ast/rust-ast-collector.cc: Adapt to new lang item path system.
+ * ast/rust-ast-collector.h: Likewise.
+ * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Likewise.
+ * ast/rust-ast-visitor.h: Likewise.
+ * expand/rust-derive-copy.cc: Likewise.
+ * expand/rust-derive.h: Likewise.
+ * hir/rust-ast-lower-base.cc (ASTLoweringBase::visit): Likewise.
+ * hir/rust-ast-lower-base.h: Likewise.
+ * hir/rust-ast-lower-type.cc (ASTLowerTypePath::translate): Likewise.
+ (ASTLowerTypePath::visit): Likewise.
+ * hir/rust-ast-lower-type.h: Likewise.
+ * resolve/rust-ast-resolve-base.cc (ResolverBase::visit): Likewise.
+ * resolve/rust-ast-resolve-base.h: Likewise.
+ * resolve/rust-ast-resolve-item.cc (ResolveItem::visit): Likewise.
+ * resolve/rust-ast-resolve-type.h: Likewise.
+ * resolve/rust-ast-resolve-type.cc (ResolveRelativeTypePath::go): Likewise.
+ * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Likewise.
+ * resolve/rust-late-name-resolver-2.0.h: Likewise.
+ * hir/tree/rust-hir-path.cc (TypePathSegment::TypePathSegment): Likewise.
+ (TypePathSegmentGeneric::TypePathSegmentGeneric): Likewise.
+ * hir/tree/rust-hir-path.h: Likewise.
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::resolve_root_path): Likewise.
+ * ast/rust-ast-builder.cc: Likewise.
+ * ast/rust-ast-builder.h: Likewise.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-collect-lang-items.cc (get_lang_item_attr): Show unknown attribute upon error.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-attribute-values.h: Declare new attribute value.
+ * util/rust-attributes.cc: Use it.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast.cc (BlockExpr::normalize_tail_expr): Remove overzealous
+ std::move
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-ast-collector.cc
+ (TokenCollector::visit): Remove visitor for NamedFunctionParam.
+ * ast/rust-ast-collector.h
+ (TokenCollector::visit): Likewise.
+ * ast/rust-ast-full-decls.h
+ (class NamedFunctionParam): Remove forward declaration.
+ * ast/rust-ast-visitor.cc
+ (DefaultASTVisitor::visit): Remove visitor for
+ NamedFunctionParam.
+ * ast/rust-ast-visitor.h
+ (DefaultASTVisitor::visit): Likewise.
+ * ast/rust-ast.cc
+ (NamedFunctionParam::as_string): Remove.
+ * ast/rust-item.h
+ (class NamedFunctionParam): Remove.
+ (class ExternalFunctionItem): Remove.
+ * parse/rust-parse-impl.h
+ (Parser::parse_named_function_param): Remove.
+ (Parser::parse_named_function_params): Remove.
+ * parse/rust-parse.h
+ (Parser::parse_named_function_param): Remove.
+ (Parser::parse_named_function_params): Remove.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-early-name-resolver-2.0.cc
+ (Early::visit): Resolve the pending eager invocations inside
+ builtin macro invocations.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * hir/rust-ast-lower-stmt.cc (ASTLoweringStmt::visit): hir lowering
+ * hir/rust-ast-lower-stmt.h: likewise
+ * resolve/rust-ast-resolve-stmt.cc (ResolveStmt::visit): name resolution
+ * resolve/rust-ast-resolve-stmt.h: likewise
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * Make-lang.in: Handle rust-forever-stack.cc.
+ * resolve/rust-forever-stack.h
+ (class ForeverStackStore): Add.
+ * resolve/rust-forever-stack.cc: New file, based on
+ rust-forever-stack.hxx.
+
+2025-03-21 Om Swaroop Nayak <96killerat96@gmail.com>
+
+ * ast/rust-collect-lang-items.cc (get_lang_item_attr): "removed checker fn"
+ * util/rust-attributes.cc (Attributes::is_lang_item): "added fn"
+ * util/rust-attributes.h: "added fn"
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * checks/errors/rust-readonly-check.cc (check_decl): improve mut check
+ (emit_error): helper
+ (check_modify_expr): likewise
+ (readonly_walk_fn): reuse helper
+ (ReadonlyCheck::Lint): cleanup context each run
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-ast-visitor.cc
+ (DefaultASTVisitor::visit): When visiting a TraitImpl, visit its
+ trait path.
+
+2025-03-21 liushuyu <liushuyu011@gmail.com>
+
+ * backend/rust-compile-intrinsic.cc: add the new `catch_unwind` variant
+ of the `try` intrinsic: this variant can be seen on Rust 1.78+
+ and returns `()` instead of `i32`.
+
+2025-03-21 liushuyu <liushuyu011@gmail.com>
+
+ * backend/rust-compile-intrinsic.cc: add `try` intrinsic handler.
+ * lang.opt: add `-frust-panic` option.
+ * rust-lang.cc: enable exception handler code generation.
+ * rust-session-manager.cc: add getter and setter for panic
+ strategy option.
+ * rust-session-manager.h: Likewise.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::visit): implement coercion
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): this is an LUB
+ * typecheck/rust-unify.cc (UnifyRules::go): remove unify ! coercion
+
+2025-03-21 Nobel <nobel2073@gmail.com>
+
+ * typecheck/rust-casts.cc (TypeCastRules::cast_rules): Add rule.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::visit): new layout
+ * backend/rust-compile-pattern.cc (CompilePatternCheckExpr::visit): likewise
+ (CompilePatternBindings::visit): likewise
+ * backend/rust-compile-resolve-path.cc: likewise
+ * backend/rust-compile-type.cc (TyTyResolveCompile::visit): implement new layout
+ * rust-gcc.cc (constructor_expression): get rid of useless assert
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-toplevel-name-resolver-2.0.cc
+ (TopLevel::visit): Insert a definition for Self when visiting
+ InherentImpl and TraitImpl instances.
+ * resolve/rust-toplevel-name-resolver-2.0.h
+ (TopLevel::visit): Add visitors for InherentImpl and TraitImpl.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * hir/rust-hir-dump.cc (Dump::visit): add null guard
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::visit): handle partial_eq possible call
+ * backend/rust-compile-expr.h: handle case where lang item calls differ from name
+ * hir/tree/rust-hir-expr.cc (OperatorExprMeta::OperatorExprMeta): new helper
+ * hir/tree/rust-hir-expr.h: likewise
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): handle partial_eq
+ (TypeCheckExpr::resolve_operator_overload): likewise
+ * typecheck/rust-hir-type-check-expr.h: likewise
+ * util/rust-lang-item.cc (LangItem::ComparisonToLangItem): map comparison to lang item
+ (LangItem::ComparisonToSegment): likewise
+ * util/rust-lang-item.h: new lang items PartialOrd and Eq
+ * util/rust-operators.h (enum class): likewise
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): check for error
+ * typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit): likewise and remove debug error
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-default-resolver.cc
+ (DefaultResolver::visit): Make sure to scope visitation of the
+ children of type definition items.
+ * resolve/rust-default-resolver.h
+ (DefaultResolver::visit): Add overrides for TupleStruct, Union,
+ and TypeAlias.
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): Remove override for Enum.
+ * resolve/rust-late-name-resolver-2.0.h
+ (Late::visit): Likewise.
+ * resolve/rust-toplevel-name-resolver-2.0.cc
+ (TopLevel::visit): Rely more on DefaultResolver::visit.
+ * resolve/rust-toplevel-name-resolver-2.0.h
+ (TopLevel::visit): Remove override for BlockExpr.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * hir/rust-hir-dump.cc (Dump::do_qualifiedpathtype): add guard
+ (Dump::do_traitfunctiondecl): likewise
+ (Dump::visit): likewise
+
+2025-03-21 Prajwal S N <prajwalnadig21@gmail.com>
+
+ * typecheck/rust-hir-type-check.h (class TypeCheckContext): add
+ header file and use StackedContexts for blocks
+ * typecheck/rust-typecheck-context.cc: update methods
+ * typecheck/rust-hir-trait-resolve.cc: refactor function calls
+ * typecheck/rust-hir-type-check-implitem.cc: refactor function calls
+ * typecheck/rust-hir-type-check-type.cc: refactor function calls
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast.h: Add new Kind enums, remove Node class.
+ * ast/rust-builtin-ast-nodes.h: Use new Kind enums.
+ * ast/rust-expr.h (class LoopLabel): Likewise.
+ * ast/rust-item.h: Likewise.
+ * ast/rust-macro.h: Likewise.
+ * ast/rust-path.h: Likewise.
+ * expand/rust-macro-builtins-helpers.cc: Likewise.
+ * expand/rust-macro-builtins-utility.cc (MacroBuiltin::concat_handler): Likewise.
+ (MacroBuiltin::stringify_handler): Likewise.
+ * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Likewise.
+ * resolve/rust-early-name-resolver.cc: Likewise.
+ * hir/rust-ast-lower.cc (ASTLoweringBlock::visit): Likewise.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-toplevel-name-resolver-2.0.cc
+ (TopLevel::visit): Add visitor for TraitItemType.
+ * resolve/rust-toplevel-name-resolver-2.0.h
+ (TopLevel::visit): Likewise.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-ast-resolve-type.cc (ResolveType::visit): New visitor to handle
+ ParenthesizedType.
+ * resolve/rust-ast-resolve-type.h: Likewise.
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit): Likewise.
+ * typecheck/rust-hir-type-check-type.h: Likewise.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * hir/rust-ast-lower-type.cc (ASTLoweringType::visit): Add implementation for
+ ParenthesizedType.
+ * hir/rust-ast-lower-type.h: Declare that new visitor.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-ast-builder-type.cc: Remove inclusion of
+ rust-make-unique.h.
+ * ast/rust-ast-builder.cc: Likewise.
+ (Builder::array): Use std::make_unique instead of
+ Rust::make_unique.
+ * ast/rust-ast.cc (Attribute::get_traits_to_derive): Likewise.
+ * ast/rust-macro.h: Remove inclusion of rust-make-unique.h.
+ (MacroRulesDefinition::mbe): Use std::make_unique instead of
+ Rust::make_unique.
+ (MacroRulesDefinition::decl_macro): Likewise.
+ * ast/rust-path.h
+ (PathInExpression::PathInExpression): Likewise.
+ (QualifiedPathInExpression::QualifiedPathInExpression):
+ Likewise.
+ * backend/rust-compile-pattern.cc
+ (CompilePatternCheckExpr::visit): Likewise.
+ * expand/rust-derive-copy.cc
+ (DeriveCopy::copy_impl): Likewise.
+ * expand/rust-expand-format-args.cc
+ (expand_format_args): Likewise.
+ * expand/rust-macro-builtins-asm.cc: Remove inclusion of
+ rust-make-unique.h.
+ (parse_asm): Use std::make_unique instead of Rust::make_unique.
+ * hir/rust-ast-lower-expr.cc
+ (ASTLoweringExpr::visit): Likewise.
+ * hir/tree/rust-hir-expr.cc
+ (StructExprStructFields::StructExprStructFields): Likewise.
+ (StructExprStructFields::operator=): Likewise.
+ * hir/tree/rust-hir.cc
+ (TypePath::to_trait_bound): Likewise.
+ * lex/rust-token.h: Remove inclusion of rust-make-unique.h.
+ (Token::Token): Use std::make_unique instead of
+ Rust::make_unique.
+ * metadata/rust-import-archive.cc: Remove inclusion of
+ rust-make-unique.h.
+ (Import::find_archive_export_data): Use std::make_unique instead
+ of Rust::make_unique.
+ * metadata/rust-imports.cc: Remove inclusion of
+ rust-make-unique.h.
+ (Import::find_export_data): Use std::make_unique instead of
+ Rust::make_unique.
+ (Import::find_object_export_data): Likewise.
+ * parse/rust-parse-impl.h: Remove inclusion of
+ rust-make-unique.h.
+ (Parser::parse_function_param): Use std::make_unique instead of
+ Rust::make_unique.
+ (Parser::parse_self_param): Likewise.
+ (Parser::parse_array_expr): Likewise.
+ * typecheck/rust-hir-type-check-enumitem.cc
+ (TypeCheckEnumItem::visit): Likewise.
+ * typecheck/rust-hir-type-check-implitem.cc
+ (TypeCheckTopLevelExternItem::visit): Likewise.
+ (TypeCheckImplItem::visit): Likewise.
+ * typecheck/rust-hir-type-check-type.cc
+ (TypeResolveGenericParam::visit): Likewise.
+ * typecheck/rust-hir-type-check.cc: Remove inclusion of
+ rust-make-unique.h.
+ (TraitItemReference::get_type_from_fn): Use std::make_unique
+ instead of Rust::make_unique.
+ * typecheck/rust-tyty-bounds.cc
+ (TypeCheckBase::get_predicate_from_bound): Likewise.
+ * util/rust-make-unique.h: Removed.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-item.h: Add EnumItem::Kind for differentiating all variants that may be
+ used inside an enum declaration.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-ast-visitor.cc
+ (DefaultASTVisitor::visit): Visit implicit Self parameters of
+ traits.
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): Resolve implicit Self parameters of traits.
+ * resolve/rust-late-name-resolver-2.0.h:
+ (Late::visit): Add trait visitor.
+ * resolve/rust-toplevel-name-resolver-2.0.cc
+ (TopLevel::visit): Insert resolutions for Self type parameters
+ as well.
+
+2025-03-21 Liam Naddell <liamnprg@gmail.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc:
+ Change the late name resolver to enter proper lexical scope during typechecking
+ * resolve/rust-late-name-resolver-2.0.h:
+ Add needed prototype to header
+ * resolve/rust-toplevel-name-resolver-2.0.cc:
+ Add generic parameters to enum's scoped RIB to allow for proper name resolution on types.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-builder.cc: Add new functions.
+ * ast/rust-ast-builder.h: Declare them.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-path.h: Add two new constructors.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-collect-lang-items.cc (CollectLangItems::visit): Add visitor for collecting
+ functions that might be lang items.
+ * ast/rust-collect-lang-items.h: Likewise.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-lang-item.h: Add new lang items.
+ * util/rust-lang-item.cc: Likewise.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-lang-item.h: Add Sync marker trait.
+ * util/rust-lang-item.cc: Likewise.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * typecheck/rust-hir-type-check-type.cc: Add TODO note.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-ast-resolve-type.cc (ResolveTypeToCanonicalPath::visit): Resolve additional
+ trait bounds.
+ * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Error out properly on unresolved
+ type-path instead of crashing.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * typecheck/rust-hir-path-probe.cc: Fix typos.
+ * typecheck/rust-hir-path-probe.h: Likewise.
+ * typecheck/rust-hir-type-check-path.cc: Likewise.
+
+2025-03-21 Nobel <nobel2073@gmail.com>
+
+ * typecheck/rust-casts.cc (TypeCastRules::cast_rules): Add rule.
+
+2025-03-21 Sri Ganesh Thota <sriganeshthota12345@gmail.com>
+
+ * ast/rust-item.h: I have changed helper constructor for typepath
+ to be a delegating constructor.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-fnparam.cc (CompileFnParam::visit): compile tuple patterns
+ (CompileSelfParam::compile): update return type
+ (CompileFnParam::create_tmp_param_var): return Bvariable not tree to stop ICE
+ * backend/rust-compile-fnparam.h: update prototype
+ * backend/rust-compile-pattern.cc (CompilePatternBindings::visit): implement TuplePattern
+ * backend/rust-compile-pattern.h: update prototype
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * rust-gcc.cc (operator_to_tree_code): ! expressions are BIT_NOT_EXPR
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-path.h: Adapt children of Path to fix some NodeId issues.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc (Late::visit): New.
+ * resolve/rust-late-name-resolver-2.0.h: New.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * hir/rust-ast-lower-type.cc (ASTLowerTypePath::translate): Adapt to
+ handle lang item paths.
+ (ASTLowerTypePath::visit): Likewise.
+ (ASTLowerTypePath::translate_type_path): New.
+ (ASTLowerTypePath::translate_lang_item_type_path): New.
+ * hir/rust-ast-lower-type.h: Adapt to handle lang item paths.
+ * resolve/rust-ast-resolve-type.h: Likewise.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-ast-resolve-item.cc (ResolveItem::visit): Adapt resolver
+ to lang item paths.
+ * resolve/rust-ast-resolve-type.h: Likewise.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-item.h: Add new method to specifically get a type-path.
+ * ast/rust-path.cc (LangItemPath::as_string): Implement properly.
+ * hir/rust-ast-lower-type.cc (ASTLowerTypePath::translate): Adapt
+ visitor to use the new LangItemPath.
+ * hir/rust-ast-lower-type.h: Likewise.
+ * resolve/rust-ast-resolve-item.cc (ResolveItem::visit): Likewise.
+ * resolve/rust-ast-resolve-type.h: Likewise.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-copy.cc: Use new LangItemPath for derive(Copy).
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-path.h (class LangItemPath): New.
+ (class TypePath): Adapt to accomodate LangItemPath.
+ * ast/rust-ast.cc (TraitImpl::as_string): Use new checks for lang items.
+ (QualifiedPathType::as_string): Likewise.
+ (FormatArgs::set_outer_attrs): Likewise.
+ * ast/rust-item.h (class TraitImpl): Likewise.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-forever-stack.h
+ (ForeverStack::find_starting_point): Use type
+ 'std::reference_wrapper<Node> &' instead of 'Node &' for
+ parameter starting_point.
+ * resolve/rust-forever-stack.hxx
+ (ForeverStack::find_starting_point): Likewise.
+ (ForeverStack::resolve_path): Handle change to
+ ForeverStack::find_starting_point.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::resolve_root_path):
+ Remove unused capture in lambda.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-attributes.h (class Attributes): New.
+ * util/rust-attributes.cc: Implement Attributes::is_known().
+ * ast/rust-collect-lang-items.cc (is_known_attribute): Remove.
+ (get_lang_item_attr): Call Attributes::is_known() instead.
+ * hir/rust-ast-lower-base.cc (ASTLoweringBase::handle_outer_attributes): Likewise.
+ (ASTLoweringBase::is_known_attribute): Remove.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * Make-lang.in: Add new object file.
+ * rust-session-manager.cc (Session::compile_crate): Call CollectLangItems.
+ * ast/rust-collect-lang-items.cc: New file.
+ * ast/rust-collect-lang-items.h: New file.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-hir-map.h: Keep a NodeId mappings for lang items.
+ * util/rust-hir-map.cc (Mappings::insert_lang_item_node): New function.
+ (Mappings::lookup_lang_item_node): Likewise.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * hir/rust-hir-dump.cc (Dump::visit): add missing check for no return value
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-constexpr.cc (eval_store_expression): check for null
+ (eval_call_expression): remove bad warning
+ * rust-gcc.cc (arithmetic_or_logical_expression): add warnings
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-base.cc: apply coercion site to result
+ * backend/rust-compile-base.h: update prototype
+ * backend/rust-compile-implitem.cc (CompileTraitItem::visit): send in coercion info
+ * backend/rust-compile-item.cc (CompileItem::visit): likewise
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * resolve/rust-ast-resolve-item.cc (ResolveItem::visit): remove assertions
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-visitor.h: Replace context with StackedContexts.
+ * ast/rust-ast-visitor.cc (ContextualASTVisitor::visit): Use new APIs.
+ * checks/errors/rust-ast-validation.cc (ASTValidation::visit): Likewise.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-stacked-contexts.h: Add new method to see what context we are currently in.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * hir/tree/rust-hir-item.h: Remove TraitItemFunc::has_block_defined()
+ * backend/rust-compile-implitem.cc (CompileTraitItem::visit):
+ Call TraitItemFunc::has_definition() instead.
+ * checks/errors/rust-const-checker.cc (ConstChecker::visit): Likewise.
+ * checks/errors/rust-hir-pattern-analysis.cc (PatternChecker::visit): Likewise.
+ * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): Likewise.
+ * typecheck/rust-hir-trait-resolve.cc (ResolveTraitItemToRef::visit): Likewise.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-hir-map.h: Move definitions from header...
+ * util/rust-hir-map.cc: ...to source file.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-lang-item.h: Fix comment location to align with other comments.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-type.cc (TyTyResolveCompile::visit): call lauout type directly
+ * rust-backend.h (struct_type): add optional layout parameter
+ (union_type): likewise
+ (fill_in_fields): likewise
+ * rust-gcc.cc (struct_type): likewise
+ (union_type): likewise
+ (fill_in_fields): only layout if we required
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-casts.cc (TypeCastRules::cast_rules): allow casts to float
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-trait-resolve.cc (TraitResolver::resolve_trait): track trait
+ * typecheck/rust-hir-type-check-implitem.cc: trait block
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_segments): dont when dyn
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit): look at Self contenxt
+ (TypeCheckType::resolve_root_path): track if Self
+ (TypeCheckType::resolve_associated_type): look at current context for associated types
+ * typecheck/rust-hir-type-check-type.h: change prototype
+ * typecheck/rust-hir-type-check.h (class TypeCheckBlockContextItem):
+ new context system to track current state
+ * typecheck/rust-typecheck-context.cc (TypeCheckContext::have_block_context): likewise
+ (TypeCheckContext::peek_block_context): likewise
+ (TypeCheckContext::push_block_context): likewise
+ (TypeCheckContext::pop_block_context): likewise
+ (TypeCheckBlockContextItem::Item::Item): likewise
+ (TypeCheckBlockContextItem::TypeCheckBlockContextItem): likewise
+ (TypeCheckBlockContextItem::is_impl_block): likewise
+ (TypeCheckBlockContextItem::is_trait_block): likewise
+ (TypeCheckBlockContextItem::get_impl_block): likewise
+ (TypeCheckBlockContextItem::get_trait): likewise
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * hir/rust-hir-dump.cc (Dump::visit): add missing null checks
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * backend/rust-compile-base.cc: Prepend crate name to function's ir
+ name.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-name-resolver.cc: Include options.txt.
+ (Resolver::insert_resolved_name): Assert that name resolution
+ 2.0 is disabled.
+ (Resolver::lookup_resolved_name): Likewise.
+ (Resolver::insert_resolved_type): Likewise.
+ (Resolver::lookup_resolved_type): Likewise.
+ (Resolver::insert_resolved_label): Likewise.
+ (Resolver::lookup_resolved_label): Likewise.
+ (Resolver::insert_resolved_macro): Likewise.
+ (Resolver::lookup_resolved_macro): Likewise.
+ (Resolver::insert_resolved_misc): Likewise.
+ (Resolver::lookup_resolved_misc): Likewise.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-expr.cc (check_match_scrutinee): check for empty match
+ (CompileExpr::visit): fix assertion
+ * checks/errors/rust-hir-pattern-analysis.cc (check_match_usefulness): check for empty
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): resolve to !
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * hir/rust-hir-dump.cc (Dump::visit): add guards
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-stmt.h: Remove stdlib include and use rust-system instead.
+ * backend/rust-compile-expr.cc: Likewise.
+ * backend/rust-mangle-legacy.cc: Likewise.
+ * backend/rust-mangle-v0.cc: Likewise.
+ * hir/rust-hir-dump.cc: Likewise.
+ * typecheck/rust-hir-type-check-type.cc: Likewise.
+ * typecheck/rust-tyty.cc: Likewise.
+ * typecheck/rust-tyty.h: Likewise.
+ * util/rust-common.h: Likewise.
+ * util/rust-token-converter.cc: Likewise.
+ * util/rust-token-converter.h: Likewise.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * typecheck/rust-hir-type-check-expr.cc: Add includes.
+ (TypeCheckExpr::visit): Use name resolver 2.0.
+ (TypeCheckExpr::resolve_operator_overload): Likewise.
+ (TypeCheckExpr::resolve_fn_trait_call): Likewise.
+ * typecheck/rust-hir-type-check-path.cc
+ (TypeCheckExpr::visit): Likewise.
+ (TypeCheckExpr::resolve_segments): Likewise.
+ * typecheck/rust-hir-type-check-type.cc
+ (TypeCheckType::resolve_segments): Likewise.
+ (ResolveWhereClauseItem::visit): Likewise.
+ (TypeCheckType::visit): Avoid usage of
+ Resolver::get_unit_type_node_id when handling TupleType, use
+ name resolver 2.0 when handling QualifiedPathInType.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): Call DefaultResolver::visit when visiting
+ TypePath.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * checks/errors/privacy/rust-privacy-reporter.cc
+ (PrivacyReporter::check_for_privacy_violation): Use name
+ resolver 2.0.
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::visit): Change call.
+ (CompileExpr::resolve_operator_overload): Update function arguments.
+ * backend/rust-compile-expr.h: Change the function's prototype to use
+ a reference wrapper instead of a reference within the optional.
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * typecheck/rust-tyty.h: Change initializer list to default constructor
+ call.
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Add template
+ to tl::optional.
+ * hir/rust-ast-lower-type.cc (ASTLowerGenericParam::visit): Likewise.
+ * typecheck/rust-hir-type-check-type.cc (TypeResolveGenericParam::visit):
+ Likewise.
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit): Do not
+ get a reference if the pattern does not exist.
+ (TypeCheckMethodCallExpr::check): Likewise.
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * hir/rust-ast-lower-stmt.cc (ASTLoweringStmt::visit): Change the
+ ternary expression with a more readable if.
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * typecheck/rust-tyty.h: Reverse monomorphization during cloning and
+ make a new function to explicitly monomorphize.
+ * typecheck/rust-tyty.cc: Use monomorphization when required.
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * hir/rust-ast-lower-type.cc (ASTLowerGenericParam::visit): Forward
+ an optional to the constructor.
+ * hir/tree/rust-hir-item.cc (TypeParam::TypeParam): Use an optional
+ in the constructor.
+ (TypeParam::operator=): Ensure the TypeParam has a type properly.
+ (TypeParam::get_type_mappings): Likewise.
+ * hir/tree/rust-hir-item.h: Wrap the type smart pointer into an
+ optional.
+ * hir/tree/rust-hir.cc (TypeParam::as_string): Unwrap optional type
+ correctly.
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::visit): Call getter
+ instead of size function.
+ * checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::visit):
+ Only check privacy if the type is present.
+ * hir/rust-ast-lower-stmt.cc (ASTLoweringStmt::visit): Use an optional.
+ * hir/tree/rust-hir-generic-param.h: Assert type before getting it.
+ * hir/tree/rust-hir-item.h: Assert pointers before dereference, fix
+ has_type condition.
+ * hir/tree/rust-hir-path.h: Add more assertions.
+ * hir/tree/rust-hir-stmt.cc: Change constructor with optionals.
+ * hir/tree/rust-hir-stmt.h: Use optionals over smart pointers to
+ emphasize these fields might be missing.
+ * hir/tree/rust-hir.cc (LetStmt::as_string): Use getters.
+ * typecheck/rust-hir-type-check-expr.cc: Clone structures to prevent
+ parent's fields from being nulled by the move operation.
+ * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): Use
+ optionals.
+ * typecheck/rust-tyty.cc: Likewise.
+ * typecheck/rust-tyty.h: Likewise.
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * Make-lang.in: Add new files.
+ * hir/tree/rust-hir-item.h: Move Item definition and remove
+ implementations to their corresponding cc file.
+ * hir/tree/rust-hir-expr.h: Move implementation to the corresponding
+ cc file.
+ * hir/tree/rust-hir-path.h: Likewise.
+ * hir/tree/rust-hir-pattern.h: Likewise.
+ * hir/tree/rust-hir-stmt.h: Likewise.
+ * hir/tree/rust-hir-type.h: Likewise.
+ * hir/tree/rust-hir-visitor.h: Likewise.
+ * hir/tree/rust-hir.h: Likewise.
+ * hir/tree/rust-hir.cc (Crate::Crate): Add implementations from Crate
+ and remove ConstGenericParam implementations to move them to their
+ own file.
+ * hir/tree/rust-hir-attrs.h: New file.
+ * hir/tree/rust-hir-bound-abstract.h: New file.
+ * hir/tree/rust-hir-bound.h: New file.
+ * hir/tree/rust-hir-expr-abstract.h: New file.
+ * hir/tree/rust-hir-expr.cc: New file.
+ * hir/tree/rust-hir-generic-param.cc: New file.
+ * hir/tree/rust-hir-generic-param.h: New file.
+ * hir/tree/rust-hir-item.cc: New file.
+ * hir/tree/rust-hir-literal.h: New file.
+ * hir/tree/rust-hir-node.h: New file.
+ * hir/tree/rust-hir-path.cc: New file.
+ * hir/tree/rust-hir-pattern-abstract.h: New file.
+ * hir/tree/rust-hir-simple-path.h: New file.
+ * hir/tree/rust-hir-stmt.cc: New file.
+ * hir/tree/rust-hir-trait-bound.h: New file.
+ * hir/tree/rust-hir-type-abstract.cc: New file.
+ * hir/tree/rust-hir-type-abstract.h: New file.
+ * hir/tree/rust-hir-type-no-bounds.h: New file.
+ * hir/tree/rust-hir-type.cc: New file.
+ * hir/tree/rust-hir-visibility.h: New file.
+ * hir/tree/rust-hir-visitable.h: New file.
+ * checks/lints/rust-lint-marklive.h: Use References.
+ * hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Reformat
+ vectors.
+ * hir/rust-hir-dump.cc (Dump::visit): Use reference.
+ * typecheck/rust-hir-type-check-struct.cc (TypeCheckStructExpr::resolve):
+ Use references.
+ * typecheck/rust-tyty-bounds.cc: Likewise.
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * backend/rust-compile-base.cc: Use FnParam getter.
+ * backend/rust-compile-expr.cc (CompileExpr::visit): Likewise.
+ * backend/rust-compile-intrinsic.cc: Likewise.
+ * backend/rust-compile-type.cc: Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::visit):
+ Only visit childrens if not missing.
+ * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): Use
+ a reference instead of a raw pointer.
+ * hir/tree/rust-hir-expr.h: Add presence function for return
+ expression.
+ * hir/tree/rust-hir-item.h: Remove take_param_name.
+ * hir/tree/rust-hir.h: Make mapping getter const.
+ * typecheck/rust-hir-dot-operator.cc (MethodResolver::Select): Use
+ getter.
+ * typecheck/rust-hir-type-check-expr.cc: Likewise.
+ * typecheck/rust-hir-type-check-implitem.cc: Use FnParam vector instead
+ of std::pair of Pattern and BaseType.
+ * typecheck/rust-hir-type-check-item.cc: Likewise.
+ * typecheck/rust-hir-type-check.cc: Likewise.
+ * typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit): Use getters.
+ (TypeCheckMethodCallExpr::check): Likewise.
+ * typecheck/rust-tyty-cmp.h: Likewise.
+ * typecheck/rust-tyty.cc: Use FnParam.
+ * typecheck/rust-tyty.h (class FnParam): Add FnParam to handle function
+ parameters instead of handling std::pairs.
+ * typecheck/rust-unify.cc (UnifyRules::expect_fndef): Use getters.
+ (UnifyRules::expect_fnptr): Likewise.
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * backend/rust-compile-base.cc (HIRCompileBase::compile_function_body):
+ Remove usage of get function to retrieve a raw pointer.
+ * backend/rust-compile-base.h:
+ Change API usage from raw pointer to a reference.
+ * backend/rust-compile-block.cc (CompileBlock::compile): Likewise.
+ (CompileBlock::visit): Likewise.
+ (CompileConditionalBlocks::visit): Likewise.
+ * backend/rust-compile-block.h: Likewise.
+ * backend/rust-compile-expr.cc (CompileExpr::Compile): Likewise.
+ (CompileExpr::visit): Likewise.
+ (check_match_scrutinee): Likewise.
+ (CompileExpr::array_value_expr): Likewise.
+ (CompileExpr::array_copied_expr): Likewise.
+ (CompileExpr::generate_closure_function): Likewise.
+ (CompileExpr::generate_possible_fn_trait_call): Likewise.
+ * backend/rust-compile-expr.h: Likewise.
+ * backend/rust-compile-fnparam.cc (CompileFnParam::compile): Likewise.
+ (CompileFnParam::visit): Likewise.
+ * backend/rust-compile-fnparam.h: Likewise.
+ * backend/rust-compile-implitem.cc (CompileTraitItem::visit): Likewise.
+ * backend/rust-compile-intrinsic.cc (compile_fn_params): Likewise.
+ * backend/rust-compile-item.cc (CompileItem::visit): Likewise.
+ * backend/rust-compile-pattern.cc (CompilePatternCheckExpr::visit):
+ Likewise.
+ (compile_range_pattern_bound): Likewise.
+ (CompilePatternBindings::visit): Likewise.
+ (CompilePatternLet::visit): Likewise.
+ * backend/rust-compile-pattern.h: Likewise.
+ * backend/rust-compile-resolve-path.cc (ResolvePathRef::resolve):
+ Likewise.
+ (HIRCompileBase::query_compile): Likewise.
+ * backend/rust-compile-stmt.cc (CompileStmt::visit): Likewise.
+ * backend/rust-compile-struct-field-expr.cc (CompileStructExprField::Compile):
+ Likewise.
+ (CompileStructExprField::visit): Likewise.
+ * backend/rust-compile-struct-field-expr.h: Likewise.
+ * backend/rust-compile-type.cc (TyTyResolveCompile::visit): Likewise.
+ * backend/rust-compile-var-decl.h: Likewise.
+ * backend/rust-compile.cc: Likewise.
+ * backend/rust-mangle-v0.cc (v0_inherent_or_trait_impl_path): Likewise.
+ * checks/errors/borrowck/rust-bir-builder-expr-stmt.cc (ExprStmtBuilder::visit):
+ Likewise.
+ * checks/errors/borrowck/rust-bir-builder-lazyboolexpr.h: Likewise.
+ * checks/errors/borrowck/rust-bir-builder-pattern.h: Likewise.
+ * checks/errors/borrowck/rust-bir-builder-struct.h: Likewise.
+ * checks/errors/borrowck/rust-bir-builder.h: Likewise.
+ * checks/errors/borrowck/rust-function-collector.h: Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::check_type_privacy):
+ Likewise.
+ (PrivacyReporter::visit): Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.h: Likewise.
+ * checks/errors/privacy/rust-reachability.cc (ReachabilityVisitor::visit):
+ Likewise.
+ * checks/errors/rust-const-checker.cc (ConstChecker::visit): Likewise.
+ * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit):
+ Likewise.
+ * checks/lints/rust-lint-marklive.cc (MarkLive::visit): Likewise.
+ * checks/lints/rust-lint-marklive.h: Likewise.
+ * hir/rust-hir-dump.cc (Dump::visit): Likewise.
+ * hir/tree/rust-hir-expr.h: Likewise.
+ * hir/tree/rust-hir-item.h: Likewise.
+ * hir/tree/rust-hir-path.h: Likewise.
+ * hir/tree/rust-hir-pattern.h: Likewise.
+ * hir/tree/rust-hir-stmt.h: Likewise.
+ * hir/tree/rust-hir-type.h: Likewise.
+ * hir/tree/rust-hir.h: Likewise.
+ * typecheck/rust-autoderef.cc: Likewise.
+ * typecheck/rust-hir-dot-operator.cc (MethodResolver::select):
+ Likewise.
+ * typecheck/rust-hir-inherent-impl-overlap.h: Likewise.
+ * typecheck/rust-hir-path-probe.cc (PathProbeType::process_impl_item_candidate):
+ Likewise.
+ (PathProbeImplTrait::process_trait_impl_items_for_candidates): Likewise.
+ * typecheck/rust-hir-trait-resolve.cc (TraitResolver::resolve_trait):
+ Likewise.
+ (TraitItemReference::resolve_item): Likewise.
+ * typecheck/rust-hir-type-check-base.cc: Likewise.
+ * typecheck/rust-hir-type-check-base.h: Likewise.
+ * typecheck/rust-hir-type-check-enumitem.cc (TypeCheckEnumItem::Resolve):
+ Likewise.
+ (TypeCheckEnumItem::visit): Likewise.
+ * typecheck/rust-hir-type-check-enumitem.h: Likewise.
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::Resolve):
+ Likewise.
+ (TypeCheckExpr::visit): Likewise.
+ (TypeCheckExpr::resolve_fn_trait_call): Likewise.
+ * typecheck/rust-hir-type-check-expr.h: Likewise.
+ * typecheck/rust-hir-type-check-implitem.cc (TypeCheckTopLevelExternItem::Resolve):
+ Likewise.
+ (TypeCheckTopLevelExternItem::visit): Likewise.
+ (TypeCheckImplItem::visit): Likewise.
+ (TypeCheckImplItemWithTrait::visit): Likewise.
+ * typecheck/rust-hir-type-check-implitem.h: Likewise.
+ * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): Likewise.
+ (TypeCheckItem::resolve_impl_item): Likewise.
+ (TypeCheckItem::resolve_impl_block_substitutions): Likewise.
+ (TypeCheckItem::resolve_impl_block_self): Likewise.
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::visit): Likewise.
+ (TypeCheckExpr::resolve_segments): Likewise.
+ * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::Resolve):
+ Likewise.
+ (TypeCheckPattern::visit): Likewise.
+ (ClosureParamInfer::Resolve): Likewise.
+ (ClosureParamInfer::visit): Likewise.
+ * typecheck/rust-hir-type-check-pattern.h: Likewise.
+ * typecheck/rust-hir-type-check-stmt.cc (TypeCheckStmt::Resolve):
+ Likewise.
+ (TypeCheckStmt::visit): Likewise.
+ * typecheck/rust-hir-type-check-stmt.h: Likewise.
+ * typecheck/rust-hir-type-check-struct-field.h: Likewise.
+ * typecheck/rust-hir-type-check-struct.cc (TypeCheckStructExpr::TypeCheckStructExpr):
+ Likewise.
+ (TypeCheckStructExpr::Resolve): Likewise.
+ (TypeCheckStructExpr::resolve): Likewise.
+ (TypeCheckStructExpr::visit): Likewise.
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckResolveGenericArguments::resolve):
+ Likewise.
+ (TypeCheckType::Resolve): Likewise.
+ (TypeCheckType::visit): Likewise.
+ (TypeCheckType::resolve_root_path): Likewise.
+ (TypeResolveGenericParam::Resolve): Likewise.
+ (TypeResolveGenericParam::visit): Likewise.
+ (ResolveWhereClauseItem::visit): Likewise.
+ * typecheck/rust-hir-type-check-type.h: Likewise.
+ * typecheck/rust-hir-type-check.cc (TraitItemReference::get_type_from_fn):
+ Likewise.
+ * typecheck/rust-hir-type-check.h: Likewise.
+ * typecheck/rust-type-util.cc (query_type): Likewise.
+ * typecheck/rust-typecheck-context.cc (TypeCheckContextItem::TypeCheckContextItem):
+ Likewise.
+ * typecheck/rust-tyty-bounds.cc (TypeBoundsProbe::scan): Likewise.
+ (TypeCheckBase::get_predicate_from_bound): Likewise.
+ * typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit): Likewise.
+ (TypeCheckMethodCallExpr::go): Likewise.
+ (TypeCheckMethodCallExpr::check): Likewise.
+ * typecheck/rust-tyty-subst.cc: Likewise.
+ * typecheck/rust-tyty.cc (BaseType::monomorphized_clone): Likewise.
+ (VariantDef::VariantDef): Remove copy constructor.
+ (VariantDef::operator=): Change to move operator.
+ (VariantDef::get_discriminant): Replace return type to a reference
+ instead of a reference to a unique pointer.
+ (VariantDef::clone): Change to references.
+ (VariantDef::monomorphized_clone): Likewise.
+ (FnType::as_string): Likewise.
+ (FnType::clone): Likewise.
+ * typecheck/rust-tyty.h: Likewise.
+ * util/rust-hir-map.cc (Mappings::insert_hir_impl_block): Likewise.
+ * backend/rust-compile-asm.cc: Use a reference instead of the raw
+ pointer value.
+ * checks/errors/borrowck/rust-bir-builder-pattern.cc: Use references.
+ * checks/errors/rust-hir-pattern-analysis.cc: Likewise.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-toplevel-name-resolver-2.0.cc
+ (TopLevel::visit): Use DefaultResolver::visit and avoid a call
+ to Identifier::as_string while handling instances of StaticItem.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-forever-stack.h
+ (ForeverStack::push): Accept argument of type Rib::Kind rather
+ than Rib.
+ * resolve/rust-forever-stack.hxx
+ (ForeverStack::push): Likewise.
+ * resolve/rust-name-resolution-context.cc
+ (NameResolutionContext::scoped): Likewise.
+ * resolve/rust-name-resolution-context.h
+ (NameResolutionContext::scoped): Likewise.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::resolve_impl_block_substitutions):
+ dont check for unconstrained when the self is not resolved
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::resolve_root_path):
+ remove bad debug error diagnostic
+ * typecheck/rust-tyty-subst.cc: likewise
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-expr.h: Remove invalid usage of `struct`.
+ * backend/rust-compile-asm.h: Remove unused `translated` member.
+ * backend/rust-compile-asm.cc (CompileAsm::CompileAsm): Remove usage
+ of `translated` member.
+ * checks/errors/rust-unsafe-checker.h: Mark visitor as `override`.
+ * hir/tree/rust-hir-expr.h (struct AnonConst): Remove unused `locus`
+ member.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * typecheck/rust-tyty-call.h: Remove unused context member.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * hir/tree/rust-hir.h: Add override qualifier to overriden method.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-item.h
+ (Trait::self_param): Add.
+ (Trait::Trait): Initialize self_param.
+ (Trait::operator=): Copy self_param.
+ (Trait::insert_implicit_self): Remove.
+ (Trait::get_implicit_self): Add.
+ * hir/rust-ast-lower-item.cc
+ (ASTLoweringItem::visit): Make sure implicit self is still
+ lowered to HIR.
+ * resolve/rust-ast-resolve-item.cc
+ (ResolveItem::visit): Adjust handling of implicit self.
+ * resolve/rust-early-name-resolver.cc
+ (EarlyNameResolver::visit): Add commit to Trait visitor
+ mentioning that implicit self is not visited.
+ * resolve/rust-toplevel-name-resolver-2.0.cc
+ (TopLevel::visit): Remove call to Trait::insert_implicit_self.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): fix the ty_id
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-tyty.cc (PlaceholderType::can_resolve): check for empty mappings
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * checks/errors/privacy/rust-privacy-reporter.cc:
+ Include rust-immutable-name-resolution-context.h.
+ (is_child_module): Use ForeverStack::is_module_descendant if name
+ resolution 2.0 is enabled.
+ * resolve/rust-forever-stack.h
+ (ForeverStack::is_module_descendant): Add.
+ (ForeverStack::dfs_node): Add.
+ * resolve/rust-forever-stack.hxx
+ (ForeverStack::dfs_rib): Use ForeverStack::dfs_node.
+ (ForeverStack::dfs_node): Add.
+ (ForeverStack::is_module_descendant): Add.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * checks/errors/privacy/rust-visibility-resolver.cc:
+ Add includes.
+ (VisibilityResolver::resolve_module_path): Use name resolver 2.0
+ (when enabled) to lookup path resolutions.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_root_path): dont infer here
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): Handle StructExprStruct and use
+ ForeverStack::resolve_path instead of ForeverStack::get to
+ resolve struct expression paths.
+ * resolve/rust-late-name-resolver-2.0.h
+ (Late::visit): Handle StructExprStruct.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * backend/rust-compile-context.cc
+ (Context::setup_builtins): Use TypeCheckContext::get_builtins
+ instead of Resolver::get_builtin_types,
+ TypeCheckContext::lookup_type_by_node_id, and
+ TypeCheckContext::lookup_type.
+ * typecheck/rust-hir-type-check.h
+ (TypeCheckContext::get_builtins): Add.
+ * typecheck/rust-typecheck-context.cc
+ (TypeCheckContext::get_builtins): Add.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_segments): remove hack
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * typecheck/rust-tyty.cc
+ (TupleType::get_unit_type): Remove parameter, cache return
+ value.
+ * typecheck/rust-tyty.h
+ (TupleType::get_unit_type): Remove parameter.
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::setup_builtin_types): Adjust calls to get_unit_type.
+ * resolve/rust-name-resolver.cc
+ (Resolver::generate_builtins): Likewise.
+ * typecheck/rust-hir-type-check-expr.cc
+ (TypeCheckExpr::visit): Likewise.
+ * typecheck/rust-hir-type-check-implitem.cc
+ (TypeCheckTopLevelExternItem::visit): Likewise.
+ (TypeCheckImplItem::visit): Likewise.
+ * typecheck/rust-hir-type-check-item.cc
+ (TypeCheckItem::visit): Likewise.
+ * typecheck/rust-hir-type-check-stmt.cc
+ (TypeCheckStmt::visit): Likewise.
+ * typecheck/rust-hir-type-check-type.cc
+ (TypeCheckType::visit): Likewise.
+ * typecheck/rust-hir-type-check.cc
+ (TraitItemReference::get_type_from_fn): Likewise.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): Handle SelfParam.
+ * resolve/rust-late-name-resolver-2.0.h
+ (Late::visit): Likewise.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * typecheck/rust-hir-trait-resolve.cc: Add includes.
+ (TraitResolver::resolve_path_to_trait):
+ Use name resolution 2.0 resolver when enabled.
+
+2025-03-21 Marc Poulhiès <dkm@kataplop.net>
+
+ * backend/rust-compile-block.h: Adjust after removal of
+ HIR::IfLetExpr and HIR::IfLetExprConseqElse.
+ * backend/rust-compile-expr.h: Likewise.
+ * checks/errors/borrowck/rust-bir-builder-expr-stmt.cc
+ (ExprStmtBuilder::visit): Likewise.
+ * checks/errors/borrowck/rust-bir-builder-expr-stmt.h: Likewise.
+ * checks/errors/borrowck/rust-bir-builder-lazyboolexpr.h:
+ Likewise.
+ * checks/errors/borrowck/rust-bir-builder-struct.h: Likewise.
+ * checks/errors/borrowck/rust-function-collector.h: Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.cc
+ (PrivacyReporter::visit): Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.h: Likewise.
+ * checks/errors/rust-const-checker.cc (ConstChecker::visit):
+ Likewise.
+ * checks/errors/rust-const-checker.h: Likewise.
+ * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit):
+ Likewise.
+ * checks/errors/rust-unsafe-checker.h: Likewise.
+ * hir/rust-ast-lower-block.h (ASTLoweringIfLetBlock::translate):
+ Change return type.
+ * hir/rust-ast-lower.cc (ASTLoweringIfLetBlock::desugar_iflet):
+ New.
+ (ASTLoweringIfLetBlock::visit(AST::IfLetExpr &)): Adjust and use
+ desugar_iflet.
+ * hir/rust-ast-lower.h: Add comment.
+ * hir/rust-hir-dump.cc (Dump::do_ifletexpr): Remove.
+ (Dump::visit(IfLetExpr&)): Remove.
+ (Dump::visit(IfLetExprConseqElse&)): Remove.
+ * hir/rust-hir-dump.h (Dump::do_ifletexpr): Remove.
+ (Dump::visit(IfLetExpr&)): Remove.
+ (Dump::visit(IfLetExprConseqElse&)): Remove.
+ * hir/tree/rust-hir-expr.h (class IfLetExpr): Remove.
+ (class IfLetExprConseqElse): Remove.
+ * hir/tree/rust-hir-full-decls.h (class IfLetExpr): Remove.
+ (class IfLetExprConseqElse): Remove.
+ * hir/tree/rust-hir-visitor.h: Adjust after removal of
+ HIR::IfLetExpr and HIR::IfLetExprConseqElse.
+ * hir/tree/rust-hir.cc (IfLetExpr::as_string): Remove.
+ (IfLetExprConseqElse::as_string): Remove.
+ (IfLetExpr::accept_vis): Remove.
+ (IfLetExprConseqElse::accept_vis): Remove.
+ * hir/tree/rust-hir.h: Adjust after removal of HIR::IfLetExpr and
+ HIR::IfLetExprConseqElse.
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit):
+ Likewise.
+ * typecheck/rust-hir-type-check-expr.h: Likewise.
+ * checks/errors/rust-hir-pattern-analysis.cc
+ (PatternChecker::visit (IfLetExpr &)): Remove.
+ (PatternChecker::visit (IfLetExprConseqElse &)): Remove.
+ * checks/errors/rust-hir-pattern-analysis.h (visit(IfLetExpr &)): Remove.
+ (visit(IfLetExprConseqElse &)): Remove.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * checks/errors/rust-unsafe-checker.cc: Add includes.
+ (UnsafeChecker::visit): Use 2.0 version of resolver when name
+ resolution 2.0 is enabled.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * backend/rust-compile-implitem.cc
+ (CompileTraitItem::visit): Use name resolver 2.0 (when enabled)
+ to obtain canonical paths for instances of TraitItemConst and
+ TraitItemFunc.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * typecheck/rust-hir-type-check.cc: Add includes.
+ (TraitItemReference::get_type_from_fn): Use
+ ForeverStack::to_canonical_path when name resolution 2.0 is
+ enabled.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-path.h
+ (PathIdentSegment::is_super_segment): Rename to...
+ (PathIdentSegment::is_super_path_seg): ...here.
+ (PathIdentSegment::is_crate_segment): Rename to...
+ (PathIdentSegment::is_crate_path_seg): ...here.
+ (PathIdentSegment::is_lower_self): Rename to...
+ (PathIdentSegment::is_lower_self_seg): ...here.
+ (PathIdentSegment::is_big_self): Rename to...
+ (PathIdentSegment::is_big_self_seg): ...here.
+ (PathExprSegment::is_super_path_seg): Handle renames.
+ (PathExprSegment::is_crate_path_seg): Likewise.
+ (PathExprSegment::is_lower_self_seg): Likewise.
+ (TypePathSegment::is_crate_path_seg): Likewise.
+ (TypePathSegment::is_super_path_seg): Likewise.
+ (TypePathSegment::is_big_self_seg): Likewise.
+ (TypePathSegment::is_lower_self_seg): Likewise.
+ * ast/rust-ast-collector.cc
+ (TokenCollector::visit): Likewise.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): Visit the initialization expressions of let
+ statements before visiting their patterns.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-toplevel-name-resolver-2.0.cc
+ (TopLevel::visit): Insert trait names into the type namespace.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-trait-reference.h: new get locus helper
+ * typecheck/rust-hir-trait-resolve.cc (AssociatedImplTrait::get_locus): implemention
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::resolve_operator_overload):
+ fix overload
+
+2025-03-19 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-toplevel-name-resolver-2.0.cc
+ (TopLevel::visit): Handle ExternalStaticItem.
+ * resolve/rust-toplevel-name-resolver-2.0.h
+ (TopLevel::visit): Likewise.
+
+2025-03-19 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * checks/errors/rust-hir-pattern-analysis.cc: Add includes.
+ (PatternChecker::visit): Use name resolver 2.0 when enabled.
+
+2025-03-19 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * backend/rust-compile-expr.cc
+ (CompileExpr::visit): Use name resolver 2.0 to lookup label
+ definitions for break and continue statements when name
+ resolution 2.0 is enabled.
+
+2025-03-19 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * checks/errors/rust-const-checker.cc: Add includes.
+ (ConstChecker::visit): Use name resolver 2.0 to lookup
+ function definitions when name resolution 2.0 is enabled.
+
+2025-03-19 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-toplevel-name-resolver-2.0.cc
+ (TopLevel::visit): Load unloaded modules before attempting to
+ visit their items.
+
+2025-03-19 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-forever-stack.h
+ (ForeverStack::to_canonical_path): Make const.
+ (ForeverStack::to_rib): Add const overload.
+ (ForeverStack::reverse_iter): Add const overloads.
+ (ForeverStack::ConstDfsResult): Add.
+ (ForeverStack::dfs): Add const overload.
+ (ForeverStack::dfs_rib): Likewise.
+ * resolve/rust-forever-stack.hxx
+ (ForeverStack::reverse_iter): Add const overloads.
+ (ForeverStack::dfs): Add const overload.
+ (ForeverStack::to_canonical_path): Make const.
+ (ForeverStack::dfs_rib): Likewise.
+ (ForeverStack::to_rib): Add const overload.
+
+2025-03-19 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * checks/lints/rust-lint-marklive.cc
+ (MarkLive::visit_path_segment): Use name resolver 2.0 when
+ enabled.
+ (MarkLive::visit): Likewise.
+
+2025-03-19 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-toplevel-name-resolver-2.0.cc
+ (TopLevel::visit): Handle ConstGenericParam.
+ * resolve/rust-toplevel-name-resolver-2.0.h
+ (TopLevel::visit): Likewise.
+
+2025-03-19 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): Visit GenericArgs and GenericArg, the former
+ because the latter involves a non-virtual member function call.
+ * resolve/rust-late-name-resolver-2.0.h
+ (Late::visit): Likewise.
+
+2025-03-19 badumbatish <tanghocle456@gmail.com>
+
+ * expand/rust-macro-builtins-asm.cc (parse_reg_operand_in): Fix
+ compiler error on ast wrong implicit construct push_back
+
+2025-03-19 badumbatish <tanghocle456@gmail.com>
+
+ * backend/rust-compile-asm.cc (CompileAsm::asm_construct_inputs):
+ Provide input operand for gccrs
+ * expand/rust-macro-builtins-asm.cc (parse_reg_operand_in):
+ Move expr to In
+ (expand_inline_asm_strings):
+ Add comments to debug strings
+
+2025-03-19 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * typecheck/rust-hir-type-check-pattern.cc: Add includes.
+ (TypeCheckPattern::visit): Use name resolver 2.0 if enabled.
+ * resolve/rust-name-resolution-context.cc
+ (NameResolutionContext::lookup): Make const qualified.
+ * resolve/rust-name-resolution-context.h
+ (NameResolutionContext::lookup): Likewise.
+
+2025-03-19 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): Allow IdentifierExpr and PathInExpression to
+ reference types as well as values, remove ability for
+ IdentifierExpr to reference labels.
+
+2025-03-19 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-ast-visitor.cc
+ (DefaultASTVisitor::visit): Visit fields of InlineAsm.
+
+2025-03-19 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * backend/rust-compile-item.cc
+ (CompileItem::visit): Check canonical path of StaticItem
+ properly when name resolution 2.0 is enabled.
+ * resolve/rust-toplevel-name-resolver-2.0.cc
+ (TopLevel::visit): Insert static items into the value namespace.
+
+2025-03-19 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-expr.h
+ (InlineAsmOperand): Replace multiple mutually-exclusive tl::optional
+ fields with a std::unique_ptr and modify nested classes to allow
+ this. Also, make getters return references where possible.
+ * expand/rust-macro-builtins-asm.cc
+ (parse_reg_operand_out): Pass location when constructing
+ InlineAsmOperand.
+
+2025-03-19 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-toplevel-name-resolver-2.0.cc
+ (TopLevel::visit): Handle TypeAlias.
+ * resolve/rust-toplevel-name-resolver-2.0.h
+ (TopLevel::visit): Likewise.
+
+2025-03-19 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * typecheck/rust-hir-type-check-enumitem.cc: Add includes.
+ (TypeCheckEnumItem::visit): Fetch canonical paths properly when
+ name resolution 2.0 is enabled.
+ * typecheck/rust-hir-type-check-implitem.cc: Add includes.
+ (TypeCheckImplItem::visit): Fetch canonical paths properly when
+ name resolution 2.0 is enabled.
+ * typecheck/rust-hir-type-check-item.cc: Add include.
+ (TypeCheckItem::visit): Fetch canonical paths properly when name
+ resolution 2.0 is enabled.
+
+2025-03-19 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-finalize-imports-2.0.cc
+ (GlobbingVisitor::visit): Replace calls to insert_shadowable with
+ insert_globbed.
+ * resolve/rust-forever-stack.h
+ (ForeverStack::insert_globbed): Add.
+ * resolve/rust-forever-stack.hxx
+ (ForeverStack::insert_globbed): Add.
+ (ForeverStack::dfs): Handle modifications to Rib::Definition
+ fields.
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): Make IdentifierPattern-based declarations
+ shadowable.
+ * resolve/rust-name-resolution-context.cc
+ (NameResolutionContext::insert_globbed): Add.
+ * resolve/rust-name-resolution-context.h
+ (NameResolutionContext::insert_globbed): Add.
+ * resolve/rust-rib.cc
+ (Rib::Definition::Definition): Use Rib::Definition::Mode to
+ indicate shadowing mode instead of boolean, handle modifications
+ to Rib::Definition fields.
+ (Rib::Definition::is_ambiguous): Handle modifications to
+ Rib::Definition fields.
+ (Rib::Definition::to_string): Likewise.
+ (Rib::Definition::Shadowable): Handle changed constructor
+ signature.
+ (Rib::Definition::NonShadowable): Likewise.
+ (Rib::Definition::Globbed): Add.
+ (Rib::insert): Handle changes to Rib::Definition fields.
+ * resolve/rust-rib.h
+ (Rib::Definition::Globbed): Add.
+ (Rib::Definition::ids): Remove.
+ (Rib::Definition::ids_shadowable): Add.
+ (Rib::Definition::ids_non_shadowable): Add.
+ (Rib::Definition::ids_globbed): Add.
+ (Rib::Definition::get_node_id): Handle modifications to
+ Rib::Definition fields.
+ (Rib::Definition::Mode): Add.
+ (Rib::Definition::Definition): Use Rib::Definition::Mode to
+ indicate shadowing mode instead of boolean.
+
+2025-03-19 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-trait-resolve.cc (TraitResolver::resolve_path_to_trait):
+ use error handling instead of assertion
+ * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): reuse trait reference
+ * typecheck/rust-hir-type-check-item.h: update prototype
+
+2025-03-19 Philip Herron <herron.philip@googlemail.com>
+
+ * resolve/rust-ast-resolve-type.cc (ResolveTypeToCanonicalPath::visit): add unit-type catch
+ * resolve/rust-ast-resolve-type.h: likewise
+
+2025-03-19 Philip Herron <herron.philip@googlemail.com>
+
+ * Make-lang.in: new objects
+ * ast/rust-ast-builder.cc (Builder::generic_type_path_segment): new helper
+ (Builder::single_generic_type_path): likewise
+ (Builder::new_type): likewise
+ (Builder::new_lifetime_param): likewise
+ (Builder::new_type_param): likewise
+ (Builder::new_lifetime): likewise
+ (Builder::new_generic_args): likewise
+ * ast/rust-ast-builder.h: new helper decls
+ * ast/rust-ast.h: new const getters
+ * ast/rust-path.h: likewise
+ * ast/rust-type.h: likewise
+ * expand/rust-derive-clone.cc (DeriveClone::clone_impl): take the types generics
+ (DeriveClone::visit_tuple): likewise
+ (DeriveClone::visit_struct): likewise
+ (DeriveClone::visit_union): likewise
+ * expand/rust-derive-clone.h: update header
+ * expand/rust-derive-copy.cc (DeriveCopy::copy_impl): similarly take type generics
+ (DeriveCopy::visit_struct): likewise
+ (DeriveCopy::visit_tuple): likewise
+ (DeriveCopy::visit_enum): likewise
+ (DeriveCopy::visit_union): likewise
+ * expand/rust-derive-copy.h: likewse
+ * ast/rust-ast-builder-type.cc: New file.
+ * ast/rust-ast-builder-type.h: New file.
+
+2025-03-19 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust-session-manager.cc (Session::expansion): Break on error after
+ top level name resolution.
+
+2025-03-19 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Resolve
+ TypeParam.
+ * resolve/rust-toplevel-name-resolver-2.0.h: Add visit function
+ prototype.
+
+2025-03-19 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast.h: Node id getter could be const.
+
+2025-03-19 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-late-name-resolver-2.0.h: Add visit function prototype.
+ * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Change resolved
+ type segment.
+
+2025-03-19 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Remove
+ assertion and explicitely tells why we ignore the insertion result.
+
+2025-03-19 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * Make-lang.in: Add new rust-bir-builder-pattern file.
+ * checks/errors/borrowck/rust-bir-builder-pattern.h: Remove
+ implementation.
+ * checks/errors/borrowck/rust-bir-builder-pattern.cc: New file.
+
+2025-03-19 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-ast-visitor.h: Make visit functions public.
+
+2025-03-19 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-finalize-imports-2.0.h: Add parent member functions
+ from default resolver.
+
+2025-03-19 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-default-resolver.cc (DefaultResolver::visit): Use
+ default visitor instead.
+
+2025-03-19 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-default-resolver.cc (DefaultResolver::visit): Remove
+ default visit code and replace it with call to default visitor.
+ * resolve/rust-default-resolver.h: Remove removed function's
+ prototypes.
+
+2025-03-19 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-default-resolver.cc (DefaultResolver::visit): Remove
+ empty visit function implementations.
+ * resolve/rust-default-resolver.h: Remove corresponding prototypes.
+
+2025-03-19 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-default-resolver.h: Make most visit function override.
+
+2025-03-19 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-early-name-resolver-2.0.cc (Early::Early): Add dirty
+ flag initialization.
+ (Early::go): Set dirty flag using top level resolver.
+ * resolve/rust-early-name-resolver-2.0.h: Add dirty flag.
+ * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::TopLevel):
+ Initialize dirty flag.
+ (TopLevel::insert_or_error_out): Set dirty flag on successful
+ namespace modification.
+ * resolve/rust-toplevel-name-resolver-2.0.h: Add dirty flag.
+ * rust-session-manager.cc (Session::expansion): Modify fixed point
+ condition to include name resolution modifications.
+
+2025-03-19 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-rib.cc (Rib::insert): Emit an error when trying to
+ insert an already inserted node.
+
+2025-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-early-name-resolver-2.0.h: New class for imports.
+ * resolve/rust-finalize-imports-2.0.cc (finalize_simple_import): Use
+ the new API.
+ (finalize_glob_import): Likewise.
+ (finalize_rebind_import): Likewise.
+ (FinalizeImports::FinalizeImports): Likewise.
+ (FinalizeImports::visit): Likewise.
+ * resolve/rust-finalize-imports-2.0.h: Likewise.
+ * resolve/rust-early-name-resolver-2.0.cc (Early::resolve_glob_import): Likewise.
+ (Early::resolve_simple_import): Likewise.
+ (Early::resolve_rebind_import): Likewise.
+
+2025-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-early-name-resolver-2.0.cc (Early::resolve_simple_import):
+ Insert import in all namespaces where they were resolved.
+ (Early::resolve_rebind_import): Likewise.
+ * resolve/rust-early-name-resolver-2.0.h: Improve APIs, make them
+ accept multiple resolutions.
+ * resolve/rust-finalize-imports-2.0.cc: Handle multiple resolutions.
+ * resolve/rust-name-resolution-context.h (resolve_path): Remove function.
+
+2025-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-early-name-resolver-2.0.cc (Early::visit_attributes):
+ Store errors for later.
+
+2025-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-finalize-imports-2.0.cc (FinalizeImports::go): Turn
+ static method into method.
+ (FinalizeImports::visit): New.
+ * resolve/rust-finalize-imports-2.0.h (class FinalizeImports): Make
+ FinalizeImports a visitor.
+ * resolve/rust-early-name-resolver-2.0.cc (Early::go): Use new FinalizeImports API.
+ (Early::resolve_glob_import): Use new API.
+ (Early::resolve_simple_import): Likewise.
+ (Early::resolve_rebind_import): Likewise.
+ (Early::build_import_mapping): Likewise.
+ * resolve/rust-early-name-resolver-2.0.h: Likewise.
+ * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Likewise.
+ * resolve/rust-toplevel-name-resolver-2.0.h: Likewise.
+
+2025-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Add debug call.
+ * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Store
+ imports using the new classes.
+ * resolve/rust-toplevel-name-resolver-2.0.h: Use new classes.
+
+2025-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-early-name-resolver-2.0.cc (Early::resolve_glob_import):
+ Use ImportData class.
+ (Early::resolve_simple_import): Likewise.
+ (Early::resolve_rebind_import): Likewise.
+ (Early::build_import_mapping): Likewise.
+ * resolve/rust-early-name-resolver-2.0.h: Likewise.
+ * resolve/rust-finalize-imports-2.0.cc (finalize_simple_import): Likewise.
+ (finalize_glob_import): Likewise.
+ (finalize_rebind_import): Likewise.
+ (FinalizeImports::go): Likewise.
+ * resolve/rust-finalize-imports-2.0.h: Likewise.
+ * resolve/rust-name-resolution-context.h: Likewise.
+ * resolve/rust-rib.h: Define ImportData class.
+
+2025-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * Make-lang.in: Add new object file.
+ * ast/rust-item.h: Constify method.
+ * resolve/rust-early-name-resolver-2.0.cc (Early::go): Call into
+ the imports finalizer.
+ (Early::resolve_glob_import): Remove old resolution.
+ (Early::resolve_rebind_import): Likewise.
+ * resolve/rust-toplevel-name-resolver-2.0.cc (GlobbingVisitor::go):
+ New function.
+ (GlobbingVisitor::visit): Likewise.
+ (TopLevel::visit): Do not call into handle_use_* functions anymore.
+ * resolve/rust-toplevel-name-resolver-2.0.h (class GlobbingVisitor):
+ New.
+ * resolve/rust-finalize-imports-2.0.cc: New file.
+ * resolve/rust-finalize-imports-2.0.h: New file.
+
+2025-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-early-name-resolver-2.0.cc (Early::resolve_glob_import): New function.
+ (Early::resolve_simple_import): Likewise.
+ (Early::resolve_rebind_import): Likewise.
+ (Early::build_import_mapping): Likewise.
+ * resolve/rust-early-name-resolver-2.0.h: Add declarations and list of imports to
+ resolve.
+ * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::handle_use_glob): Remove function,
+ which is now being handled by the Early name resolver.
+ (TopLevel::handle_use_dec): Likewise.
+ (TopLevel::handle_rebind): Likewise.
+ * resolve/rust-toplevel-name-resolver-2.0.h: Likewise, and add functions for creating
+ import list and fetching it.
+
+2025-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-toplevel-name-resolver-2.0.cc: Comment out handle_use
+ call and error emission.
+ * resolve/rust-toplevel-name-resolver-2.0.h: Create ImportKind class.
+
+2025-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::handle_use_dec):
+ Add notes on the problem.
+ * resolve/rust-toplevel-name-resolver-2.0.h: Likewise.
+
+2025-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-default-resolver.cc (DefaultResolver::visit): Do not
+ visit self's type if it does not have one.
+
+2025-03-19 Philip Herron <herron.philip@googlemail.com>
+
+ * hir/rust-ast-lower-type.cc (ASTLowerQualifiedPathInType::visit):
+ check for valid as segment
+
+2025-03-19 Philip Herron <herron.philip@googlemail.com>
+
+ * resolve/rust-ast-resolve-type.cc (ResolveType::visit):
+ handle never type
+ (ResolveTypeToCanonicalPath::visit): likewise
+ * resolve/rust-ast-resolve-type.h: missing never type
+ * resolve/rust-name-resolver.cc (Resolver::generate_builtins):
+ track never type node_id
+ (Resolver::setup_builtin): likewise
+ * resolve/rust-name-resolver.h: new never type getter
+
+2025-03-19 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-default-resolver.cc
+ (DefaultResolver::visit): Remove some empty overloads which
+ DefaultASTVisitor::visit should be able to handle.
+ * resolve/rust-default-resolver.h
+ (DefaultResolver::visit): Likewise.
+
+2025-03-19 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * util/optional.h
+ (optional): Add assertions to dereference operator overloads
+ when C++14 is available.
+
+2025-03-19 Marc Poulhiès <dkm@kataplop.net>
+
+ * hir/rust-hir-dump.cc (Dump::visit): Add missing fields.
+
+2025-03-19 Philip Herron <herron.philip@googlemail.com>
+
+ * hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): the polarity was reversed
+ * typecheck/rust-hir-type-check-item.cc: check the polarity
+
+2025-03-19 benjamin.thos <benjamin.thos@epita.fr>
+
+ * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Add
+ implementation of error propagation visitor
+ * resolve/rust-ast-resolve-expr.h: Add prototype of error
+ propagation
+
+2025-03-19 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Add optional
+ check.
+
+2025-03-19 JoanVC <github-91yu@joanvc.cat>
+
+ * backend/rust-compile-expr.cc
+
+2025-03-19 JoanVC <github-91yu@joanvc.cat>
+
+ * backend/rust-compile-expr.cc: Fix range checking for both integers and floats.
+ * hir/tree/rust-hir-expr.h: Add "negative_number" boolean to LiteralExpr class.
+
+2025-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust-session-manager.cc (Session::compile_crate): Use less repetition,
+ fix a typo in `reports`, fix word order.
+
+2025-03-19 benjamin.thos <benjamin.thos@epita.fr>
+
+ * checks/errors/rust-feature-gate.cc (FeatureGate::visit): Emit error
+ on trait when auto field member true.
+ * checks/errors/rust-feature-gate.h: add prototype of trait visitor.
+ * checks/errors/rust-feature.cc (Feature::create): add
+ optin_builtin_traits in match of feature.
+
+2025-03-19 Raiki Tamura <tamaron1203@gmail.com>
+
+ * Make-lang.in: Add rust-hir-pattern-analysis.o.
+ * rust-session-manager.cc (Session::compile_crate):
+ Add pattern analysis pass.
+ * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit):
+ Do typecheck for subpatterns.
+ * checks/errors/rust-hir-pattern-analysis.cc: New file.
+ * checks/errors/rust-hir-pattern-analysis.h: New file.
+
+2025-03-19 Liam Naddell <liam.naddell@mail.utoronto.ca>
+
+ * backend/rust-compile.cc:
+ Modify compute_address_for_trait_item to support supertraits
+ * typecheck/rust-tyty.cc:
+ Remove auto
+
+2025-03-19 Kushal Pal <kushalpal109@gmail.com>
+
+ * checks/errors/borrowck/rust-bir-dump.cc (Dump::go): Use strong
+ type instead of size_t.
+ (Dump::visit_place): Likewise.
+ (Dump::visit_scope): Likewise.
+ * checks/errors/borrowck/rust-bir-dump.h (class Dump): Use
+ IndeVec for place_map.
+
+2025-03-19 Kushal Pal <kushalpal109@gmail.com>
+
+ * checks/errors/borrowck/rust-bir-dump.cc (simplify_cfg):
+ Used `IndexVec` for bb_fold_map.
+ (Dump::go): Use strong type as index instead of value as now we
+ are using `IndexVec`.
+ (Dump::visit): Likewise.
+ * checks/errors/borrowck/rust-bir-dump.h (class Dump): Use
+ `IndexVec` for bb_fold_map.
+ * checks/errors/borrowck/rust-bir-place.h: Add constructor for
+ `IndexVec` that can reserve size.
+
+2025-03-19 Kushal Pal <kushalpal109@gmail.com>
+
+ * checks/errors/borrowck/rust-bir-place.h: Use strong types as
+ index.
+
+2025-03-19 Kushal Pal <kushalpal109@gmail.com>
+
+ * checks/errors/borrowck/rust-bir-builder-expr-stmt.cc
+ (ExprStmtBuilder::visit): Use strong type as index and
+ remove access to numeric value.
+ * checks/errors/borrowck/rust-bir-builder-internal.h
+ (struct BuilderContext): Likewise.
+ * checks/errors/borrowck/rust-bir-dump.cc (simplify_cfg):
+ Likewise.
+ (Dump::go): Likewise.
+ (Dump::visit): Likewise.
+ * checks/errors/borrowck/rust-bir-fact-collector.h
+ (class FactCollector): Likewise.
+ (points): Likewise.
+ * checks/errors/borrowck/rust-bir.h (struct BasicBlockId): Used
+ IndexVec for BasicBlocks.
+ (struct Function): Likewise.
+ * checks/errors/borrowck/rust-borrow-checker-diagnostics.cc
+ (BorrowCheckerDiagnostics::get_statement): Change the extracted
+ index to strong type.
+
+2025-03-19 Kushal Pal <kushalpal109@gmail.com>
+
+ * checks/errors/borrowck/rust-bir-place.h: Used `IndexVec` with
+ ScopeId as index.
+ * checks/errors/borrowck/rust-borrow-checker-diagnostics.cc
+ (BorrowCheckerDiagnostics::get_loan): Convert Polonius::Loan to
+ BIR::Loan, so we can use it as index.
+
+2025-03-19 Kushal Pal <kushalpal109@gmail.com>
+
+ * checks/errors/borrowck/rust-bir-place.h:
+ Used `IndexVec` with ScopeId as index.
+
+2025-03-19 Kushal Pal <kushalpal109@gmail.com>
+
+ * checks/errors/borrowck/rust-bir-place.h (struct Loan):
+ Introduce new class `IndexVec` inspired from IndexVec of rust.
+ It acts as a wrapper around `std::vector` and lets user specify
+ a strong type to use as index.
+
+2025-03-19 Kushal Pal <kushalpal109@gmail.com>
+
+ * checks/errors/borrowck/rust-bir-builder-expr-stmt.cc (ExprStmtBuilder::visit):
+ Use value of BasicBlockId as index.
+ * checks/errors/borrowck/rust-bir-builder-internal.h (struct BuilderContext):
+ Likewise.
+ * checks/errors/borrowck/rust-bir-builder-lazyboolexpr.h:
+ Initialize with ENTRY_BASIC_BLOCK.
+ * checks/errors/borrowck/rust-bir-dump.cc (simplify_cfg):
+ Use value of BasicBlockId as index.
+ (Dump::go): Likewise.
+ (Dump::visit): Likewise.
+ * checks/errors/borrowck/rust-bir-fact-collector.h (class FactCollector):
+ Initialize with ENTRY_BASIC_BLOCK.
+ (points): Use value of BasicBlockId as index.
+ * checks/errors/borrowck/rust-bir.h (struct BasicBlockId):
+ BasicBlockId is a struct now.
+
+2025-03-19 Kushal Pal <kushalpal109@gmail.com>
+
+ * checks/errors/borrowck/rust-bir-builder-expr-stmt.cc
+ (ExprStmtBuilder::setup_loop): Use value of ScopeId.
+ (ExprStmtBuilder::visit): Use continue scope id instead of
+ continue basic block id.
+ * checks/errors/borrowck/rust-bir-builder-internal.h: Use value
+ of ScopeId.
+ * checks/errors/borrowck/rust-bir-dump.cc (Dump::go): Use
+ ROOT_VALUE instead of hardcoded 0.
+ (Dump::visit_scope): Use value of ScopeId.
+ * checks/errors/borrowck/rust-bir-place.h (struct ScopeId):
+ ScopeId is now a struct.
+ (std::numeric_limits::max): Set invalid ScopeId.
+
+2025-03-19 Kushal Pal <kushalpal109@gmail.com>
+
+ * checks/errors/borrowck/rust-bir-dump.cc (Dump::visit): Use new
+ API, i.e get_loan_id() instead of get_loan().
+ * checks/errors/borrowck/rust-bir-fact-collector.h (points): Use
+ value of LoanId in Polonius facts.
+ * checks/errors/borrowck/rust-bir-place.h (struct LoanId):
+ LoanId is a struct now.
+ * checks/errors/borrowck/rust-bir.h (class AbstractExpr): Use
+ new API, as we are getting a LoanId and not a loan itself.
+
+2025-03-19 Kushal Pal <kushalpal109@gmail.com>
+
+ * checks/errors/borrowck/rust-bir-builder-internal.h: Use
+ FreeRegions instead of making a temporary vector of FreeRegion.
+ * checks/errors/borrowck/rust-bir-builder.h: Likewise.
+ * checks/errors/borrowck/rust-bir-fact-collector.h (class FactCollector):
+ Likewise.
+ (points): Likewise.
+ * checks/errors/borrowck/rust-bir-free-region.h: Remove obsolete
+ set_from() helpers, add push_back().
+ * checks/errors/borrowck/rust-bir-place.h: Use FreeRegions
+ instead of making a temporary vector of Origin.
+ * typecheck/rust-tyty-variance-analysis-private.h: Change type
+ of `regions`.
+ * typecheck/rust-tyty-variance-analysis.cc (CrateCtx::query_type_regions):
+ Use new type.
+ (GenericTyPerCrateCtx::query_generic_variance): Likewise.
+ (TyVisitorCtx::add_constraints_from_generic_args): Likewise.
+ (FieldVisitorCtx::add_constraints_from_region): Likewise.
+ (FieldVisitorCtx::add_constrints_from_param): Likewise.
+ * typecheck/rust-tyty-variance-analysis.h: Likewise.
+
+2025-03-19 Kushal Pal <kushalpal109@gmail.com>
+
+ * checks/errors/borrowck/rust-bir-builder-internal.h: Use
+ STATIC_FREE_REGION, use value of FreeRegion for origin.
+ * checks/errors/borrowck/rust-bir-builder.h: Use free region
+ value.
+ * checks/errors/borrowck/rust-bir-dump.cc (Dump::visit_scope):
+ Likewise.
+ * checks/errors/borrowck/rust-bir-fact-collector.h (points):
+ Likewise.
+ * checks/errors/borrowck/rust-bir-free-region.h (struct FreeRegion):
+ Make FreeRegion a struct.
+ * checks/errors/borrowck/rust-bir-place.h: Use FreeRegion
+ instead of Origin in PlaceDB.
+ * typecheck/rust-tyty-variance-analysis.cc (FieldVisitorCtx::add_constraints_from_region):
+ Use value of FreeRegion for origin.
+ (FieldVisitorCtx::add_constrints_from_param): Likewise.
+ (Term::make_transform): Likewise.
+
+2025-03-19 Kushal Pal <kushalpal109@gmail.com>
+
+ * checks/errors/borrowck/rust-bir-dump.cc (renumber_places):
+ Use value of PlaceId as index.
+ (Dump::visit_place): Likewise.
+ (Dump::visit_scope): Likewise.
+ (Dump::go): Refill `place_map` with for loop instead of
+ using std::iota().
+ * checks/errors/borrowck/rust-bir-fact-collector.h (points): Use
+ value as index.
+ * checks/errors/borrowck/rust-bir-place.h (struct PlaceId):
+ PlaceId is now a class holding a uint32_t value. Overloaded
+ comparision operators for easier comparision.
+
+2025-03-19 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-ast-resolve-pattern.cc
+ (PatternDeclaration::check_bindings_consistency): Check if
+ outer_bindings_map contains an entry before indexing.
+
+2025-03-19 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * util/rust-canonical-path.h
+ (CanonicalPath::CanonicalPath): Properly initialize crate_num
+ with copy constructor.
+
+2025-03-19 badumbatish <tanghocle456@gmail.com>
+
+ * backend/rust-compile-asm.cc (CompileAsm::visit):
+ Change API, public/private, comments, formatting from code
+ review
+ (CompileAsm::asm_build_expr): Likewise.
+ (CompileAsm::tree_codegen_asm): Likewise.
+ * backend/rust-compile-asm.h (class CompileAsm): Likewise.
+ * backend/rust-compile-expr.cc (CompileExpr::visit): Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::visit): Likewise.
+ * expand/rust-macro-builtins-asm.cc (strip_double_quotes): Likewise.
+ (parse_options): Likewise.
+ (parse_asm_arg): Likewise.
+ (expand_inline_asm_strings): Likewise.
+ (parse_asm): Likewise.
+ * expand/rust-macro-builtins-asm.h (strip_double_quotes): Likewise.
+ (expand_inline_asm_strings): Likewise.
+ (expand_inline_asm_string): Likewise.
+ * hir/tree/rust-hir-expr.h: Likewise.
+
+2025-03-19 badumbatish <tanghocle456@gmail.com>
+
+ * backend/rust-compile-asm.cc (CompileAsm::asm_build_expr):
+ Remove debug
+ * expand/rust-macro-builtins-asm.cc (expand_inline_asm_strings):
+ properly formatted via rust instead of c
+ (parse_asm): formatted comment
+ (parse_format_strings): formatted comment
+ * hir/tree/rust-hir-expr.h: fix is_simple_asm()
+
+2025-03-19 badumbatish <tanghocle456@gmail.com>
+
+ * backend/rust-compile-asm.cc (CompileAsm::asm_build_expr):
+ Use's array type when constring string tree
+ (CompileAsm::asm_construct_string_tree):
+ Use's array type when constring string tree
+
+2025-03-19 badumbatish <tanghocle456@gmail.com>
+
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit):
+ Added noreturn checking for nevertype
+
+2025-03-19 badumbatish <tanghocle456@gmail.com>
+
+ * backend/rust-compile-asm.cc (CompileAsm::asm_build_expr):
+ Add debug comment
+ (CompileAsm::asm_construct_outputs):
+ Perform lowering hir output operand to tree
+
+2025-03-19 badumbatish <tanghocle456@gmail.com>
+
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit):
+ Perform type check on InlineAsm's operand
+ (typecheck_inline_asm_operand): Likewise
+
+2025-03-19 badumbatish <tanghocle456@gmail.com>
+
+ * backend/rust-compile-asm.cc (CompileAsm::asm_construct_outputs):
+ Lower the HIR to tree with CompileExpr
+ * backend/rust-compile-asm.h: Remove static from method
+
+2025-03-19 badumbatish <tanghocle456@gmail.com>
+
+ * backend/rust-compile-asm.cc (strip_double_quotes):
+ Move strip double quotes to parse phase
+ (CompileAsm::asm_construct_string_tree): Likewise
+ * backend/rust-compile-asm.h (strip_double_quotes): Likewise
+ * expand/rust-macro-builtins-asm.cc (strip_double_quotes):
+ Likewise
+ (expand_inline_asm): Renamed to expand_inline_asm_strings
+ (expand_inline_asm_strings): Renamed from expand_inline_asm
+ (parse_asm): Move strip double quotes to parse phase
+ (parse_format_strings): Likewise
+ * expand/rust-macro-builtins-asm.h (strip_double_quotes):
+ Likewise
+ (expand_inline_asm_strings): Inline asm expansion fn
+ (expand_inline_asm_string): Inline asm expansion fn
+
+2025-03-19 badumbatish <tanghocle456@gmail.com>
+
+ * expand/rust-macro-builtins-asm.cc (parse_reg_operand):
+ Remove warnings
+ (parse_reg_operand_out): Remove warnings
+ (expand_inline_asm): New function for eventual expansion
+ (parse_asm): Use expand_inline_asm
+
+2025-03-19 badumbatish <tanghocle456@gmail.com>
+
+ * backend/rust-compile-asm.cc (CompileAsm::asm_construct_outputs):
+ Set up counting to check
+
+2025-03-19 badumbatish <tanghocle456@gmail.com>
+
+ * backend/rust-compile-asm.cc (CompileAsm::asm_build_expr):
+ Use expr's is_simple_asm and is_inline_asm
+ (CompileAsm::asm_is_simple): removed
+ (CompileAsm::asm_is_inline): removed
+ * backend/rust-compile-asm.h: Add docs to ASM_TREE_ARRAY_LENGTH
+ * hir/tree/rust-hir-expr.h: Add is_simple_asm, is_inline_asm
+ and remove #include tree
+
+2025-03-19 badumbatish <tanghocle456@gmail.com>
+
+ * backend/rust-compile-asm.cc (strip_double_quotes):
+ Refactor compile-asm for first round review
+ (CompileAsm::asm_build_asm_stmt): Likewise.
+ (CompileAsm::asm_build_expr): Likewise.
+ (CompileAsm::asm_get_locus): Likewise.
+ (CompileAsm::asm_construct_string_tree): Likewise.
+ (CompileAsm::asm_construct_outputs): Likewise.
+ (CompileAsm::asm_construct_inputs): Likewise.
+ (CompileAsm::asm_construct_clobber_tree): Likewise.
+ (CompileAsm::asm_construct_label_tree): Likewise.
+ (CompileAsm::asm_is_simple): Likewise.
+ (CompileAsm::asm_is_inline): Likewise.
+ * backend/rust-compile-asm.h (strip_double_quotes): Likewise.
+ (class CompileAsm): Likewise.
+
+2025-03-19 badumbatish <tanghocle456@gmail.com>
+
+ * backend/rust-compile-asm.cc (CompileAsm::add_stmt):
+ Deleted
+ (CompileAsm::CompileAsm):
+ Successfully produce pseudo-nop
+ (CompileAsm::visit): Likewise
+ (CompileAsm::asm_build_asm_stmt): Likewise
+ (CompileAsm::asm_construct_string_tree): Likewise
+ (CompileAsm::asm_is_inline): Likewise
+ * backend/rust-compile-asm.h (class CompileAsm): Likewise
+ * backend/rust-compile-expr.cc (CompileExpr::visit): Likewise
+
+2025-03-19 badumbatish <tanghocle456@gmail.com>
+
+ * backend/rust-compile-asm.cc (CompileAsm::add_stmt):
+ Scaffolding code.
+ (CompileAsm::asm_build_asm_stmt): Likewise.
+ (CompileAsm::asm_build_expr): Likewise.
+ (CompileAsm::asm_construct_string_tree): Likewise.
+ * backend/rust-compile-asm.h: Likewise.
+ * backend/rust-compile-expr.cc (CompileExpr::visit): Likewise.
+
+2025-03-19 badumbatish <tanghocle456@gmail.com>
+
+ * Make-lang.in:
+ Scaffolding new compile-asm files
+ * backend/rust-compile-expr.cc (CompileExpr::visit): Likewise
+ * hir/tree/rust-hir-expr.h: Likewise
+ * backend/rust-compile-asm.cc: New file. Likewise
+ * backend/rust-compile-asm.h: New file. Likewise
+
+2025-03-19 jjasmine <tanghocle456@gmail.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::visit):
+ Setting up interfaces for codegen
+ * hir/tree/rust-hir-expr.h: Likewise.
+
+2025-03-19 jjasmine <tanghocle456@gmail.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::visit):
+ Local testing for build_string and debug()
+
+2025-03-19 jjasmine <tanghocle456@gmail.com>
+
+ * hir/tree/rust-hir.cc (InlineAsm::accept_vis):
+ Make sure CompileExpr::visit is reached
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit):
+ Likewise
+
+2025-03-19 jjasmine <tanghocle456@gmail.com>
+
+ * backend/rust-compile-block.h:
+ Scaffolding asm codegen
+ * backend/rust-compile-expr.cc (CompileExpr::visit): Likewise.
+ * backend/rust-compile-expr.h: Likewise.
+ * checks/errors/borrowck/rust-bir-builder-expr-stmt.cc (ExprStmtBuilder::visit): Likewise.
+ * checks/errors/borrowck/rust-bir-builder-expr-stmt.h: Likewise.
+ * checks/errors/borrowck/rust-bir-builder-lazyboolexpr.h: Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::visit): Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.h: Likewise.
+ * hir/tree/rust-hir-expr.h: Likewise.
+ * hir/tree/rust-hir-visitor.h: Likewise.
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Likewise.
+ * typecheck/rust-hir-type-check-expr.h: Likewise.
+
+2025-03-19 badumbatish <tanghocle456@gmail.com>
+
+ * expand/rust-macro-builtins-asm.cc (parse_reg_operand):
+ Fix parsing logic & reassignment logic
+ (parse_reg_operand_in): Fix parsing
+ (parse_reg_operand_out): Fix parsing
+ (parse_reg_operand_inout): Fix parsing
+ (parse_reg_operand_unexpected): Remove rust_unreachable()
+ (parse_asm_arg): Fix parsing logic
+
+2025-03-19 badumbatish <tanghocle456@gmail.com>
+
+ * typecheck/rust-hir-type-check.h:
+ Add pop guard for binder
+
+2025-03-19 badumbatish <tanghocle456@gmail.com>
+
+ * resolve/rust-ast-resolve.cc (NameResolution::go):
+ Fix warnings from const auto& to const auto
+
+2025-03-19 Raiki Tamura <tamaron1203@gmail.com>
+
+ * lex/rust-lex.cc (Lexer::build_token): Emit error code.
+ * lex/rust-lex.h: Fix comment.
+
+2025-03-19 Raiki Tamura <tamaron1203@gmail.com>
+
+ * hir/tree/rust-hir.cc (Item::item_kind_string): New function.
+ * hir/tree/rust-hir.h: New function.
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit):
+ Modify to check all arms in match expressions even if some of them
+ has errors.
+ * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit):
+ Add and fix check for path patterns.
+
+2025-03-19 Raiki Tamura <tamaron1203@gmail.com>
+
+ * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit):
+ Add check for union patterns.
+
+2025-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * checks/errors/rust-feature.cc (Feature::create): Reuse variable,
+ remove now optional parameters from constructor.
+ * checks/errors/rust-feature.h: Cleanup class definition.
+ * checks/errors/rust-feature-gate.cc (FeatureGate::gate): Use optional.
+ * checks/errors/rust-feature-gate.h: Cleanup visitor implementation.
+ * checks/errors/borrowck/ffi-polonius/Cargo.lock: New file.
+
+2025-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * checks/errors/rust-feature-gate.cc (FeatureGate::visit): Add base
+ feature gating for `#[feature(prelude_import)]`.
+ * checks/errors/rust-feature-gate.h: Likewise.
+ * checks/errors/rust-feature.cc (Feature::create): Likewise.
+ * checks/errors/rust-feature.h: Likewise.
+ * util/rust-attribute-values.h: Add base handling for `#[prelude_import]`
+ attribute.
+ * util/rust-attributes.cc: Likewise.
+
+2025-03-19 badumbatish <tanghocle456@gmail.com>
+
+ * ast/rust-ast-full-decls.h (struct InlineAsmOperand):
+ Change to class
+ (class InlineAsmOperand): Change from struct
+ * hir/tree/rust-hir-full-decls.h (struct InlineAsmRegOrRegClass):
+ Removed from decl, used from AST
+ (struct AnonConst): new decl from rust-hir-expr.h
+ (class InlineAsmOperand): new decl from rust-hir-expr.h
+
+2025-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-full-decls.h (class PathPattern): Rename PathPattern to...
+ (class Path): ...Path
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Add required methods
+ for LangItemPath and RegularPath.
+ * ast/rust-ast-collector.h: Likewise.
+ * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Likewise.
+ * ast/rust-ast-visitor.h: Likewise.
+ * ast/rust-path.cc (PathPattern::as_string): Likewise.
+ (RegularPath::as_string): Likewise.
+ (LangItemPath::as_string): Likewise.
+ (PathPattern::convert_to_simple_path): Likewise.
+ (RegularPath::convert_to_simple_path): Likewise.
+ (RegularPath::accept_vis): Likewise.
+ (LangItemPath::accept_vis): Likewise.
+ (PathInExpression::as_string): Likewise.
+ (QualifiedPathInExpression::as_string): Likewise.
+ * ast/rust-path.h (class PathPattern): Likewise.
+ (class Path): Likewise.
+ (class RegularPath): Likewise.
+ (class LangItemPath): Likewise.
+ (class PathInExpression): Likewise.
+ (class QualifiedPathInExpression): Likewise.
+ * ast/rust-pattern.h (class PathPattern): Likewise.
+ (class Path): Likewise.
+ * expand/rust-derive.h: Likewise.
+ * hir/rust-ast-lower-base.cc (ASTLoweringBase::visit): Likewise.
+ * hir/rust-ast-lower-base.h: Likewise.
+ * resolve/rust-ast-resolve-base.cc (ResolverBase::visit): Likewise.
+ * resolve/rust-ast-resolve-base.h: Likewise.
+
+2025-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast.h (class PathExpr): Remove class.
+ * ast/rust-path.h (class PathInExpression): Inherit from ExprWithoutBlock.
+ (class QualifiedPathInExpression): Likewise.
+
+2025-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-path.h (class PathInExpression): Remove `remove_all_segments`
+ method, add a `marked_for_strip` flag instead.
+
+2025-03-19 Muhammad Mahad <mahadtxt@gmail.com>
+
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit):
+ Add error code and update error message
+
+2025-03-19 Kushal Pal <kushalpal109@gmail.com>
+
+ * checks/errors/borrowck/rust-borrow-checker-diagnostics.cc
+ (BorrowCheckerDiagnostics::report_move_errors): Specify
+ locations for code causing errors and related moves.
+
+2025-03-19 Kushal Pal <kushalpal109@gmail.com>
+
+ * checks/errors/borrowck/rust-borrow-checker-diagnostics.cc
+ (BorrowCheckerDiagnostics::report_subset_errors): Highlight
+ lifetime locations while reporting subset errors.
+ (BorrowCheckerDiagnostics::get_lifetime_param): Helper function
+ to fetch HIR::Lifetime node from Polonius::Origin.
+ * checks/errors/borrowck/rust-borrow-checker-diagnostics.h:
+ Definition of helper function.
+
+2025-03-19 Kushal Pal <kushalpal109@gmail.com>
+
+ * checks/errors/borrowck/rust-bir-builder.h: Map regions to
+ their respective HIR nodes.
+ * checks/errors/borrowck/rust-bir.h (struct Function):
+ Add unordered_map to maintain the mapping.
+
+2025-03-19 Liam Naddell <liam.naddell@mail.utoronto.ca>
+
+ * typecheck/rust-hir-type-check-pattern.cc:
+ Emit E0532 when trying to reference a Tuple or Struct variant
+ using a non Tuple or Struct pattern.
+
+2025-03-19 Liam Naddell <liam.naddell@mail.utoronto.ca>
+
+ * expand/rust-expand-visitor.h:
+ remove auto keyword
+ * expand/rust-macro-builtins-helpers.cc:
+ allow for changing macro invoc types on eager expansions to
+ semicoloned macros
+ * expand/rust-macro-builtins-helpers.h:
+ add default semicoloned argument
+ * expand/rust-macro-builtins-include.cc:
+ allow for eager expansion for include and include_bytes
+ allow for parsing include invocations as items instead of
+ expressions, which allows invocations at global scope
+ * expand/rust-macro-expand.cc:
+ push Expr type for eager invocations
+
+2025-03-19 Kushal Pal <kushalpal109@gmail.com>
+
+ * checks/errors/borrowck/rust-bir-builder-internal.h:
+ Use `make_*` functions to create BIR::Statements.
+ * checks/errors/borrowck/rust-bir.h: Make a complete constructor
+ and introduce `make_*` functions to create various
+ BIR::Statements.
+
+2025-03-19 Kushal Pal <kushalpal109@gmail.com>
+
+ * checks/errors/borrowck/rust-borrow-checker-diagnostics.cc
+ (BorrowCheckerDiagnostics::report_loan_errors): Add label to
+ where the borrow occurs and where the invalid access occurs.
+ (BorrowCheckerDiagnostics::get_statement):
+ Fetch BIR::Statement from Polonius::Point
+ (BorrowCheckerDiagnostics::get_loan):
+ Fetch BIR::Loan from Polonius::Loan
+ * checks/errors/borrowck/rust-borrow-checker-diagnostics.h:
+ Function definition of helpers.
+
+2025-03-19 Kushal Pal <kushalpal109@gmail.com>
+
+ * checks/errors/borrowck/rust-bir-builder-expr-stmt.cc (ExprStmtBuilder::visit):
+ Add location parameter.
+ * checks/errors/borrowck/rust-bir-builder.h: Likewise.
+ * checks/errors/borrowck/rust-bir-builder-internal.h: Add helper
+ function for pushing return statements.
+ * checks/errors/borrowck/rust-bir.h: Remove `expr` parameter as
+ it is only needed for ASSIGNMENT statements, for which we
+ already have a constructor.
+
+2025-03-19 badumbatish <tanghocle456@gmail.com>
+
+ * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit):
+ Implement resolve expr for inline asm ast
+ (translate_operand): Likewise.
+ * resolve/rust-ast-resolve-expr.h: Likewise.
+
+2025-03-19 Kushal Pal <kushalpal109@gmail.com>
+
+ * checks/errors/borrowck/rust-bir-builder-internal.h:
+ Fill location for loan.
+ * checks/errors/borrowck/rust-bir-place.h (struct Loan):
+ Add location field.
+
+2025-03-19 Kushal Pal <kushalpal109@gmail.com>
+
+ * checks/errors/borrowck/rust-bir-builder-expr-stmt.cc
+ (ExprStmtBuilder::visit): Added location parameter.
+ * checks/errors/borrowck/rust-bir-builder-internal.h: Likewise.
+ * checks/errors/borrowck/rust-bir-builder-lazyboolexpr.h:
+ Likewise.
+ * checks/errors/borrowck/rust-bir-builder-pattern.h: Likewise.
+ * checks/errors/borrowck/rust-bir-builder.h: Likewise.
+ * checks/errors/borrowck/rust-bir.h: Likewise.
+
+2025-03-19 badumbatish <tanghocle456@gmail.com>
+
+ * hir/rust-ast-lower-expr.cc (translate_operand_in):
+ Turn to switch case, use new helper functions
+ (translate_operand_out): Likewise.
+ (translate_operand_inout): Likewise.
+ (translate_operand_split_in_out): Likewise.
+ (translate_operand_const): Likewise.
+ (translate_operand_sym): Likewise.
+ (translate_operand_label): Likewise.
+ (from_operand): Likewise.
+ (ASTLoweringExpr::visit): Likewise.
+
+2025-03-19 badumbatish <tanghocle456@gmail.com>
+
+ * hir/rust-ast-lower-expr.cc (from_operand):
+ Set up the lowering for operand
+ (ASTLoweringExpr::visit): Likewise
+ * hir/tree/rust-hir-expr.h (struct InlineAsmRegOrRegClass):
+ Not necessary, kept from ast
+ (struct AnonConst): Set up lowering for operand
+ (class InlineAsmOperand): Likewise, add getters
+
+2025-03-19 Kushal Pal <kushalpal109@gmail.com>
+
+ * checks/errors/borrowck/polonius/rust-polonius.h (struct FullPoint):
+ Added comments and made extraction of statement more verbose for
+ better understanding.
+ * checks/errors/borrowck/ffi-polonius/src/lib.rs: Likewise.
+
+2025-03-19 badumbatish <tanghocle456@gmail.com>
+
+ * ast/rust-expr.h (struct InlineAsmOperand): changed to class
+ (class InlineAsmOperand): Have appropriate constructor,
+ and getter
+ * expand/rust-macro-builtins-asm.cc (parse_reg_operand):
+ Use the new implement constructors and new control flow.
+ (parse_reg_operand_in): Likewise
+ (parse_reg_operand_out): Likewise
+ (parse_reg_operand_inout): Likewise
+ (parse_reg_operand_const): Likewise
+
+2025-03-19 badumbatish <tanghocle456@gmail.com>
+
+ * ast/rust-expr.h (struct InlineAsmOperand):
+ Add construction for register_type
+ * expand/rust-macro-builtins-asm.cc (parse_reg_operand):
+ Fix parsing logic & reassignment logic
+ (parse_reg_operand_in): Fix parsing
+ (parse_reg_operand_out): Fix parsing
+ (parse_reg_operand_inout): Fix parsing
+ (parse_reg_operand_unexpected): Remove rust_unreachable()
+ (parse_asm_arg): Fix parsing logic
+ * expand/rust-macro-builtins-asm.h: Add = operator overloading
+
+2025-03-19 Kushal Pal <kushalpal109@gmail.com>
+
+ * checks/errors/borrowck/polonius/rust-polonius.h (struct FullPoint):
+ This is the correct way of extracting the required bits.
+
+2025-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * checks/errors/borrowck/ffi-polonius/src/gccrs_ffi.rs: Remove extern
+ type feature.
+ * checks/errors/borrowck/ffi-polonius/src/lib.rs: Define FFIVector
+ per the nomicon's recommendation
+ https://doc.rust-lang.org/nomicon/ffi.html#representing-opaque-structs
+
+2025-03-19 Liam Naddell <liam.naddell@mail.utoronto.ca>
+
+ * ast/rust-ast.cc:
+ Fix Attribute constructors to copy inner_attribute
+ * checks/errors/rust-unsafe-checker.cc:
+ Add pass for #[may_dangle] in safe impl's
+ * hir/rust-ast-lower-item.cc:
+ Add support for unsafe impl's
+ * hir/rust-ast-lower-type.cc:
+ Lower attributes in impl's from AST to HIR
+ * hir/rust-hir-dump.cc:
+ Change single attribute to AttrVec
+ * hir/tree/rust-hir-item.h:
+ Add unsafe support to Impl blocks in HIR
+ * hir/tree/rust-hir.cc:
+ Change single attribute to AttrVec
+ * hir/tree/rust-hir.h:
+ Add has/get_outer_attribute to GenericParam
+
+2025-03-19 Antonio Gomes <antoniospg100@gmail.com>
+
+ * expand/rust-cfg-strip.cc:
+ Strip struct expr fields and strip fields in struct definition
+ * expand/rust-cfg-strip.h:
+ Signatures for new function maybe_strip_struct_expr_fields
+
+2025-03-18 Marc Poulhiès <dkm@kataplop.net>
+
+ PR rust/119333
+ * Make-lang.in: Force offline mode for cargo
+
+2025-03-18 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * checks/errors/borrowck/ffi-polonius/.cargo/config.toml: New file, force vendored deps.
+ * checks/errors/borrowck/ffi-polonius/vendor/datafrog/.cargo-checksum.json: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/datafrog/CODE_OF_CONDUCT.md: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/datafrog/Cargo.toml: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/datafrog/LICENSE-APACHE: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/datafrog/LICENSE-MIT: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/datafrog/README.md: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/datafrog/RELEASES.md: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/datafrog/examples/borrow_check.rs: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/datafrog/examples/graspan1.rs: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/datafrog/src/join.rs: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/datafrog/src/lib.rs: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/datafrog/src/map.rs: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/datafrog/src/test.rs: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/datafrog/src/treefrog.rs: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/log/.cargo-checksum.json: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/log/CHANGELOG.md: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/log/Cargo.toml: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/log/LICENSE-APACHE: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/log/LICENSE-MIT: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/log/README.md: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/log/benches/value.rs: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/log/src/__private_api.rs: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/log/src/kv/error.rs: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/log/src/kv/key.rs: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/log/src/kv/mod.rs: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/log/src/kv/source.rs: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/log/src/kv/value.rs: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/log/src/lib.rs: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/log/src/macros.rs: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/log/src/serde.rs: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/log/triagebot.toml: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/polonius-engine/.cargo-checksum.json: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/polonius-engine/Cargo.toml: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/polonius-engine/README.md: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/polonius-engine/src/facts.rs: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/polonius-engine/src/lib.rs: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/polonius-engine/src/output/datafrog_opt.rs:
+ New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/polonius-engine/src/output/initialization.rs:
+ New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/polonius-engine/src/output/liveness.rs:
+ New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/polonius-engine/src/output/location_insensitive.rs:
+ New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/polonius-engine/src/output/mod.rs: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/polonius-engine/src/output/naive.rs: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/rustc-hash/.cargo-checksum.json: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/rustc-hash/CODE_OF_CONDUCT.md: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/rustc-hash/Cargo.toml: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/rustc-hash/LICENSE-APACHE: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/rustc-hash/LICENSE-MIT: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/rustc-hash/README.md: New file.
+ * checks/errors/borrowck/ffi-polonius/vendor/rustc-hash/src/lib.rs: New file.
+
2025-03-17 Muhammad Mahad <mahadtxt@gmail.com>
* typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit):