1 2023-07-05 Robin Dapp <rdapp@ventanamicro.com>
2 Juzhe-Zhong <juzhe.zhong@rivai.ai>
4 * backend/rust-tree.cc (c_common_type_for_mode): Ditto.
6 2023-06-22 Paul E. Murphy <murphyp@linux.ibm.com>
8 * rust-object-export.cc [TARGET_AIX]: Rename and update usage to
11 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com>
13 * parse/rust-parse-impl.h
14 (Parser::parse_stmt): Handle unsafe expression statements.
16 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com>
18 * parse/rust-parse-impl.h
19 (Parser::parse_expr_stmt): Remove hypothetical unsafe + expr_stmt_without_block handling.
21 2023-04-06 M V V S Manoj Kumar <mvvsmanojkumar@gmail.com>
23 * ast/rust-ast-full-decls.h (class InlineAsm):Added class declaration.
24 * ast/rust-expr.h (class InlineAsm):Added class definition.
26 2023-04-06 Arthur Cohen <arthur.cohen@embecosm.com>
28 * rust-diagnostics.h (struct Error): Add new Kind enum and various new
29 static constructors to allow for hints as well.
30 * rust-diagnostics.cc (Error::Error): Use new `kind` field properly.
31 * checks/errors/privacy/rust-visibility-resolver.cc
32 (VisibilityResolver::resolve_module_path): Use new Error API.
33 * expand/rust-macro-builtins.cc (MacroBuiltin::include_handler): Likewise.
34 * expand/rust-macro-expand.cc (parse_many): Likewise.
35 (transcribe_type): Likewise.
36 * parse/rust-parse-impl.h (Parser::parse_crate): Likewise.
37 * rust-session-manager.cc (Session::handle_crate_name): Likewise.
38 * ast/rust-ast.cc (Module::load_items): Likewise.
40 2023-04-06 Arthur Cohen <arthur.cohen@embecosm.com>
42 * ast/rust-ast.h: Keep location in TraitItem base class
43 * ast/rust-item.h (class TraitItemFunc): Use base class location instead.
44 (class TraitItemMethod): Likewise.
45 (class TraitItemConst): Likewise.
46 (class TraitItemType): Likewise.
47 * ast/rust-macro.h: Likewise.
49 2023-04-06 SainiAditya1 <Adityasaini10012001@outlook.com>
51 * hir/tree/rust-hir-full-test.cc: Moved to...
52 * hir/tree/rust-hir.cc: ...here.
53 * Make-lang.in: Rename rust-hir-full-test.
55 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com>
57 * ast/rust-ast-dump.cc
58 (Dump::visit): Add AltPattern visitor.
59 * ast/rust-ast-dump.h:
60 (Dump::visit): Add AltPattern visitor.
61 * ast/rust-ast-full-decls.h
62 (class AltPattern): Add declaration.
63 * ast/rust-ast-visitor.h:
64 (ASTVisitor::visit): Add AltPattern visitor.
66 (AltPattern::as_string): Add definition.
67 (AltPattern::accept_vis): Add definition.
69 (class AltPattern): Add declaration.
70 * checks/errors/rust-feature-gate.h:
71 (FeatureGate::visit) Add AltPattern visitor
72 * expand/rust-attribute-visitor.cc
73 (AttrVisitor::visit): Add AltPattern visitor.
74 * expand/rust-attribute-visitor.h:
75 (AttrVisitor::visit): Add AltPattern visitor.
76 * hir/rust-ast-lower-base.cc
77 (ASTLoweringBase::visit): Add AltPattern visitor.
78 * hir/rust-ast-lower-base.h:
79 (ASTLoweringBase::visit): Add AltPattern visitor.
80 * resolve/rust-ast-resolve-base.cc
81 (ResolverBase::visit): Add AltPattern visitor.
82 * resolve/rust-ast-resolve-base.h:
83 (ResolverBase::visit): Add AltPattern visitor.
84 * resolve/rust-early-name-resolver.cc
85 (EarlyNameResolver::visit): Add AltPattern visitor.
86 * resolve/rust-early-name-resolver.h:
87 (EarlyNameResolver::visit): Add AltPattern visitor.
88 * util/rust-attributes.cc
89 (AttributeChecker::visit): Add AltPattern visitor.
90 * util/rust-attributes.h:
91 (AttributeChecker::visit): Add AltPattern visitor.
93 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com>
95 * ast/rust-pattern.h: Fix formatting.
97 2023-04-06 Arthur Cohen <arthur.cohen@embecosm.com>
99 * expand/rust-macro-builtins.cc (MacroBuiltin::include_handler): Do not
100 return nullptr token in expansion of `include!()`
102 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com>
104 * checks/errors/rust-feature-gate.h: Add trailing newline before EOF.
106 2023-04-06 Philip Herron <herron.philip@googlemail.com>
108 * typecheck/rust-hir-trait-reference.cc (TraitReference::clear_associated_types): make const
109 (TraitReference::clear_associated_type_projections): new interface
110 * typecheck/rust-hir-trait-reference.h:
111 * typecheck/rust-hir-trait-resolve.cc (TraitResolver::resolve_trait): refactor
112 (TraitItemReference::associated_type_reset): reset projections
113 * typecheck/rust-hir-type-bounds.h:
114 * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): fix bounds
115 * typecheck/rust-tyty-bounds.cc (TypeBoundsProbe::TypeBoundsProbe): refactor into cc file
116 (TypeBoundsProbe::Probe): refactor
117 (TypeBoundsProbe::is_bound_satisfied_for_type): likewise
118 (TypeBoundsProbe::assemble_sized_builtin): add builtin for Sized
119 (TypeCheckBase::get_predicate_from_bound): refactor
120 (TypeBoundPredicate::lookup_associated_type): refactor
121 * typecheck/rust-tyty-subst.cc (SubstitutionRef::lookup_associated_impl)
122 (SubstitutionRef::prepare_higher_ranked_bounds): new interface to clear hanging bounds
123 (SubstitutionRef::monomorphize): refactor
124 * typecheck/rust-tyty-subst.h:
125 * typecheck/rust-tyty.cc (BaseType::get_locus): helper
126 (BaseType::satisfies_bound): ensure bounds are satisfied and assoicated types
127 (ParamType::ParamType): new field in constructor
128 (ParamType::clone): update clone
129 (ParamType::set_implicit_self_trait): new interface
130 (ParamType::is_implicit_self_trait): likewise
131 * typecheck/rust-tyty.h: cleanup
132 * util/rust-hir-map.cc (Mappings::Mappings): builtin marker
133 (Mappings::~Mappings): delete marker
134 (Mappings::lookup_builtin_marker): lookup
135 * util/rust-hir-map.h: update header
137 2023-04-06 Philip Herron <herron.philip@googlemail.com>
139 * hir/tree/rust-hir-item.h: implement virtual function
140 * hir/tree/rust-hir.h: add virtual function
142 2023-04-06 Philip Herron <herron.philip@googlemail.com>
144 * Make-lang.in: add new dependancy
145 * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::query_type): refactor
146 * typecheck/rust-hir-type-check-base.h: refactor
147 * typecheck/rust-hir-type-check.h (RUST_HIR_TYPE_CHECK): refactor
148 * typecheck/rust-type-util.cc: New file.
149 * typecheck/rust-type-util.h: New file.
151 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com>
153 * expand/rust-macro-builtins.cc
154 (MacroBuiltin::include_str_handler): Add check for valid UTF-8.
156 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com>
158 * parse/rust-parse-impl.h
159 (Parser::parse_grouped_or_tuple_pattern): Add support for empty tuple patterns.
161 2023-04-06 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
163 * lex/rust-lex.h: Add file type check.
165 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com>
167 * backend/rust-compile-pattern.cc
168 (CompilePatternLet::visit): Simplify WildcardPattern compilation for let statements.
169 * backend/rust-compile-var-decl.h:
170 (CompileVarDecl::visit): Remove variable declaration for WildcardPattern.
171 * resolve/rust-ast-resolve-pattern.h:
172 (PatternDeclaration::visit): Remove name resolution for WildcardPattern.
174 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com>
176 * typecheck/rust-tyty-call.cc
177 (TypeCheckCallExpr::visit): Add variadic argument type checking.
178 (TypeCheckCallExpr::visit): Fix comment spelling ("varadic").
180 2023-04-06 mxlol233 <mxlol233@outlook.com>
182 * checks/errors/rust-feature-gate.cc: Add implementation for
183 `void FeatureGate::visit (AST::ExternBlock &block)`. Add `valid_feature`
184 construction process in `FeatureGate::check`.
185 * checks/errors/rust-feature-gate.h: Add declaration for
186 `void FeatureGate::visit (AST::ExternBlock &block)`. Add private
187 variable `valid_feature`.
188 * checks/errors/rust-feature.h: Change `issue` to `m_issue`.
190 2023-04-06 Thomas Schwinge <thomas@codesourcery.com>
192 * ast/rust-ast-fragment.cc: Update copyright years.
193 * ast/rust-ast-fragment.h: Likewise.
194 * ast/rust-macro.cc: Likewise.
195 * checks/errors/rust-feature-gate.cc: Likewise.
196 * checks/errors/rust-feature-gate.h: Likewise.
197 * checks/errors/rust-feature.cc: Likewise.
198 * checks/errors/rust-feature.h: Likewise.
199 * hir/rust-ast-lower-expr.cc: Likewise.
200 * hir/rust-ast-lower-type.cc: Likewise.
201 * resolve/rust-early-name-resolver.cc: Likewise.
202 * resolve/rust-early-name-resolver.h: Likewise.
203 * rust-gcc.h: Likewise.
204 * typecheck/rust-hir-path-probe.cc: Likewise.
205 * typecheck/rust-hir-trait-reference.cc: Likewise.
206 * typecheck/rust-tyty-bounds.h: Likewise.
207 * typecheck/rust-tyty-subst.cc: Likewise.
208 * typecheck/rust-tyty-subst.h: Likewise.
209 * typecheck/rust-tyty-util.cc: Likewise.
210 * typecheck/rust-tyty-util.h: Likewise.
211 * typecheck/rust-unify.cc: Likewise.
212 * typecheck/rust-unify.h: Likewise.
213 * util/rust-inline-visitor.h: Likewise.
215 2023-04-06 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
217 * rust-session-manager.cc (Session::compile_crate): Update the
218 environment variable name.
220 2023-04-06 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
222 * Make-lang.in: Add `rust-hir-trait-reference.o`.
223 * typecheck/rust-hir-trait-reference.h: Remove multiple function body.
224 * typecheck/rust-hir-trait-reference.cc: Add multiple function body.
226 2023-04-06 Arthur Cohen <arthur.cohen@embecosm.com>
228 * expand/rust-macro-expand.cc (MacroExpander::expand_eager_invocations):
229 Add documentation explaining the algorithm.
231 2023-04-06 Arthur Cohen <arthur.cohen@embecosm.com>
233 * ast/rust-macro.cc: New file.
234 * Make-lang.in: Add `rust-macro.o` object
235 * ast/rust-ast-fragment.cc (Fragment::Fragment): Change API around
236 the construction of AST fragments.
237 (Fragment::operator=): Correct `Fragment::operator=` to take into
238 account the fragment tokens.
239 (Fragment::create_error): Use new constructor.
240 (Fragment::complete): Remove in favor of new constructor.
241 (Fragment::unexpanded): Remove as that Fragment type is no longer used
243 (Fragment::get_tokens): Add helper to access a fragment's tokens.
244 * ast/rust-ast-fragment.h (enum class): Remove `FragmentKind::Unused`
245 * ast/rust-ast.cc (MacroInvocation::as_string): Display
246 builtin macro invocations properly.
247 * ast/rust-ast.h: Fix `DelimTokenTree` class copy constructors and
248 handling of its token vector.
249 * ast/rust-macro.h (class MacroMatcher): Format.
250 (class MetaItemSeq): Likewise.
251 (builtin_macro_from_string): Get a `BuiltinMacroKind` from a given
252 string, i.e the name of the macro (`assert!`, `cfg!` and so on).
253 * expand/rust-attribute-visitor.cc (AttrVisitor::visit): Do not expand
254 macros recursively anymore.
255 (AttrVisitor::maybe_expand_expr): Likewise.
256 (AttrVisitor::maybe_expand_type): Likewise.
257 * expand/rust-attribute-visitor.h: Likewise, and remove
258 `expand_macro_fragment_recursively` function.
259 * expand/rust-macro-builtins.cc (make_token): Add shorthand for
260 returning `std::unique_ptr<AST::Token>`s.
261 (make_macro_invocation): Add shorthand for returning fragments
262 containing builtin macro invocations.
263 (try_expand_macro_expression): Do not expand macros recursively.
264 (try_expand_single_string_literal): Likewise.
265 (try_expand_many_expr): Likewise.
266 (parse_single_string_literal): Error out more appropriately.
267 (MacroBuiltin::compile_error_handler): Add explanation for eager
269 (MacroBuiltin::file_handler): Return the proper tokens associated with
270 macro invocation, and builtin macros in the case of necessary eager
272 (MacroBuiltin::column_handler): Likewise.
273 (MacroBuiltin::include_bytes_handler): Likewise.
274 (MacroBuiltin::include_str_handler): Likewise.
275 (MacroBuiltin::concat_handler): Likewise.
276 (MacroBuiltin::env_handler): Likewise.
277 (MacroBuiltin::cfg_handler): Likewise.
278 (MacroBuiltin::include_handler): Likewise.
279 (MacroBuiltin::line_handler): Likewise.
280 * expand/rust-macro-expand.cc (MacroExpander::expand_eager_invocations):
281 Add function to expand eager invocations *once* in the fixed point
283 (MacroExpander::expand_invoc): Call into `expand_eager_invocations` for
284 builtin macro invocations.
285 (MacroExpander::expand_crate): Use new `AttrVisitor` API.
286 (parse_many): Return tokens in `AST::Fragment`.
287 (transcribe_expression): Likewise.
288 (transcribe_type): Likewise.
289 * expand/rust-macro-expand.h (struct MacroExpander): Add `has_changed`
290 flag for fixed point checking.
291 * resolve/rust-early-name-resolver.cc (EarlyNameResolver::EarlyNameResolver):
292 Keep track of the current macro scope.
293 (EarlyNameResolver::go): Use `scoped` API.
294 (EarlyNameResolver::visit): Likewise.
295 * resolve/rust-early-name-resolver.h: Add `scoped` API.
296 * rust-session-manager.cc (Session::expansion): Perform macro expansion
297 in a fixed-point fashion.
299 2023-04-06 Arthur Cohen <arthur.cohen@embecosm.com>
301 * expand/rust-macro-invoc-lexer.cc (MacroInvocLexer::get_token_slice):
302 Add API to retrieve token slices when lexing macro expansions.
303 * expand/rust-macro-invoc-lexer.h: Declare `get_token_slice`.
305 2023-04-06 Arthur Cohen <arthur.cohen@embecosm.com>
307 * parse/rust-parse.h: Move `parse_macro_invocation` to public API.
309 2023-04-06 Arthur Cohen <arthur.cohen@embecosm.com>
311 * ast/rust-item.h (class BlockExpr): Remove forward declaration of
314 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com>
316 * hir/tree/rust-hir-pattern.h
317 (TuplePatternItemsRanged::get_lower_patterns): Add method.
318 (TuplePatternItemsRanged::get_upper_patterns): Add method.
319 * backend/rust-compile-pattern.cc
320 (CompilePatternLet::visit): Implement TuplePattern visitor.
321 * backend/rust-compile-pattern.h
322 (CompilePatternLet::visit): Move TuplePattern visitor out of header file.
324 2023-04-06 Philip Herron <herron.philip@googlemail.com>
326 * typecheck/rust-unify.cc (UnifyRules::go): ensure the bounds are checked
328 2023-04-06 Philip Herron <herron.philip@googlemail.com>
330 * typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit): remove error message
332 2023-04-06 Philip Herron <herron.philip@googlemail.com>
334 * typecheck/rust-hir-trait-reference.h: add const infterface
335 * typecheck/rust-tyty-subst.cc (SubstitutionParamMapping::get_generic_param): make const
336 (SubstitutionRef::monomorphize): fix issue
337 * typecheck/rust-tyty-subst.h: constify interface
339 2023-04-06 Philip Herron <herron.philip@googlemail.com>
341 * util/rust-lang-item.h:
343 2023-04-06 Philip Herron <herron.philip@googlemail.com>
345 * typecheck/rust-tyty-subst.cc (SubstitutionArg::is_conrete): fix check
347 2023-04-06 Philip Herron <herron.philip@googlemail.com>
349 * Make-lang.in: update names
350 * backend/rust-compile-expr.cc (CompileExpr::resolve_method_address):
351 update to use new interface
352 * typecheck/rust-coercion.cc (TypeCoercionRules::coerce_borrowed_pointer): likewise
353 * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::unify_site): likewise
354 * typecheck/rust-tyty.cc (BaseType::destructure): likewise
355 (InferType::unify): removed old unify interface
356 (ErrorType::unify): likewise
357 (ADTType::unify): likewise
358 (TupleType::unify): likewise
359 (FnType::unify): likewise
360 (FnPtr::unify): likewise
361 (ClosureType::unify): likewise
362 (ArrayType::unify): likewise
363 (SliceType::unify): likewise
364 (BoolType::unify): likewise
365 (IntType::unify): likewise
366 (UintType::unify): likewise
367 (FloatType::unify): likewise
368 (USizeType::unify): likewise
369 (ISizeType::unify): likewise
370 (CharType::unify): likewise
371 (ReferenceType::unify): likewise
372 (PointerType::unify): likewise
373 (ParamType::unify): likewise
374 (StrType::unify): likewise
375 (NeverType::unify): likewise
376 (PlaceholderType::unify): likewise
377 (ProjectionType::unify): likewise
378 (DynamicObjectType::unify): likewise
379 * typecheck/rust-tyty.h: update destructure interface
380 * typecheck/rust-tyty-rules.h: Removed.
381 * typecheck/rust-unify.cc: New file.
382 * typecheck/rust-unify.h: New file.
384 2023-04-06 Philip Herron <herron.philip@googlemail.com>
386 * typecheck/rust-hir-trait-reference.h: change interface to return self
387 * typecheck/rust-hir-trait-resolve.cc: likewise
388 * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_segments): likewise
389 * typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit): remove monomorphization hack
391 2023-04-06 Philip Herron <herron.philip@googlemail.com>
393 * typecheck/rust-tyty-subst.cc: add missing callback
395 2023-04-06 Philip Herron <herron.philip@googlemail.com>
397 * typecheck/rust-tyty-subst.cc: update copy constructors
399 2023-04-06 Philip Herron <herron.philip@googlemail.com>
401 * typecheck/rust-tyty-bounds.cc: refactor to take a reference
402 * typecheck/rust-tyty-subst.cc: likewise
403 (SubstitutionRef::get_substitution_arguments): likewise
404 (SubstitutionRef::infer_substitions): likewise
405 * typecheck/rust-tyty-subst.h: likewise
406 * typecheck/rust-tyty.cc (ADTType::handle_substitions): likewise
407 (TupleType::handle_substitions): likewise
408 (FnType::handle_substitions): likewise
409 (ClosureType::handle_substitions): likewise
410 (ArrayType::handle_substitions): likewise
411 (SliceType::handle_substitions): likewise
412 (ReferenceType::handle_substitions): likewise
413 (PointerType::handle_substitions): likewise
414 (ParamType::handle_substitions): likewise
415 (ProjectionType::handle_substitions): likewise
416 * typecheck/rust-tyty.h: likewise
418 2023-04-06 Philip Herron <herron.philip@googlemail.com>
420 * typecheck/rust-hir-trait-ref.h: Moved to...
421 * typecheck/rust-hir-trait-reference.h: ...here.
422 * typecheck/rust-hir-trait-resolve.cc: refactor
423 * typecheck/rust-hir-trait-resolve.h (RUST_HIR_TRAIT_RESOLVE_H): likewise
424 * typecheck/rust-hir-type-check.h: likewise
425 * typecheck/rust-tyty.cc: likewise
427 2023-04-06 Philip Herron <herron.philip@googlemail.com>
429 * Make-lang.in: update name
430 * typecheck/rust-tyctx.cc: Moved to...
431 * typecheck/rust-typecheck-context.cc: ...here.
433 2023-04-06 Philip Herron <herron.philip@googlemail.com>
435 * typecheck/rust-hir-type-check.h: refactor
436 * typecheck/rust-tyctx.cc (TypeCheckContext::iterate): refactor
437 (TypeCheckContext::have_loop_context): likewise
438 (TypeCheckContext::push_new_loop_context): likewise
439 (TypeCheckContext::push_new_while_loop_context): likewise
440 (TypeCheckContext::peek_loop_context): likewise
441 (TypeCheckContext::pop_loop_context): likewise
442 (TypeCheckContext::swap_head_loop_context): likewise
443 (TypeCheckContext::insert_trait_reference): likewise
444 (TypeCheckContext::lookup_trait_reference): likewise
445 (TypeCheckContext::insert_receiver): likewise
446 (TypeCheckContext::lookup_receiver): likewise
447 (TypeCheckContext::insert_associated_type_mapping): likewise
448 (TypeCheckContext::clear_associated_type_mapping): likewise
449 (TypeCheckContext::lookup_associated_type_mapping): likewise
450 (TypeCheckContext::insert_variant_definition): likewise
451 (TypeCheckContext::lookup_variant_definition): likewise
452 (TypeCheckContext::insert_operator_overload): likewise
453 (TypeCheckContext::lookup_operator_overload): likewise
454 (TypeCheckContext::insert_unconstrained_check_marker): likewise
455 (TypeCheckContext::have_checked_for_unconstrained): likewise
456 (TypeCheckContext::insert_resolved_predicate): likewise
457 (TypeCheckContext::lookup_predicate): likewise
458 (TypeCheckContext::insert_query): likewise
459 (TypeCheckContext::query_completed): likewise
460 (TypeCheckContext::query_in_progress): likewise
461 (TypeCheckContext::insert_trait_query): likewise
462 (TypeCheckContext::trait_query_completed): likewise
463 (TypeCheckContext::trait_query_in_progress): likewise
464 (TypeCheckContextItem::Item::Item): likewise
465 (TypeCheckContextItem::TypeCheckContextItem): likewise
466 (TypeCheckContextItem::get_item): likewise
467 (TypeCheckContextItem::get_impl_item): likewise
468 (TypeCheckContextItem::get_trait_item): likewise
469 (TypeCheckContextItem::get_type): likewise
470 * typecheck/rust-tyty.cc (StructFieldType::StructFieldType): likewise
471 (StructFieldType::get_ref): likewise
472 (StructFieldType::get_name): likewise
473 (StructFieldType::get_field_type): likewise
474 (StructFieldType::set_field_type): likewise
475 (StructFieldType::is_concrete): likewise
476 (StructFieldType::debug): likewise
477 (StructFieldType::get_locus): likewise
478 (VariantDef::variant_type_string): likewise
479 (VariantDef::VariantDef): likewise
480 (VariantDef::operator=): likewise
481 (VariantDef::get_error_node): likewise
482 (VariantDef::is_error): likewise
483 (VariantDef::get_id): likewise
484 (VariantDef::get_defid): likewise
485 (VariantDef::get_variant_type): likewise
486 (VariantDef::is_data_variant): likewise
487 (VariantDef::is_dataless_variant): likewise
488 (VariantDef::get_identifier): likewise
489 (VariantDef::num_fields): likewise
490 (VariantDef::get_field_at_index): likewise
491 (VariantDef::get_fields): likewise
492 (VariantDef::lookup_field): likewise
493 (VariantDef::get_discriminant): likewise
494 (VariantDef::as_string): likewise
495 (VariantDef::is_equal): likewise
496 (VariantDef::clone): likewise
497 (VariantDef::monomorphized_clone): likewise
498 (VariantDef::get_ident): likewise
499 (TupleType::TupleType): likewise
500 (TupleType::get_unit_type): likewise
501 (TupleType::is_unit): likewise
502 (TupleType::num_fields): likewise
503 (TupleType::is_concrete): likewise
504 (TupleType::get_fields): likewise
505 (BoolType::BoolType): likewise
506 (BoolType::get_name): likewise
507 (BoolType::is_concrete): likewise
508 (IntType::IntType): likewise
509 (IntType::get_name): likewise
510 (IntType::get_int_kind): likewise
511 (IntType::is_concrete): likewise
512 (UintType::UintType): likewise
513 (UintType::get_name): likewise
514 (UintType::get_uint_kind): likewise
515 (UintType::is_concrete): likewise
516 (FloatType::FloatType): likewise
517 (FloatType::get_name): likewise
518 (FloatType::get_float_kind): likewise
519 (FloatType::is_concrete): likewise
520 (USizeType::USizeType): likewise
521 (USizeType::get_name): likewise
522 (USizeType::is_concrete): likewise
523 (ISizeType::ISizeType): likewise
524 (ISizeType::get_name): likewise
525 (ISizeType::is_concrete): likewise
526 (CharType::CharType): likewise
527 (CharType::is_concrete): likewise
528 (CharType::get_name): likewise
529 (ReferenceType::ReferenceType): likewise
530 (ReferenceType::is_concrete): likewise
531 (ReferenceType::mutability): likewise
532 (ReferenceType::is_mutable): likewise
533 (ReferenceType::is_dyn_object): likewise
534 (ReferenceType::is_dyn_slice_type): likewise
535 (ReferenceType::is_dyn_str_type): likewise
536 (PointerType::PointerType): likewise
537 (PointerType::is_concrete): likewise
538 (PointerType::mutability): likewise
539 (PointerType::is_mutable): likewise
540 (PointerType::is_const): likewise
541 (PointerType::is_dyn_object): likewise
542 (PointerType::is_dyn_slice_type): likewise
543 (PointerType::is_dyn_str_type): likewise
544 (ParamType::ParamType): likewise
545 (ParamType::get_generic_param): likewise
546 (ParamType::can_resolve): likewise
547 (ParamType::is_concrete): likewise
548 (StrType::StrType): likewise
549 (StrType::get_name): likewise
550 (StrType::is_concrete): likewise
551 (NeverType::NeverType): likewise
552 (NeverType::get_name): likewise
553 (NeverType::is_unit): likewise
554 (NeverType::is_concrete): likewise
555 (PlaceholderType::PlaceholderType): likewise
556 (PlaceholderType::get_name): likewise
557 (PlaceholderType::is_unit): likewise
558 (PlaceholderType::get_symbol): likewise
559 (PlaceholderType::is_concrete): likewise
560 (ProjectionType::is_unit): likewise
561 (ProjectionType::get_name): likewise
562 (ProjectionType::needs_generic_substitutions): likewise
563 (ProjectionType::supports_substitutions): likewise
564 (ProjectionType::has_subsititions_defined): likewise
565 (ProjectionType::get): likewise
566 (ProjectionType::is_concrete): likewise
567 (DynamicObjectType::is_concrete): likewise
568 * typecheck/rust-tyty.h: likewise
570 2023-04-06 Philip Herron <herron.philip@googlemail.com>
572 * typecheck/rust-hir-path-probe.cc (PathProbeCandidate::Candidate::Candidate): refactor
573 (PathProbeCandidate::PathProbeCandidate): likewise
574 (PathProbeCandidate::as_string): likewise
575 (PathProbeCandidate::is_enum_candidate): likewise
576 (PathProbeCandidate::is_impl_candidate): likewise
577 (PathProbeCandidate::is_trait_candidate): likewise
578 (PathProbeCandidate::is_full_trait_item_candidate): likewise
579 (PathProbeCandidate::get_error): likewise
580 (PathProbeCandidate::is_error): likewise
581 (PathProbeCandidate::get_defid): likewise
582 (PathProbeCandidate::operator<): likewise
583 * typecheck/rust-hir-path-probe.h (struct PathProbeCandidate): likewise
585 2023-04-06 Philip Herron <herron.philip@googlemail.com>
587 * typecheck/rust-hir-path-probe.cc (PathProbeType::PathProbeType): refactor
588 (PathProbeType::Probe): likewise
589 (PathProbeType::visit): likewise
590 (PathProbeType::process_enum_item_for_candiates): likewise
591 (PathProbeType::process_impl_items_for_candidates): likewise
592 (PathProbeType::is_reciever_generic): likewise
593 (PathProbeImplTrait::PathProbeImplTrait): likewise
594 (PathProbeImplTrait::Probe): likewise
595 (PathProbeImplTrait::process_trait_impl_items_for_candidates): likewise
596 * typecheck/rust-hir-path-probe.h (struct PathProbeCandidate): likewise
597 * typecheck/rust-hir-trait-resolve.cc
598 (PathProbeImplTrait::process_trait_impl_items_for_candidates): likewise
600 2023-04-06 Philip Herron <herron.philip@googlemail.com>
602 * typecheck/rust-tyty.cc (BaseType::BaseType): refactor
603 (BaseType::~BaseType): likewise
604 (BaseType::get_ref): likewise
605 (BaseType::set_ref): likewise
606 (BaseType::get_ty_ref): likewise
607 (BaseType::set_ty_ref): likewise
608 (BaseType::is_equal): likewise
609 (BaseType::is_unit): likewise
610 (BaseType::get_kind): likewise
611 (BaseType::get_combined_refs): likewise
612 (BaseType::append_reference): likewise
613 (BaseType::supports_substitutions): likewise
614 (BaseType::has_subsititions_defined): likewise
615 (BaseType::can_substitute): likewise
616 (BaseType::needs_generic_substitutions): likewise
617 (BaseType::contains_type_parameters): likewise
618 (BaseType::get_ident): likewise
619 (BaseType::get_locus): likewise
620 (InferType::InferType): likewise
621 (InferType::get_infer_kind): likewise
622 (InferType::get_name): likewise
623 (InferType::is_concrete): likewise
624 (ErrorType::ErrorType): likewise
625 (ErrorType::is_unit): likewise
626 (ErrorType::is_concrete): likewise
627 (ErrorType::get_name): likewise
628 (ErrorType::monomorphized_clone): likewise
629 * typecheck/rust-tyty.h (class SubstitutionArgumentMappings): likewise
631 2023-04-06 Philip Herron <herron.philip@googlemail.com>
633 * typecheck/rust-substitution-mapper.cc (SubstMapper::SubstMapper): refactor
634 (SubstMapper::Resolve): likewise
635 (SubstMapper::InferSubst): likewise
636 (SubstMapper::have_generic_args): likewise
637 (SubstMapper::visit): likewise
638 (SubstMapperInternal::visit): likewise
639 (SubstMapperFromExisting::SubstMapperFromExisting): likewise
640 (SubstMapperFromExisting::Resolve): likewise
641 (SubstMapperFromExisting::visit): likewise
642 (GetUsedSubstArgs::GetUsedSubstArgs): likewise
643 (GetUsedSubstArgs::From): likewise
644 (GetUsedSubstArgs::visit): likewise
645 * typecheck/rust-substitution-mapper.h: refactor
646 * typecheck/rust-tyty-subst.cc (SubstitutionParamMapping::get_generic_param): likewise
648 2023-04-06 Philip Herron <herron.philip@googlemail.com>
650 * Make-lang.in: update the makefile
651 * typecheck/rust-tyty.cc (SubstitutionParamMapping::need_substitution): likewise
652 (SubstitutionParamMapping::override_context): likewise
653 (SubstitutionRef::get_mappings_from_generic_args): likewise
654 (SubstitutionRef::infer_substitions): likewise
655 (SubstitutionRef::are_mappings_bound): likewise
656 (SubstitutionRef::solve_missing_mappings_from_this): likewise
657 (SubstitutionRef::monomorphize): likewise
658 * typecheck/rust-tyty.h (class SubstitutionParamMapping): likewise
659 (class SubstitutionArg): likewise
660 (std::function<void): likewise
661 (class SubstitutionArgumentMappings): likewise
662 (class SubstitutionRef): likewise
663 * typecheck/rust-tyty-subst.cc: New file.
664 * typecheck/rust-tyty-subst.h: New file.
666 2023-04-06 Philip Herron <herron.philip@googlemail.com>
668 * Make-lang.in: update makefile
669 * typecheck/rust-tyty.cc (TyVar::TyVar): move to new file
670 (TyVar::get_tyty): likewise
671 (TyVar::get_implicit_infer_var): likewise
672 (TyVar::subst_covariant_var): likewise
673 (TyVar::clone): likewise
674 (TyVar::monomorphized_clone): likewise
675 (TyWithLocation::TyWithLocation): likewise
676 * typecheck/rust-tyty.h (class BaseType): cleanup
677 (class TypeBoundPredicate): move to its own file
678 (class TypeBoundPredicateItem): likewise
679 (class TypeBoundsMappings): likewise
680 (class TyVar): likewise
681 (class TyWithLocation): likewise
682 * typecheck/rust-tyty-bounds.h: New file.
683 * typecheck/rust-tyty-util.cc: New file.
684 * typecheck/rust-tyty-util.h: New file.
686 2023-04-06 Philip Herron <herron.philip@googlemail.com>
688 * typecheck/rust-tyty-bounds.cc (TypeBoundPredicateItem::error): refactor
689 (TypeBoundPredicateItem::is_error): likewise
690 (TypeBoundPredicateItem::get_parent): likewise
691 * typecheck/rust-tyty.h: Move the implementation for the above
693 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com>
695 * backend/rust-compile-expr.cc (CompileExpr::visit): Removed copy-pasted comment.
697 2023-04-06 mxlol233 <mxlol233@outlook.com>
699 * Make-lang.in: Add object files: `rust-feature.o` and `rust-feature-gate.o`
700 * checks/errors/rust-feature-gate.cc: New file.
701 * checks/errors/rust-feature-gate.h: New file.
702 * checks/errors/rust-feature.cc: New file.
703 * checks/errors/rust-feature.h: New file.
704 * rust-session-manager.cc: Add FeatureGate check.
706 2023-04-06 Arthur Cohen <arthur.cohen@embecosm.com>
708 * parse/rust-parse-impl.h (Parser::parse_closure_expr): Advance tokens
709 properly when parsing closure param list.
711 2023-04-06 Arthur Cohen <arthur.cohen@embecosm.com>
713 * parse/rust-parse-impl.h (Parser::parse_generic_arg): Handle type
714 paths and nested generics properly.
716 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com>
718 * ast/rust-pattern.h:
719 (ReferencePattern::is_double_reference): Add method.
720 (ReferencePattern::get_is_mut): Add method.
721 * hir/rust-ast-lower-pattern.cc
722 (ASTLoweringPattern::visit): Add ReferencePattern visitor.
723 * hir/rust-ast-lower-pattern.h:
724 (ASTLoweringPattern::visit): Add ReferencePattern visitor.
726 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com>
728 * hir/tree/rust-hir-pattern.h
729 (class ReferencePattern): Remove has_two_amps field.
730 * hir/tree/rust-hir-full-test.cc
731 (ReferencePattern::as_string): Remove usage of ReferencePattern::has_two_amps.
733 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com>
735 * backend/rust-compile-fnparam.h
736 (CompileFnParam::visit): Remove HIR::GroupedPattern visitor.
737 * backend/rust-compile-pattern.cc
738 (CompilePatternCaseLabelExpr::visit): Remove HIR::GroupedPattern visitor.
739 (CompilePatternBindings::visit): Remove HIR::GroupedPattern visitor.
740 * backend/rust-compile-pattern.h
741 (CompilePatternCaseLabelExpr::visit): Remove HIR::GroupedPattern visitor.
742 (CompilePatternBindings::visit): Remove HIR::GroupedPattern visitor.
743 (CompilePatternLet::visit): Remove HIR::GroupedPattern visitor.
744 * backend/rust-compile-resolve-path.h
745 (ResolvePathRef::visit): Remove HIR::GroupedPattern visitor.
746 * backend/rust-compile-var-decl.h
747 (CompileVarDecl::visit): Remove HIR::GroupedPattern visitor.
748 * checks/errors/rust-const-checker.cc
749 (ConstChecker::visit): Remove HIR::GroupedPattern visitor.
750 * checks/errors/rust-const-checker.h
751 (ConstChecker::visit): Remove HIR::GroupedPattern visitor.
752 * checks/errors/rust-unsafe-checker.cc
753 (UnsafeChecker::visit): Remove HIR::GroupedPattern visitor.
754 * checks/errors/rust-unsafe-checker.h
755 (UnsafeChecker::visit): Remove HIR::GroupedPattern visitor.
756 * hir/rust-hir-dump.cc (Dump::visit): Remove HIR::GroupedPattern visitor.
757 * hir/rust-hir-dump.h (Dump::visit): Remove HIR::GroupedPattern visitor.
758 * hir/tree/rust-hir-full-decls.h (class GroupedPattern): Remove class.
759 * hir/tree/rust-hir-full-test.cc (GroupedPattern::accept_vis): Remove method.
760 * hir/tree/rust-hir-pattern.h (class GroupedPattern): Remove class.
761 * hir/tree/rust-hir-visitor.h
762 (HIRFullVisitor::visit): Remove HIR::GroupedPattern visitor.
763 (HIRFullVisitorBase::visit): Remove HIR::GroupedPattern visitor.
764 (HIRPatternVisitor::visit): Remove HIR::GroupedPattern visitor.
765 * typecheck/rust-hir-type-check-pattern.cc
766 (TypeCheckPattern::visit): Remove HIR::GroupedPattern visitor.
767 * typecheck/rust-hir-type-check-pattern.h
768 (TypeCheckPattern::visit): Remove HIR::GroupedPattern visitor.
770 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com>
772 * hir/rust-ast-lower-pattern.cc
773 (ASTLoweringPattern::visit): Lower AST::GroupedPattern to its inner pattern.
775 2023-04-06 MAHAD <mahadtxt@gmail.com>
777 * rust-buffered-queue.h: Moved to...
778 * util/rust-buffered-queue.h: ...here.
780 2023-04-06 Arthur Cohen <arthur.cohen@embecosm.com>
782 * parse/rust-parse-impl.h (Parser::parse_type): Handle double ampersan
784 (Parser::parse_reference_type): Call into `parse_reference_type_inner`
785 and wrap double reference types in another `AST::ReferenceType` node
786 (Parser::parse_reference_type_inner): Add parsing implementation
787 which does not care about the leading token (& or &&)
788 (Parser::parse_type_no_bounds): Handle double ampersand properly
789 * parse/rust-parse.h: Declare `parse_reference_type_inner`
791 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com>
793 * backend/rust-compile-pattern.cc (CompilePatternLet::visit): New function.
794 * backend/rust-compile-stmt.cc (CompileStmt::visit): Likewise.
795 * backend/rust-compile-pattern.h (class CompilePatternLet): New visitor.
797 2023-04-06 Arthur Cohen <arthur.cohen@embecosm.com>
799 * ast/rust-macro.h (enum class): Add `BuiltinMacro` enum class.
800 * expand/rust-attribute-visitor.cc (AttrVisitor::visit): Mention
801 switching on `macro.kind` once builtin macro invocations are properly
803 * parse/rust-parse-impl.h (Parser::parse_macro_invocation): Switch to new MacroInvocation
805 (Parser::parse_type): Likewise.
806 (Parser::parse_type_no_bounds): Likewise.
808 2023-04-06 Abdul Rafey <abdulrafeyq@gmail.com>
810 * ast/rust-ast-dump.cc (Dump::visit): removed extra indentations in trait ast dump
812 2023-04-06 Abdul Rafey <abdulrafeyq@gmail.com>
814 * parse/rust-parse-impl.h (Parser::null_denotation): Add proper error
815 when seeing wildcard var on right side of assignment.
817 2023-04-06 Abdul Rafey <abdulrafeyq@gmail.com>
819 * ast/rust-ast.cc: Fix include list.
820 * ast/rust-expr.h: Likewise.
821 * hir/tree/rust-hir-expr.h: Likewise.
822 * rust-backend.h: Likewise.
823 * util/rust-lang-item.h: Likewise.
824 * operator.h: Moved to...
825 * util/rust-operators.h: ...here.
827 2023-04-06 Parthib <parthibdutta02@gmail.com>
829 * Make-lang.in: Rename object file.
830 * ast/rust-ast-full-test.cc: Moved to...
831 * ast/rust-ast.cc: ...here.
833 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com>
835 * backend/rust-compile-pattern.cc (CompilePatternCaseLabelExpr::visit): Add proper
837 (CompilePatternBindings::visit): Likewise.
838 * backend/rust-compile-pattern.h: Declare them.
840 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com>
842 * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit): Add proper
845 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com>
847 * hir/tree/rust-hir-pattern.h: Add get_item method.
849 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com>
851 * hir/rust-ast-lower-pattern.cc (ASTLoweringPattern::visit): Add proper visitor.
852 * hir/rust-ast-lower-pattern.h: Declare it.
854 2023-04-06 Lyra <teromene@teromene.fr>
856 * expand/rust-macro-expand.cc (transcribe_expression): Fix ICE when expanding
859 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com>
861 * resolve/rust-ast-resolve-pattern.h: Support GroupedPattern properly.
863 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com>
865 * backend/rust-compile-base.cc (HIRCompileBase::compile_locals_for_block):
866 Allow patterns to declare zero or multiple variables.
867 * backend/rust-compile-var-decl.h: Change function declaration.
869 2023-04-06 mxlol233 <mxlol233@outlook.com>
871 * lex/rust-lex.cc (Lexer::build_token): Make location enclose entire token.
872 (Lexer::parse_byte_char): Likewise.
873 (Lexer::parse_byte_string): Likewise.
874 (Lexer::parse_raw_byte_string): Likewise.
875 (Lexer::parse_raw_identifier): Likewise.
876 (Lexer::parse_string): Likewise.
877 (Lexer::parse_identifier_or_keyword): Likewise.
878 (Lexer::parse_raw_string): Likewise.
879 (Lexer::parse_non_decimal_int_literal): Likewise.
880 (Lexer::parse_decimal_int_or_float): Likewise.
881 (Lexer::parse_char_or_lifetime): Likewise.
883 2023-04-06 mxlol233 <mxlol233@outlook.com>
885 * ast/rust-ast.h: Add get_locus method.
886 * ast/rust-expr.h: Likewise.
887 * ast/rust-macro.h: Likewise.
889 2023-04-06 Owen Avery <powerboat9.gamer@gmail.com>
891 * typecheck/rust-hir-type-check-stmt.cc (TypeCheckStmt::visit): Cleanup LetStmt
894 2023-04-06 Philip Herron <herron.philip@googlemail.com>
896 * hir/tree/rust-hir-path.h: Add const get_identifier and get_type method.
897 * typecheck/rust-hir-path-probe.h: Use new SubstitutionArgumentMappings constructor.
898 * typecheck/rust-hir-trait-resolve.cc: Likewise.
899 * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Likewise.
900 * typecheck/rust-tyty-bounds.cc (TypeCheckBase::get_predicate_from_bound):
901 Do not assert failure on size mismatch anymore.
902 (TypeBoundPredicate::TypeBoundPredicate): Use new SubstitutionArgumentMappings constructor.
903 (TypeBoundPredicate::operator=): Likewise.
904 (TypeBoundPredicate::apply_generic_arguments): Likewise.
905 (TypeBoundPredicateItem::get_tyty_for_receiver): Likewise.
906 (TypeBoundPredicate::get_num_associated_bindings): Likewise.
907 (TypeBoundPredicate::lookup_associated_type): Fix implementation for new system.
908 (TypeBoundPredicate::get_associated_type_items): Likewise.
909 * typecheck/rust-tyty.cc (SubstitutionRef::get_mappings_from_generic_args): Add new
911 (SubstitutionRef::infer_substitions): Use new constructor and add comment.
912 (SubstitutionRef::solve_missing_mappings_from_this): Use new constructor.
913 * typecheck/rust-tyty.h: Define new constructors.
915 2023-04-06 Philip Herron <herron.philip@googlemail.com>
917 * resolve/rust-ast-resolve-type.cc (ResolveGenericArgs::go): Add name resolution to
920 2023-04-06 Raiki Tamura <tamaron1203@gmail.com>
922 * ast/rust-ast-full-decls.h (class MacroItem): Remove forward declaration.
923 * ast/rust-ast-full-test.cc (MacroRulesDefinition):
924 Rework MacroRulesDefinition class
925 * ast/rust-ast.h (class MacroItem): Remove abstract class.
926 * ast/rust-item.h (class MacroItem): Remove forward declaration.
927 * ast/rust-macro.h (class MacroItem): Likewise.
928 (class MacroRulesDefinition): Add MacroKind enum.
929 (class MacroInvocation): Fix inheritance.
930 * lex/rust-token.h: Token "macro" is now used.
931 * parse/rust-parse-impl.h (Parser::parse_item): Add handling for MACRO.
932 (Parser::parse_vis_item): Call into parse_decl_macro_def.
933 (Parser::parse_macro_item): Delete function.
934 (Parser::parse_macro_rules_def): Return MBE macros only.
935 (Parser::parse_decl_macro_def): New function.
936 (Parser::parse_stmt): Handle MACRO token.
937 (Parser::parse_stmt_or_expr_without_block): Call into parse_macro_rules_def.
938 * parse/rust-parse.h: Declare new function.
940 2023-04-06 mxlol233 <mxlol233@outlook.com>
942 * parse/rust-parse-impl.h (Parser::parse_generic_arg): Add proper bound parsing.
944 2023-04-06 Dave <dme2223@gmail.com>
946 * checks/errors/rust-const-checker.cc (ConstChecker::visit): Use StackedContext
949 2023-04-06 Prajwal S N <prajwalnadig21@gmail.com>
951 * checks/errors/rust-unsafe-checker.cc (check_target_attr): New function.
952 (UnsafeChecker::check_function_attr): Call into `check_target_attr`.
953 (UnsafeChecker::visit): Check for target_feature attributes.
954 * checks/errors/rust-unsafe-checker.h: Add declarations.
955 * util/rust-attributes.cc: Add attribute.
957 2023-04-06 Arthur Cohen <arthur.cohen@embecosm.com>
959 * rust-session-manager.cc (Session::compile_crate): Fix typo.
961 2023-02-22 Thomas Schwinge <thomas@codesourcery.com>
963 * rust-lang.cc (grs_langhook_type_for_mode): Also consider all
966 2023-02-22 Thomas Schwinge <thomas@codesourcery.com>
968 * rust-lang.cc (grs_langhook_init): Do not initialize
971 2023-02-22 Thomas Schwinge <thomas@codesourcery.com>
973 * config-lang.in (target_libs): Remove.
975 2023-02-21 Raiki Tamura <tamaron1203@gmail.com>
977 * backend/rust-builtins.cc (BuiltinsContext::setup_math_fns): New functions.
979 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com>
981 * backend/rust-constexpr.cc (get_nth_callarg): Remove function.
982 (rs_bind_parameters_in_call): Use CALL_EXPR_ARG instead.
983 (potential_constant_expression_1): Likewise.
985 2023-02-21 Thomas Schwinge <thomas@codesourcery.com>
987 * lang.opt: Fix ordering of file.
989 2023-02-21 Philip Herron <herron.philip@googlemail.com>
991 * backend/rust-compile-type.cc (TyTyResolveCompile::visit): Remove unused parameters.
992 * backend/rust-constexpr.cc (constant_value_1): Likewise.
993 (fold_non_dependent_init): Likewise.
994 * backend/rust-tree.cc (publicly_uniquely_derived_p): Likewise.
995 (instantiation_dependent_expression_p): Likewise.
996 (type_has_nontrivial_copy_init): Likewise.
997 (is_normal_capture_proxy): Likewise.
998 (resolve_nondeduced_context): Likewise.
999 (undeduced_auto_decl): Likewise.
1000 (require_deduced_type): Likewise.
1001 * checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::visit): Likewise.
1002 * checks/errors/privacy/rust-reachability.cc (ReachabilityVisitor::visit): Likewise.
1003 * checks/errors/privacy/rust-visibility-resolver.cc (VisibilityResolver::visit): Likewise.
1004 * checks/errors/rust-const-checker.cc (ConstChecker::visit): Likewise.
1005 * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): Likewise.
1006 * checks/lints/rust-lint-marklive.cc (MarkLive::go): Likewise.
1007 * checks/lints/rust-lint-unused-var.cc (unused_var_walk_fn): Likewise.
1008 * expand/rust-macro-builtins.cc (try_expand_single_string_literal): Likewise.
1009 (try_expand_many_expr): Likewise.
1010 (parse_single_string_literal): Likewise.
1011 (MacroBuiltin::assert_handler): Likewise.
1012 (MacroBuiltin::file_handler): Likewise.
1013 (MacroBuiltin::column_handler): Likewise.
1014 (MacroBuiltin::concat_handler): Likewise.
1015 (MacroBuiltin::env_handler): Likewise.
1016 (MacroBuiltin::line_handler): Likewise.
1017 * hir/rust-ast-lower-base.cc (ASTLoweringBase::visit): Likewise.
1018 (ASTLoweringBase::handle_doc_item_attribute): Likewise.
1019 * hir/rust-hir-dump.cc (Dump::visit): Likewise.
1020 * hir/tree/rust-hir-full-test.cc (ConstGenericParam::accept_vis): Likewise.
1021 * lex/rust-lex.cc (Lexer::parse_utf8_escape): Likewise.
1022 (Lexer::parse_string): Likewise.
1023 (Lexer::parse_char_or_lifetime): Likewise.
1024 * lex/rust-lex.h: Likewise.
1025 * metadata/rust-export-metadata.cc: Likewise.
1026 * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Likewise.
1027 * resolve/rust-ast-resolve-type.cc (ResolveType::visit): Likewise.
1028 (ResolveTypeToCanonicalPath::visit): Likewise.
1029 * resolve/rust-ast-verify-assignee.h: Likewise.
1030 * resolve/rust-early-name-resolver.cc (EarlyNameResolver::visit): Likewise.
1031 * typecheck/rust-hir-type-check-expr.h: Likewise.
1032 * typecheck/rust-hir-type-check-item.h: Likewise.
1033 * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit): Likewise.
1034 * typecheck/rust-tyty-rules.h: Likewise.
1035 * util/rust-attributes.cc (AttributeChecker::visit): Likewise.
1037 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1039 * hir/tree/rust-hir-expr.h: Add const `get_method_name`.
1040 * hir/tree/rust-hir-full-decls.h (struct GenericArgs): Move from `struct`...
1041 (class GenericArgs): ...to `class`.
1042 * hir/tree/rust-hir-path.h (struct GenericArgs): Likewise.
1043 (class GenericArgs): Clear `type_args` in copy constructor.
1044 * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Reorder
1046 * typecheck/rust-tyty.h: Add default constructors for `SubstitutionArgumentMappings`.
1048 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1050 * backend/rust-compile-context.cc (Context::push_closure_context): New function.
1051 (Context::pop_closure_context): Likewise.
1052 (Context::insert_closure_binding): Likewise.
1053 (Context::lookup_closure_binding): Likewise.
1054 * backend/rust-compile-context.h: Declare new functions and closure mappings.
1055 * backend/rust-compile-expr.cc (CompileExpr::visit): Visit captures properly.
1056 (CompileExpr::generate_closure_function): Compile captures properly.
1057 * backend/rust-compile-resolve-path.cc (ResolvePathRef::resolve): Check for
1059 * backend/rust-compile-type.cc (TyTyResolveCompile::visit): Compile capture list's
1062 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1064 * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Pass captures
1065 properly to `TyTy::ClosureType` constructor.
1066 * typecheck/rust-tyty.cc (ClosureType::as_string): Fix string representation.
1067 (ClosureType::clone): Pass `captures` argument.
1068 * typecheck/rust-tyty.h: Add `captures` field.
1070 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1072 * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Use proper closure
1074 * resolve/rust-name-resolver.cc (Scope::lookup_decl_type): New function.
1075 (Scope::lookup_rib_for_decl): Likewise.
1076 (Resolver::insert_resolved_name): Insert captured items.
1077 (Resolver::push_closure_context): New function.
1078 (Resolver::pop_closure_context): Likewise.
1079 (Resolver::insert_captured_item): Likewise.
1080 (Resolver::decl_needs_capture): Likewise.
1081 (Resolver::get_captures): Likewise.
1082 * resolve/rust-name-resolver.h: Declare new functions.
1084 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1086 * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Add Rib argument.
1087 (ResolveExpr::resolve_closure_param): Likewise.
1088 * resolve/rust-ast-resolve-implitem.h: Likewise.
1089 * resolve/rust-ast-resolve-item.cc (ResolveTraitItems::visit): Likewise.
1090 (ResolveItem::visit): Likewise.
1091 * resolve/rust-ast-resolve-pattern.cc (PatternDeclaration::visit): Likewise.
1092 * resolve/rust-ast-resolve-pattern.h: Likewise.
1093 * resolve/rust-ast-resolve-stmt.h: Likewise.
1094 * resolve/rust-ast-resolve-toplevel.h: Likewise.
1095 * resolve/rust-ast-resolve-type.h: Likewise.
1096 * resolve/rust-name-resolver.cc (Rib::lookup_decl_type): Likewise.
1097 (Scope::insert): Likewise.
1098 (Resolver::insert_builtin_types): Likewise.
1099 * resolve/rust-name-resolver.h: Likewise.
1101 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1103 * resolve/rust-name-resolver.cc (MKBUILTIN_TYPE): Remove macro.
1104 (Rib::Rib): Remove `mappings` field.
1105 (Resolver::generate_builtins): Use `setup_builtin` instead of macro.
1106 (Resolver::setup_builtin): New function.
1107 * resolve/rust-name-resolver.h: Declare `setup_builtin`, add FIXME
1110 2023-02-21 Raiki Tamura <tamaron1203@gmail.com>
1112 * lex/rust-lex.cc (Lexer::Lexer): Add `dump_lex` boolean flag.
1113 (Lexer::skip_token): Dump tokens if flag is enabled.
1114 (Lexer::dump_and_skip): New function.
1115 * lex/rust-lex.h: Include optional.h and declare functions.
1116 * parse/rust-parse-impl.h (Parser::debug_dump_lex_output): Remove old
1118 * parse/rust-parse.h: Likewise.
1119 * rust-session-manager.cc (Session::compile_crate): Pass lexer dump
1121 (Session::dump_lex): New function.
1122 * util/rust-optional.h: Add missing constructor.
1124 2023-02-21 Dave <dme2223@gmail.com>
1126 * ast/rust-item.h: Remoe default location for Visibility class.
1127 * parse/rust-parse-impl.h (Parser::parse_visibility): Pass proper location
1128 when instantiating visibilities.
1130 2023-02-21 Jakub Dupak <dev@jakubdupak.com>
1132 * ast/rust-ast-dump.cc (Dump::visit): Fix dumping of fn params.
1134 2023-02-21 Jakub Dupak <dev@jakubdupak.com>
1136 * ast/rust-ast-dump.cc (Dump::visit): Remove extraneous string when
1139 2023-02-21 Jakub Dupak <dev@jakubdupak.com>
1141 * ast/rust-ast-dump.cc: Remove unused include.
1143 2023-02-21 Jakub Dupak <dev@jakubdupak.com>
1145 * ast/rust-ast-dump.cc (Dump::visit): Add missing visitor.
1146 * ast/rust-ast-dump.h: Likewise.
1148 2023-02-21 Jakub Dupak <dev@jakubdupak.com>
1150 * ast/rust-ast-dump.cc (Dump::visit): Add missing visitor.
1152 2023-02-21 Jakub Dupak <dev@jakubdupak.com>
1154 * ast/rust-ast-dump.cc (Dump::visit): Add missing visitor.
1156 2023-02-21 Jakub Dupak <dev@jakubdupak.com>
1158 * ast/rust-ast-dump.cc (Dump::visit): Add missing visitor.
1160 2023-02-21 Jakub Dupak <dev@jakubdupak.com>
1162 * ast/rust-ast-dump.cc (Dump::visit): Add missing visitor.
1164 2023-02-21 Jakub Dupak <dev@jakubdupak.com>
1166 * ast/rust-ast-dump.cc (Dump::visit): Add missing visitor.
1168 2023-02-21 Jakub Dupak <dev@jakubdupak.com>
1170 * ast/rust-ast-dump.cc (Dump::visit): Add missing visitor.
1172 2023-02-21 Jakub Dupak <dev@jakubdupak.com>
1174 * ast/rust-ast-dump.cc (Dump::visit): Add missing visitor.
1175 * ast/rust-ast-dump.h: Add missing getter declaration.
1176 * ast/rust-ast-full-test.cc (BareFunctionType::as_string): Fix bare function
1177 string representation.
1178 * ast/rust-type.h (class BareFunctionType): Declare said getter.
1180 2023-02-21 Jakub Dupak <dev@jakubdupak.com>
1182 * ast/rust-ast-dump.cc (Dump::visit): Add missing visitor.
1184 2023-02-21 Jakub Dupak <dev@jakubdupak.com>
1186 * ast/rust-ast-dump.cc (Dump::visit): Add missing tuple type visitor.
1188 2023-02-21 Jakub Dupak <dev@jakubdupak.com>
1190 * ast/rust-ast-dump.cc (Dump::visit): Add missing never type visitor.
1192 2023-02-21 Jakub Dupak <dev@jakubdupak.com>
1194 * ast/rust-ast-dump.cc (Dump::visit): Add missing RawPointer visitor.
1196 2023-02-21 Jakub Dupak <dev@jakubdupak.com>
1198 * ast/rust-ast-dump.cc (Dump::visit): Add missing array visitor
1200 2023-02-21 Jakub Dupak <dev@jakubdupak.com>
1202 * ast/rust-ast-dump.cc (Dump::visit): Add missing slice visitor.
1204 2023-02-21 Jakub Dupak <dev@jakubdupak.com>
1206 * ast/rust-ast-dump.cc (Dump::visit): Add missing visitors.
1207 * ast/rust-ast-dump.h: Likewise.
1208 * ast/rust-ast.h: Add `get_lifetime_bounds` method.
1209 * ast/rust-item.h: Add missing getter for lifetimes.
1210 * ast/rust-type.h: Likewise.
1212 2023-02-21 Jakub Dupak <dev@jakubdupak.com>
1214 * ast/rust-ast-dump.cc (Dump::visit): Add new reference visitor wrapper.
1215 * ast/rust-ast-dump.h: Declare it.
1216 * ast/rust-item.h: Add mutable visibility getters.
1218 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com>
1220 * typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit): Fix extra call
1223 2023-02-21 Dave <dme2223@gmail.com>
1225 * ast/rust-item.h: Add location member.
1226 * hir/rust-ast-lower.cc (translate_visibility): Pass location argument.
1227 * hir/tree/rust-hir-item.h: Fix constructor to accept Location argument.
1229 2023-02-21 Raiki Tamura <tamaron1203@gmail.com>
1231 * util/rust-lang-item.h: Add handling for `phantom_data` lang item.
1233 2023-02-21 Jakub Dupak <dev@jakubdupak.com>
1235 * ast/rust-ast-dump.cc (Dump::visit): Add handling for unit structures.
1237 2023-02-21 Jakub Dupak <dev@jakubdupak.com>
1239 * ast/rust-ast-dump.h: Fix documentation.
1241 2023-02-21 Jakub Dupak <dev@jakubdupak.com>
1243 * ast/rust-ast-dump.cc (Dump::go): Use new API.
1244 (Dump::format_function_param): Refactor.
1245 (Dump::visit_items_joined_by_separator): New function.
1246 (Dump::emit_attrib): Refactor.
1247 (Dump::visit_as_line): New function.
1248 (Dump::visit_items_as_lines): Likewise.
1249 (Dump::visit_items_as_block): Likewise.
1250 (Dump::visit): Use new API.
1251 (Dump::emit_visibility): Likewise.
1252 (Dump::emit_indented_string): Likewise.
1253 (Dump::emit_generic_params): Likewise.
1254 (Dump::format_tuple_field): Likewise.
1255 (Dump::format_struct_field): Likewise.
1256 (Dump::format_function_common): Likewise.
1257 (Dump::visit_function_common): Likewise.
1258 * ast/rust-ast-dump.h: Declare new functions and add documentation.
1260 2023-02-21 Jakub Dupak <dev@jakubdupak.com>
1262 * ast/rust-ast-dump.cc (Dump::visit): Add new visit function for overloading.
1263 * ast/rust-ast-dump.h: Add documentation for layer.
1265 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com>
1267 * backend/rust-builtins.cc (BuiltinsContext::setup_atomic_fns): Declare atomic
1269 * backend/rust-compile-intrinsic.cc (atomic_load_handler_inner): New handler.
1270 (atomic_load_handler): Likewise.
1271 (unchecked_op_handler): Remove `static` function qualifier.
1272 (build_atomic_builtin_name): Handle load intrinsics.
1273 (atomic_store_handler_inner): New handler.
1275 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com>
1277 * backend/rust-compile-intrinsic.cc (check_for_basic_integer_type): New function.
1278 (build_atomic_builtin_name): Use HIR Type instead of `tree`.
1279 (atomic_store_handler_inner): Cleanup error handling.
1280 (unchecked_op_inner): Likewise.
1282 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com>
1284 * backend/rust-compile-intrinsic.cc (wrapping_op_handler): Refactor to return
1286 (wrapping_op_handler_inner): Rename.
1287 (wrapping_add_handler): Remove function.
1288 (wrapping_sub_handler): Likewise.
1289 (wrapping_mul_handler): Likewise.
1291 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com>
1293 * backend/rust-compile-intrinsic.cc (is_basic_integer_type): New function.
1294 (unchecked_op_inner): New handler.
1295 (unchecked_op_handler): New handler.
1297 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com>
1299 * backend/rust-builtins.cc (BuiltinsContext::setup_atomic_fns): New function.
1300 (BuiltinsContext::setup): Call `setup_atomic_fns`.
1301 * backend/rust-builtins.h: Declare `setup_atomic_fns`.
1302 * backend/rust-compile-intrinsic.cc (atomic_store_handler_inner): New function.
1303 (atomic_store_handler): New handler.
1304 (make_unsigned_long_tree): Add helper around making unsigned long trees.
1305 (prefetch_data_handler): Use `make_unsigned_long_tree`.
1306 (build_atomic_builtin_name): New function.
1308 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com>
1310 * backend/rust-constexpr.cc (build_anon_member_initialization): Workaround uninitialized
1312 (build_data_member_initialization): Likewise.
1314 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com>
1316 * backend/rust-compile-intrinsic.cc (sorry_handler): New intrinsic handler.
1318 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com>
1320 * expand/rust-macro-builtins.cc (MacroBuiltin::assert): Rename to...
1321 (MacroBuiltin::assert_handler): ..this.
1322 (MacroBuiltin::file): Rename to...
1323 (MacroBuiltin::file_handler): ..this.
1324 (MacroBuiltin::column): Rename to...
1325 (MacroBuiltin::column_handler): ..this.
1326 (MacroBuiltin::include_bytes): Rename to...
1327 (MacroBuiltin::include_bytes_handler): ..this.
1328 (MacroBuiltin::include_str): Rename to...
1329 (MacroBuiltin::include_str_handler): ..this.
1330 (MacroBuiltin::compile_error): Rename to...
1331 (MacroBuiltin::compile_error_handler): ..this.
1332 (MacroBuiltin::concat): Rename to...
1333 (MacroBuiltin::concat_handler): ..this.
1334 (MacroBuiltin::env): Rename to...
1335 (MacroBuiltin::env_handler): ..this.
1336 (MacroBuiltin::cfg): Rename to...
1337 (MacroBuiltin::cfg_handler): ..this.
1338 (MacroBuiltin::include): Rename to...
1339 (MacroBuiltin::include_handler): ..this.
1340 (MacroBuiltin::line): Rename to...
1341 (MacroBuiltin::line_handler): ..this.
1342 * expand/rust-macro-builtins.h: Rename all handlers.
1343 * util/rust-hir-map.cc (Mappings::insert_macro_def): Use new handler
1346 2023-02-21 Simon Cook <simon.cook@embecosm.com>
1348 * util/rust-inline-visitor.h: Remove some offending system includes.
1350 2023-02-21 YizhePKU <yizhe@pku.edu.cn>
1352 * util/rust-inline-visitor.h: New file.
1354 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1356 * backend/rust-compile-expr.cc (CompileExpr::visit): Refactor checking of closures.
1357 (CompileExpr::generate_possible_fn_trait_call): New function.
1358 * backend/rust-compile-expr.h: Declare `generate_possible_fn_trait_call`.
1360 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1362 * typecheck/rust-tyty-bounds.cc (TypeCheckBase::get_predicate_from_bound): Add missing
1365 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1367 * Make-lang.in: Compile rust-ast-lower-type.cc.
1368 * ast/rust-path.h: Add `get_locus` method to `TypePathFunction`.
1369 * hir/rust-ast-lower-base.cc (ASTLowerTypePath::visit): Move implementation to
1370 rust-ast-lower-type.cc.
1371 (ASTLowerQualifiedPathInType::visit): Likewise.
1372 (ASTLoweringType::visit): Likewise.
1373 * hir/rust-ast-lower-type.h: Move implementations to source file.
1374 * hir/tree/rust-hir-path.h: Likewise.
1375 * hir/rust-ast-lower-type.cc: New file.
1377 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1379 * resolve/rust-ast-resolve-type.cc (ResolveRelativeTypePath::go): Add missing handling of
1382 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1384 * backend/rust-compile-context.h: Add new functions: `insert_closure_decl` and
1385 `lookup_closure_decl`.
1386 * backend/rust-compile-expr.cc (CompileExpr::visit): Start compiling Closures properly.
1387 (CompileExpr::generate_closure_function): New function.
1388 (CompileExpr::generate_closure_fntype): Likewise.
1389 * backend/rust-compile-expr.h: Declare `generate_closure_function` and
1390 `generate_closure_fntype`.
1391 * backend/rust-compile-type.cc (TyTyResolveCompile::visit): Visit closure types properly.
1392 * backend/rust-mangle.cc (legacy_mangle_name): Add support for closures.
1393 * backend/rust-tree.h (RS_CLOSURE_FLAG): Add new tree macro.
1394 (RS_CLOSURE_TYPE_P): And checking for it on tree nodes.
1395 * typecheck/rust-tyty.cc (ClosureType::is_equal): Add implementation.
1397 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1399 * hir/tree/rust-hir-expr.h: Add `get_params` method.
1400 * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Typecheck closure nodes.
1401 (TypeCheckExpr::resolve_fn_trait_call): New function.
1402 * typecheck/rust-hir-type-check-expr.h: Declare `resolve_fn_trait_call` and
1403 `resolve_possible_fn_trait_call_method_name`.
1404 * typecheck/rust-hir-type-check.h: Declare `get_context_type`.
1405 * typecheck/rust-tyctx.cc (TypeCheckContextItem::get_context_type): New function.
1406 * typecheck/rust-tyty-cmp.h: Visit closures properly.
1407 * typecheck/rust-tyty-rules.h: Likewise.
1408 * typecheck/rust-tyty.cc (BaseType::bounds_compatible): Add commented out assertin.
1409 (ClosureType::as_string): Implement it.
1410 (ClosureType::clone): Fix closure cloning.
1411 (ClosureType::setup_fn_once_output): New function.
1412 * typecheck/rust-tyty.h: Improve `ClosureType` class and declare `setup_fn_once_output`.
1414 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1416 * checks/errors/rust-const-checker.cc (ConstChecker::visit): Visit closures properly.
1417 * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): Likewise.
1418 * checks/lints/rust-lint-marklive.h: Likewise.
1420 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1422 * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Simplify method
1423 call type checking by removing visitor and instead using one static cast. Use the
1425 * typecheck/rust-tyty-call.cc (TypeCheckMethodCallExpr::visit): Likewise.
1426 (TypeCheckMethodCallExpr::go): Likewise.
1427 (TypeCheckMethodCallExpr::check): Likewise.
1428 * typecheck/rust-tyty-call.h (class TypeCheckMethodCallExpr): Likewise.
1429 (class Argument): Likewise.
1431 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1433 * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Visit closure properly when
1435 (ResolveExpr::resolve_closure_param): Implement closure name resolving.
1436 * resolve/rust-ast-resolve-expr.h: Declare visitors for closure types.
1438 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1440 * hir/rust-ast-lower-pattern.cc (ASTLoweringPattern::ASTLoweringPattern):
1442 (ASTLoweringPattern::translate): Likewise.
1443 * hir/rust-ast-lower-pattern.h: Likewise.
1444 * resolve/rust-ast-resolve-expr.h: Likewise.
1446 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1448 * Make-lang.in: Add new object file for expression lowering.
1449 * ast/rust-expr.h: Move implementation of expr lowering to source file.
1450 * backend/rust-compile-block.h: Likewise.
1451 * backend/rust-compile-expr.cc (CompileExpr::visit): Likewise.
1452 * backend/rust-compile-expr.h: Likewise.
1453 * checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::visit): Likewise.
1454 * checks/errors/privacy/rust-privacy-reporter.h: Likewise.
1455 * checks/errors/rust-const-checker.cc (ConstChecker::visit): Likewise.
1456 * checks/errors/rust-const-checker.h: Likewise.
1457 * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): Likewise.
1458 * checks/errors/rust-unsafe-checker.h: Likewise.
1459 * hir/rust-ast-lower-base.h: Likewise.
1460 * hir/rust-ast-lower-expr.h (RUST_AST_LOWER_EXPR): Likewise.
1461 * hir/rust-ast-lower.cc (ASTLoweringBase::lower_closure_param): Likewise.
1462 * hir/rust-hir-dump.cc (Dump::visit): Likewise.
1463 * hir/rust-hir-dump.h: Likewise.
1464 * hir/tree/rust-hir-expr.h (class ClosureExpr): Likewise.
1465 (class ClosureExprInner): Likewise.
1466 (class ClosureExprInnerTyped): Likewise.
1467 * hir/tree/rust-hir-full-decls.h (class ClosureExprInner): Likewise.
1468 (class ClosureExprInnerTyped): Likewise.
1469 * hir/tree/rust-hir-full-test.cc (ClosureExprInnerTyped::as_string): Likewise.
1470 (ClosureExprInner::as_string): Likewise.
1471 (ClosureExprInner::accept_vis): Likewise.
1472 (ClosureExpr::accept_vis): Likewise.
1473 (ClosureExprInnerTyped::accept_vis): Likewise.
1474 * hir/tree/rust-hir-visitor.h: Likewise.
1475 * hir/tree/rust-hir.h (class Expr): Likewise.
1476 * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Likewise.
1477 * typecheck/rust-hir-type-check-expr.h: Likewise.
1478 * hir/rust-ast-lower-expr.cc: New file.
1480 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1482 * util/rust-lang-item.h: Add handling for `fn_once_output`.
1484 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com>
1486 * ast/rust-ast-fragment.cc (Fragment::Fragment): Add better APIs.
1487 (Fragment::complete): New function.
1488 (Fragment::unexpanded): New function.
1489 * ast/rust-ast-fragment.h: Declare new APIs and add documentation.
1490 * expand/rust-attribute-visitor.h: Use new Fragment API.
1491 * expand/rust-macro-builtins.cc (MacroBuiltin::file): Likewise.
1492 (MacroBuiltin::column): Likewise.
1493 (MacroBuiltin::include_bytes): Likewise.
1494 (MacroBuiltin::include_str): Likewise.
1495 (MacroBuiltin::concat): Likewise.
1496 (MacroBuiltin::env): Likewise.
1497 (MacroBuiltin::cfg): Likewise.
1498 (MacroBuiltin::include): Likewise.
1499 (MacroBuiltin::line): Likewise.
1500 * expand/rust-macro-expand.cc (parse_many): Likewise.
1501 (transcribe_expression): Likewise.
1502 (transcribe_type): Likewise.
1503 * expand/rust-macro-expand.h (struct MacroExpander): Likewise.
1505 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com>
1507 * ast/rust-ast.h (class ASTFragment): Remove old ASTFragment class.
1508 * ast/rust-macro.h (class MacroRulesDefinition): Use new Fragment API.
1509 * expand/rust-attribute-visitor.h: Likewise.
1510 * expand/rust-macro-builtins.cc (macro_end_token): Likewise.
1511 (MacroBuiltin::assert): Likewise.
1512 (MacroBuiltin::file): Likewise.
1513 (MacroBuiltin::column): Likewise.
1514 (MacroBuiltin::include_bytes): Likewise.
1515 (MacroBuiltin::include_str): Likewise.
1516 (MacroBuiltin::compile_error): Likewise.
1517 (MacroBuiltin::concat): Likewise.
1518 (MacroBuiltin::env): Likewise.
1519 (MacroBuiltin::cfg): Likewise.
1520 (MacroBuiltin::include): Likewise.
1521 (MacroBuiltin::line): Likewise.
1522 * expand/rust-macro-builtins.h: Likewise.
1523 * expand/rust-macro-expand.cc (MacroExpander::expand_decl_macro): Likewise.
1524 (MacroExpander::expand_invoc): Likewise.
1525 (MacroExpander::match_repetition): Likewise.
1526 (parse_many): Likewise.
1527 (transcribe_many_items): Likewise.
1528 (transcribe_many_ext): Likewise.
1529 (transcribe_many_trait_items): Likewise.
1530 (transcribe_many_impl_items): Likewise.
1531 (transcribe_many_trait_impl_items): Likewise.
1532 (transcribe_expression): Likewise.
1533 (transcribe_type): Likewise.
1534 (transcribe_on_delimiter): Likewise.
1535 (tokens_to_str): Likewise.
1536 * expand/rust-macro-expand.h (struct MacroExpander): Likewise.
1537 * util/rust-hir-map.cc (Mappings::insert_macro_def): Likewise.
1539 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com>
1541 * Make-lang.in: Add `rust-ast-fragment.o` object file.
1542 * ast/rust-ast-fragment.cc: New file.
1543 * ast/rust-ast-fragment.h: New file.
1545 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1547 * typecheck/rust-hir-trait-resolve.cc (TraitResolver::resolve_trait): Check if a
1548 trait query is currently in progress.
1549 * typecheck/rust-hir-type-check.h (class TraitQueryGuard): Add helpers around
1550 checking for trait queries and inserting them.
1552 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com>
1554 * ast/rust-ast-dump.cc (Dump::visit): Add missing visitors for macro definition dumping.
1555 (get_delimiters): New function.
1556 * ast/rust-ast-dump.h: Declare `get_delimiters` and add documentation.
1557 * ast/rust-macro.h: Add `get_token_tree` method.
1559 2023-02-21 Jakub Dupak <dev@jakubdupak.com>
1561 * ast/rust-ast-dump.cc (Dump::visit): Properly handle unloaded modules.
1563 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com>
1565 * ast/rust-ast-dump.cc (Dump::visit): Fix formatting when dumping modules.
1567 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com>
1569 * ast/rust-ast-dump.cc (Dump::visit): Dump items in modules properly.
1571 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com>
1573 * ast/rust-ast-dump.cc: Emit visibility when dumping items.
1575 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1577 * hir/rust-ast-lower-base.h (class ItemWrapper): New class.
1578 * hir/rust-ast-lower-base.cc (ASTLoweringBase::handle_outer_attributes): Use
1579 `ItemWrapper` class.
1580 (ASTLoweringBase::handle_doc_item_attribute): Likewise.
1581 (ASTLoweringBase::handle_lang_item_attribute): Likewise.
1582 * hir/rust-ast-lower-implitem.h: Check outer attributes on items.
1583 * hir/tree/rust-hir-item.h: Add `get_trait_locus` methods.
1584 * hir/tree/rust-hir.h: Likewise.
1585 * util/rust-hir-map.h: Add defId mappings and associated functions.
1586 * util/rust-hir-map.cc (Mappings::insert_defid_mapping): Implement insertion to said
1588 (Mappings::lookup_trait_item_defid): And looking up said mappings.
1590 2023-02-21 Jakub Dupak <dev@jakubdupak.com>
1592 * ast/rust-ast-dump.cc (Dump::visit): Add code for dumping type aliases.
1594 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1596 * typecheck/rust-hir-trait-resolve.cc (TraitResolver::TraitResolver): Do not nullptr init
1597 `resolved_trait_reference` anymore.
1598 (TraitResolver::resolve_path): Simplify function and rename to...
1599 (TraitResolver::resolve_path_to_trait): ...this.
1600 (TraitResolver::lookup_path): Use new interface.
1601 * typecheck/rust-hir-trait-resolve.h (class TraitResolver): Do not inherit `HIRFullVisitor`
1604 2023-02-21 David Faust <david.faust@oracle.com>
1606 * ast/rust-ast-dump.cc (Dump::visit): Add dump for RangeExprs.
1608 2023-02-21 David Faust <david.faust@oracle.com>
1610 * ast/rust-ast-dump.cc (Dump::visit): Add dump for, BorrowExpr, DereferenceExpr,
1611 ErrorPropagationExpr, NegationExpr, TypeCastExpr and GroupedExpr.
1613 2023-02-21 David Faust <david.faust@oracle.com>
1615 * ast/rust-ast-dump.cc (Dump::visit): Add dump code for ArrayExpr.
1617 2023-02-21 David Faust <david.faust@oracle.com>
1619 * ast/rust-ast-dump.cc (Dump::visit): Add dumps for ComparisonExpr and
1622 2023-02-21 David Faust <david.faust@oracle.com>
1624 * ast/rust-ast-dump.cc (Dump::visit): Fix IfExpr formatting.
1626 2023-02-21 David Faust <david.faust@oracle.com>
1628 * ast/rust-ast-dump.cc (Dump::visit): Fix block formatting.
1630 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1632 * typecheck/rust-autoderef.cc: Add support for multiple resolution candidates.
1633 * typecheck/rust-hir-dot-operator.cc (MethodResolver::MethodResolver): Edit
1634 `try_result` field and change constructor.
1635 (MethodResolver::Probe): Return set of candidates instead of singular candidate.
1636 (MethodResolver::select): Add better implementation to account for multiple
1638 * typecheck/rust-hir-dot-operator.h (struct MethodCandidate): Overload comparison
1639 operator in order to store them in `std::set`.
1640 * typecheck/rust-hir-inherent-impl-overlap.h: Do not fail assertion on missing type.
1641 * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Adapt code to use
1642 multiple candidates.
1643 * typecheck/rust-tyty.cc (set_cmp_autoderef_mode): Add code to handle automatic
1645 (reset_cmp_autoderef_mode): Add helper function to reset said mode.
1646 * typecheck/rust-tyty.h (set_cmp_autoderef_mode): Declare function.
1647 (reset_cmp_autoderef_mode): Likewise.
1648 * typecheck/rust-tyty-cmp.h: Add handling of `autoderef_cmp_flag`
1650 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1652 * util/rust-abi.cc (get_abi_from_string): Add missing "rust-call"
1653 possibility for ABI variant.
1655 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1657 * util/rust-lang-item.h: Add `fn_once` lang item.
1659 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1661 * backend/rust-compile.cc: Add note about missing support for super
1663 * typecheck/rust-tyty.cc (BaseType::satisfies_bound): New function.
1664 (BaseType::bounds_compatible): New function.
1665 (DynamicObjectType::get_object_items): New function.
1666 * typecheck/rust-hir-trait-ref.h: Use new API to perform type resolution
1669 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com>
1671 * Make-lang.in: Compile early name resolver.
1672 * expand/rust-attribute-visitor.cc (AttrVisitor::visit): Move macro
1674 * expand/rust-macro-builtins.cc (try_expand_macro_expression): Run ENR
1675 when recursively expanding macros.
1676 * expand/rust-macro-expand.cc (MacroExpander::expand_invoc): No longer
1677 perform name resolution in `expand_invoc`.
1678 * expand/rust-macro-expand.h (struct MacroExpander): Keep ENR within
1680 * rust-session-manager.cc (Session::expansion): Run ENR.
1681 * resolve/rust-early-name-resolver.cc: New file.
1682 * resolve/rust-early-name-resolver.h: New file.
1684 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com>
1686 * ast/rust-path.h: Add `accept_vis` method to `GenericArg` class.
1688 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com>
1690 * resolve/rust-ast-resolve-item.cc (ResolveItem::visit): Add note for
1691 glob import resolving.
1693 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com>
1695 * util/rust-hir-map.h: Add new mappings.
1696 * util/rust-hir-map.cc (Mappings::insert_macro_invocation): Add insertion
1697 function into mappings.
1698 (Mappings::lookup_macro_invocation): Add lookup function for mappings.
1700 2023-02-21 Marc Poulhiès <dkm@kataplop.net>
1702 * parse/rust-parse-impl.h (Parser::parse_stmt_or_expr_without_block):
1703 Check if `expr` is valid after parsing it.
1705 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com>
1707 * backend/rust-builtins.cc (BuiltinsContext::setup): Declare prefetch
1709 * backend/rust-compile-intrinsic.cc (enum class Prefetch): Add kinds of
1710 prefetch intrinsics.
1711 (prefetch_data_handler): New function.
1712 (prefetch_read_data): Likewise.
1713 (prefetch_write_data): Likewise.
1715 2023-02-21 David Faust <david.faust@oracle.com>
1717 * ast/rust-ast-dump.cc (Dump::visit): Fill empty functions for
1718 structs, enums and unions.
1720 2023-02-21 David Faust <david.faust@oracle.com>
1722 * ast/rust-ast-dump.cc (Dump::format_tuple_field): New.
1723 (Dump::format_struct_field): New.
1724 * ast/rust-ast-dump.h (format_tuple_field): New.
1725 (format_struct_field): New.
1727 2023-02-21 David Faust <david.faust@oracle.com>
1729 * ast/rust-ast-dump.cc (Dump::visit): move generic params dump ...
1730 (Dump::emit_generic_params): ... here.
1731 * ast/rust-ast-dump.h (emit_generic_params): New.
1733 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1735 * typecheck/rust-hir-trait-ref.h (lookup_trait_item): Add lookup
1738 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1740 * backend/rust-compile-expr.cc
1741 (CompileExpr::resolve_method_address): Use auto and minor change
1743 * typecheck/rust-hir-type-check-path.cc
1744 (TypeCheckExpr::resolve_segments): Likewise.
1745 * typecheck/rust-hir-type-check-type.cc: Likewise.
1746 * backend/rust-compile-resolve-path.cc
1747 (HIRCompileBase::query_compile): Likewise. Removecall to
1749 * typecheck/rust-hir-path-probe.h (struct PathProbeCandidate): Add
1750 locus initializer in ctor, implement get_defid.
1751 (class PathProbeType::Probe): return a set instead of vector.
1753 (class ReportMultipleCandidateError): Do not inherit from
1754 HIRImplVisitor anymore and remove corresponding impl. Adjust for
1755 change in Probe. Simplify Report handling.
1756 (class PathProbeImplTrait::Probe): Adjust return type.
1758 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1760 * typecheck/rust-hir-type-check-enumitem.cc
1761 (TypeCheckEnumItem::visit): Adjust VariantDef ctor calls with
1763 * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit):
1765 * typecheck/rust-tyty.h (VariantDef): Add defid parameter to ctor.
1767 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com>
1769 * Make-lang.in: Add `rust-builtins.o` as target
1770 * backend/rust-builtins.h: Refactor to new file.
1771 * backend/rust-builtins.cc: New file.
1773 2023-02-21 David Faust <david.faust@oracle.com>
1775 * ast/rust-ast-dump.cc (Dump::visit): Implement visitor for If
1778 2023-02-21 David Faust <david.faust@oracle.com>
1780 * ast/rust-ast-dump.cc (Dump::visit): Dump assignment and compound
1781 assignment expressions.
1783 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1785 * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::query_type):
1786 Check for recursive queries.
1787 * typecheck/rust-hir-type-check.h: New functions: `query_completed`,
1788 `query_in_progress`, `insert_query`.
1789 * typecheck/rust-tyty-bounds.cc (TypeBoundsProbe::scan): Use `query_type` API.
1791 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com>
1793 * ast/rust-ast-dump.cc (Dump::emit_visibility): New function.
1794 (Dump::visit): Call into `emit_visibility`.
1795 (Dump::format_function_common): Likewise.
1796 * ast/rust-ast-dump.h: Declare `emit_visibility`.
1798 2023-02-21 Arthur Cohen <arthur.cohen@embecosm.com>
1800 * ast/rust-item.h: Rename get_public_vis_type.
1801 * hir/rust-ast-lower.cc (translate_visibility): Use new name.
1803 2023-02-21 Philip Herron <philip.herron@embecosm.com>
1805 * resolve/rust-name-resolver.h: Add miscellenaous item mappings.
1806 * resolve/rust-name-resolver.cc (Resolver::insert_resolved_misc): Use
1808 (Resolver::lookup_resolved_misc): Likewise.
1809 * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_segments):
1810 Adapt function to insert into miscelleanous mappings.
1811 * checks/lints/rust-lint-marklive.cc (MarkLive::find_ref_node_id):
1812 Allow lookup in miscelleanous mappings in mark-live phase.
1814 2023-02-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1816 * backend/rust-tree.cc: Include memmodel.h.
1818 2023-02-17 Thomas Schwinge <thomas@codesourcery.com>
1820 * backend/rust-tree.cc: '#include "tm_p.h"'.
1822 2023-01-31 Philip Herron <philip.herron@embecosm.com>
1824 * Make-lang.in: Remove `rust-hir-typecheck-toplevel` object and add
1825 `rust-hir-path-probe` one.
1826 * typecheck/rust-hir-dot-operator.cc (MethodResolver::MethodResolver):
1827 Remove no longer used `context` and `mapping` fields, and use new
1829 (MethodResolver::MethodResolver): Likewise.
1830 (MethodResolver::select): Use new `query_type` API.
1831 * typecheck/rust-hir-path-probe.h: New header.
1832 * typecheck/rust-hir-path-probe.cc: New file.
1833 * typecheck/rust-hir-dot-operator.h (class MethodResolver): Remove no
1834 longer used `context` and `mapping` fields, and use new `query_type` API.
1835 * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::query_type): New function.
1836 * typecheck/rust-hir-type-check-base.h: Declare `query_type` function.
1837 * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Add debug print.
1838 * typecheck/rust-hir-type-check-implitem.cc (TypeCheckTopLevelExternItem::Resolve):
1839 Refactor and make use of new query system.
1840 (TypeCheckTopLevelExternItem::Resolve): Likewise.
1841 (TypeCheckTopLevelExternItem::visit): Likewise.
1842 (TypeCheckTopLevelImplItem::visit): Likewise.
1843 (TypeCheckImplItem::visit): Likewise.
1844 (TypeCheckImplItem::TypeCheckImplItem): Likewise.
1845 (TypeCheckImplItem::Resolve): Likewise.
1846 (TypeCheckImplItemWithTrait::visit): Likewise.
1847 * typecheck/rust-hir-type-check-implitem.h (class TypeCheckTopLevelImplItem): Likewise.
1848 (class TypeCheckImplItemWithTrait): Likewise.
1849 * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::TypeCheckItem): Likewise.
1850 (TypeCheckItem::Resolve): Likewise.
1851 (TypeCheckItem::ResolveImplItem): Likewise.
1852 (TypeCheckItem::ResolveImplBlockSelf): Likewise.
1853 (TypeCheckItem::visit): Likewise.
1854 (TypeCheckItem::resolve_impl_item): Likewise.
1855 (TypeCheckItem::resolve_impl_block_substitutions): Likewise.
1856 (TypeCheckItem::resolve_impl_block_self): Likewise.
1857 * typecheck/rust-hir-type-check-item.h: Likewise.
1858 * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_root_path): Likewise.
1859 (TypeCheckExpr::resolve_segments): Likewise.
1860 * typecheck/rust-hir-type-check-stmt.cc (TypeCheckStmt::visit): Likewise.
1861 * typecheck/rust-hir-type-check-stmt.h: Likewise.
1862 * typecheck/rust-hir-type-check-type.cc (TypeCheckType::Resolve): Likewise.
1863 (TypeCheckType::visit): Likewise.
1864 (TypeCheckType::resolve_root_path): Likewise.
1865 * typecheck/rust-hir-type-check.cc (TypeResolution::Resolve): Likewise.
1866 * typecheck/rust-hir-type-check.h: Likewise.
1867 * typecheck/rust-substitution-mapper.h: Likewise.
1868 * typecheck/rust-tyty-bounds.cc (TypeBoundsProbe::scan): Likewise.
1869 (TypeCheckBase::get_predicate_from_bound): Likewise.
1870 (TypeBoundsMappings::add_bound): Likewise.
1871 * typecheck/rust-tyty-cmp.h: Likewise.
1872 * typecheck/rust-tyty.h: Likewise.
1873 * typecheck/rust-tyty.cc (SubstitutionRef::infer_substitions): Likewise.
1874 (ParamType::resolve): Do not infinite loop anymore.
1875 * util/rust-hir-map.h: Add new `hirImplBlockTypeMappings` and
1876 declare `lookup_impl_block_type`.
1877 * util/rust-hir-map.cc (Mappings::insert_hir_impl_block): Use new
1878 `hirImplBlockTypeMappings`
1879 (Mappings::lookup_impl_block_type): New function.
1881 2023-01-31 Philip Herron <philip.herron@embecosm.com>
1883 * backend/rust-compile-context.h: Add new optional `asm_name` string
1884 argument to `lookup_function_decl`.
1885 * backend/rust-compile-item.cc (CompileItem::visit): Compute assembly
1886 name and pass it to `lookup_function_decl` when calling it.
1888 2023-01-31 Philip Herron <philip.herron@embecosm.com>
1890 * backend/rust-constexpr.cc (eval_store_expression): Remove invalid
1891 assertion on constexpr constructors.
1893 2023-01-31 Philip Herron <philip.herron@embecosm.com>
1895 * backend/rust-compile-expr.h: Formatting.
1897 2023-01-31 liushuyu <liushuyu011@gmail.com>
1899 * ast/rust-ast.h (class MacroInvocData): Store expander as
1900 member of the class.
1901 (class Expr): Add `is_literal` virtual method
1902 * ast/rust-expr.h: Override `is_literal` for `LiteralExpr`s.
1903 * expand/rust-macro-builtins.cc (try_expand_macro_expression): New function.
1904 (try_extract_string_literal_from_fragment): Likewise.
1905 (try_expand_single_string_literal): Likewise.
1906 (try_expand_many_expr): Likewise.
1907 (parse_single_string_literal): Add macro expander as argument.
1908 (MacroBuiltin::include_bytes): Pass expander as argument to
1909 `parse_single_string_literal`.
1910 (MacroBuiltin::include_str): Likewise.
1911 (MacroBuiltin::compile_error): Likewise.
1912 (MacroBuiltin::include): Likewise.
1913 (MacroBuiltin::concat): Likewise and add better error handling.
1914 (MacroBuiltin::env): Likewise.
1915 * expand/rust-macro-expand.cc (MacroExpander::expand_invoc): Expand
1916 invocations recursively.
1918 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com>
1920 * lang.opt: Add new ``-frust-compile-until` option.
1921 * rust-session-manager.cc (Session::compile_crate): Add stops around
1922 various compilation steps in the pipeline.
1923 * rust-session-manager.h (struct CompileOptions): Add `CompileStep` enum
1926 2023-01-31 Philip Herron <philip.herron@embecosm.com>
1928 * backend/rust-tree.cc (rs_type_quals): Comment out bad assertion
1930 2023-01-31 Philip Herron <philip.herron@embecosm.com>
1932 * typecheck/rust-hir-type-check-toplevel.cc (TypeCheckTopLevel::visit):
1933 Make static items behave more similarly to const items.
1935 2023-01-31 Philip Herron <philip.herron@embecosm.com>
1937 * backend/rust-compile-item.cc (CompileItem::visit): Const evaluate
1938 static item expressions.
1940 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com>
1942 * hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): Do not lower
1943 null items within modules.
1945 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com>
1947 * util/rust-attributes.cc: Add `macro_use` to list of builtin
1950 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com>
1952 * checks/errors/rust-const-checker.cc (ConstChecker::ctx_to_str): Allow
1953 getting an error string from a specific constant context.
1954 (ConstChecker::ctx_allows_default): New function, check if a context
1955 allows default values for Const generics.
1956 (ConstChecker::visit): Call into `ctx_allows_default`.
1957 * checks/errors/rust-const-checker.h: Declare `ctx_allows_default`.
1959 2023-01-31 liushuyu <liushuyu011@gmail.com>
1961 * backend/rust-compile-expr.cc (CompileExpr::visit): Properly formulate
1962 exit condition when compiling while loops.
1964 2023-01-31 Faisal Abbas <90.abbasfaisal@gmail.com>
1966 * typecheck/rust-hir-type-check-stmt.cc (TypeCheckStmt::visit): Turn
1967 constant item typechecking into a coercion site instead of a unify
1970 2023-01-31 Philip Herron <philip.herron@embecosm.com>
1972 * typecheck/rust-tyty.h: Fix `is_concrete` for unit types with
1975 2023-01-31 Philip Herron <philip.herron@embecosm.com>
1977 * typecheck/rust-tyty-bounds.cc (TypeBoundPredicate::contains_associated_types):
1978 Check if a type bound predicate contains assocated types.
1979 * typecheck/rust-tyty.h: Declare the above mentioned function.
1980 * typecheck/rust-hir-trait-resolve.cc: Use `contains_associated_types`
1983 2023-01-31 Philip Herron <philip.herron@embecosm.com>
1985 * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Add
1986 more calls to `rust_debug` for development.
1988 2023-01-31 Philip Herron <philip.herron@embecosm.com>
1990 * backend/rust-compile-base.cc: Improve compilation pipeline and simplify
1993 2023-01-31 Philip Herron <philip.herron@embecosm.com>
1995 * backend/rust-tree.cc (comptypes): Remove some C++ specific checks in
1996 Rust const folder for now.
1998 2023-01-31 Philip Herron <philip.herron@embecosm.com>
2000 * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::unify_site): Add
2001 better unification function with debug calls.
2002 * typecheck/rust-autoderef.cc (AutoderefCycle::cycle): Add more debug
2003 calls and use new unify API.
2004 * typecheck/rust-coercion.cc (TypeCoercionRules::do_coercion): Likewise.
2005 (TypeCoercionRules::coerce_borrowed_pointer): Likewise.
2006 (TypeCoercionRules::select): Likewise.
2007 * typecheck/rust-hir-dot-operator.cc (MethodResolver::select): Likewise.
2008 * typecheck/rust-hir-trait-resolve.cc (TraitItemReference::resolve_item): Likewise.
2009 (TypeCheckBase::coercion_site): Likewise.
2010 (TypeCheckBase::cast_site): Likewise.
2011 * typecheck/rust-hir-type-check-base.h: Likewise.
2012 * typecheck/rust-hir-type-check-enumitem.cc (TypeCheckEnumItem::visit): Likewise.
2013 * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Likewise.
2014 * typecheck/rust-hir-type-check-implitem.cc (TypeCheckTopLevelImplItem::visit): Likewise.
2015 (TypeCheckImplItem::visit): Likewise.
2016 * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): Likewise.
2017 * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_segments): Likewise.
2018 * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit): Likewise.
2019 * typecheck/rust-hir-type-check-stmt.cc (TypeCheckStmt::visit): Likewise.
2020 * typecheck/rust-hir-type-check-struct.cc (TypeCheckStructExpr::resolve): Likewise.
2021 * typecheck/rust-hir-type-check-toplevel.cc (TypeCheckTopLevel::visit): Likewise.
2022 * typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit): Likewise.
2023 * typecheck/rust-hir-type-check.cc (TypeResolution::Resolve): Likewise.
2024 * typecheck/rust-tyctx.cc (TypeCheckContext::peek_return_type): Likewise.
2025 * typecheck/rust-tyty-call.cc (TypeCheckMethodCallExpr::visit): Likewise.
2026 * typecheck/rust-tyty-cmp.h: Likewise.
2027 * typecheck/rust-tyty-rules.h: Likewise.
2028 * typecheck/rust-tyty.cc (BaseType::mappings_str): Likewise.
2029 (BaseType::debug): Print type name more clearly.
2030 (BaseType::debug_str): Add new function to print type pointer and name.
2031 (TupleType::get_name): Improve type name fetching function.
2032 (ReferenceType::get_name): Likewise.
2033 (PointerType::get_name): Likewise.
2034 * typecheck/rust-tyty.h: Refactor definitions outside of the header.
2036 2023-01-31 Philip Herron <philip.herron@embecosm.com>
2038 * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::TypeCheckBase):
2040 (TypeCheckBase::coercion_site): Add `Location` argument to function.
2041 * typecheck/rust-hir-type-check-base.h: Use `TypeCheckBase::coercion_site`
2042 function with location argument.
2043 * typecheck/rust-hir-type-check-enumitem.cc (TypeCheckEnumItem::visit): Likewise.
2044 * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Likewise.
2045 * typecheck/rust-hir-type-check-expr.h (class TypeCheckExpr): Likewise.
2046 * typecheck/rust-hir-type-check-stmt.cc (TypeCheckStmt::visit): Likewise.
2047 * typecheck/rust-hir-type-check-struct.cc (TypeCheckStructExpr::visit): Likewise.
2048 * typecheck/rust-hir-type-check-toplevel.cc (TypeCheckTopLevel::visit): Likewise.
2049 * typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit): Likewise.
2050 (TypeCheckMethodCallExpr::visit): Likewise.
2051 * typecheck/rust-tyty.h: Add missing locus field.
2052 * typecheck/rust-tyty.cc (StructFieldType::clone): Use locus field.
2053 (StructFieldType::monomorphized_clone): Likewise.
2055 2023-01-31 Philip Herron <philip.herron@embecosm.com>
2057 * typecheck/rust-tyctx.cc (TypeCheckContext::pop_return_type): Add
2058 guards around `std::vector<T>.pop_back()`.
2059 (TypeCheckContext::peek_context): Likewise for `std::vector<T>.back()`.
2061 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com>
2062 philberty <philip.herron@embecosm.com>
2064 * ast/rust-ast.h: Improve assertions within ASTFragment API.
2066 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com>
2068 * ast/rust-ast.h: Add assertions and accessors for fragment nodes.
2069 * expand/rust-attribute-visitor.cc (AttrVisitor::visit): Fix expansion
2070 context typo when visiting `InherentImpl` items.
2071 (AttrVisitor::maybe_expand_expr): Use new Fragment accessor to fetch
2072 properly typed node.
2073 (AttrVisitor::maybe_expand_type): Likewise.
2074 * expand/rust-macro-expand.cc (transcribe_type): Emit parse errors
2075 when trying to parse a type.
2077 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com>
2079 * ast/rust-ast-dump.h: Add shorthand `AST::Dump::debug` function to
2080 dump an AST node on `stderr`.
2082 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com>
2083 philberty <philip.herron@embecosm.com>
2085 * expand/rust-macro-expand.cc (parse_many): Return early from parsing
2086 loop if we encounter an error, and emit that error in the meantime.
2088 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com>
2090 * expand/rust-macro-expand.cc (MacroExpander::match_matcher): Handle
2091 fragments differently based on whether or not we are currently trying
2092 to match a matcher in a repetition context.
2093 (MacroExpander::match_n_matches): Use new `in_repetition` argument
2094 properly when calling `match_matcher`.
2095 * expand/rust-macro-expand.h (MacroExpander::match_matcher): Allow
2096 passing extra `in_repetition` bool argument
2098 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com>
2100 * parse/rust-parse-impl.h: Allow parsing full range expressions without
2103 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com>
2105 * checks/lints/rust-lint-scan-deadcode.h: Do not report public items
2108 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com>
2110 * util/rust-attributes.cc: Add `rustc_inherit_overflow_checks` to list
2111 of builtin attributes.
2113 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com>
2115 * backend/rust-compile-expr.cc (CompileExpr::visit): Insert overflow
2117 (CompileExpr::array_copied_expr): Insert overflow checks logic.
2118 * backend/rust-compile-item.cc (CompileItem::visit): Insert overflow
2120 * backend/rust-compile-type.cc (TyTyResolveCompile::visit): Insert
2121 overflow checks logic.
2122 * rust-gcc.cc (Gcc_backend::arithmetic_or_logical_expression): Differentiate
2123 existing function from `arithmetic_or_logical_expression_checked`.
2124 This function does insert perform overflow checks.
2125 (Gcc_backend::arithmetic_or_logical_expression_checked): New
2127 (is_overflowing_expr): New function. Check if an expression is an
2128 overflowing one (ADD, SUB, MUL).
2129 (fetch_overflow_builtins): New function.
2130 * rust-backend.h: Declare `arithmetic_or_logical_expression_checked` in
2131 abstract `Backend` class.
2133 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com>
2135 * backend/rust-builtins.h: Refactor builtin context class and add
2138 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com>
2140 * rust-gcc.cc (class Bvariable): Move class to `rust-gcc.h` header.
2141 * rust-gcc.h: New file.
2143 2023-01-31 Philip Herron <philip.herron@embecosm.com>
2145 * hir/rust-ast-lower-expr.h: Lower double borrow expressions to two
2147 * hir/tree/rust-hir-expr.h: Remove `is_double_borrow` field from
2149 * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Remove
2150 call to `gcc_unreachable` on double borrow expressions.
2152 2023-01-31 Faisal Abbas <90.abbasfaisal@gmail.com>
2154 * backend/rust-tree.cc : Add new includes.
2156 (maybe_add_global): New.
2157 (init_modules): New (copied from cp)
2158 (var_in_constexpr_fn): Likewise.
2159 (member_vec_linear_search): Likewise.
2160 (member_vec_binary_search): Likewise.
2161 (is_overloaded_fn): Likewise.
2162 (ovl_make): Likewise.
2163 (lookup_add): Likewise.
2164 (type_memfn_quals): Likewise.
2165 (struct find_parameter_pack_data): Likewise.
2166 (struct conv_type_hasher): Likewise.
2167 (make_conv_op_name): Likewise.
2168 (builtin_pack_fn_p): Likewise.
2169 (builtin_pack_call_p): Likewise.
2170 (has_extra_args_mechanism_p): Likewise.
2171 (find_parameter_packs_r): Likewise.
2172 (WALK_SUBTREE): Likewise.
2173 (type_memfn_rqual): Likewise.
2174 (maybe_add_lang_type_raw): Likewise.
2175 (struct c_fileinfo): Likewise.
2176 (get_fileinfo): Likewise.
2177 (cxx_make_type): Likewise.
2178 (build_min_array_type): Likewise.
2179 (fields_linear_search): Likewise.
2180 (nothrow_spec_p): Likewise.
2181 (maybe_get_fns): Likewise.
2182 (get_fns): Likewise.
2183 (get_first_fn): Likewise.
2184 (dependent_name): Likewise.
2185 (called_fns_equal): Likewise.
2186 (canonical_eh_spec): Likewise.
2187 (rs_tree_code_length): Likewise.
2188 (rs_tree_operand_length): Likewise.
2189 (rs_tree_equal): Likewise.
2190 (publicly_uniquely_derived_p): Likewise.
2191 (comp_except_types): Likewise.
2192 (comp_except_specs): Likewise.
2193 (compparms): Likewise.
2194 (set_array_type_canon): Likewise.
2195 (struct cplus_array_info): Likewise.
2196 (struct cplus_array_hasher): Likewise.
2197 (cplus_array_hasher::hash): Likewise.
2198 (cplus_array_hasher::equal): Likewise.
2199 (is_byte_access_type): Likewise.
2200 (build_cplus_array_type): Likewise.
2201 (rs_build_qualified_type_real): Likewise.
2202 (vector_targets_convertible_p): Likewise.
2203 (comp_array_types): Likewise.
2204 (same_type_ignoring_top_level_qualifiers_p): Likewise.
2205 (comp_ptr_ttypes_const): Likewise.
2206 (similar_type_p): Likewise.
2207 (structural_comptypes): Likewise.
2208 (comptypes): Likewise.
2209 (next_initializable_field): Likewise.
2210 (sufficient_parms_p): Likewise.
2211 (default_ctor_p): Likewise.
2212 (user_provided_p): Likewise.
2213 (type_has_non_user_provided_default_constructor): Likewise.
2214 (default_init_uninitialized_part): Likewise.
2215 (extract_conversion_operator): Likewise.
2216 (get_class_binding_direct): Likewise.
2217 (lang_check_failed): Likewise.
2218 (skip_artificial_parms_for): Likewise.
2219 (in_class_defaulted_default_constructor): Likewise.
2220 (is_instantiation_of_constexpr): Likewise.
2221 (check_for_uninitialized_const_var): Likewise.
2222 (cv_unqualified): Likewise.
2223 (make_tree_vector): Likewise.
2224 (release_tree_vector): Likewise.
2225 (instantiation_dependent_expression_p): Likewise.
2226 (cp_get_callee): Likewise.
2227 (build_nop): Likewise.
2228 (scalarish_type_p): Likewise.
2229 (type_has_nontrivial_copy_init): Likewise.
2230 (build_local_temp): Likewise.
2231 (is_normal_capture_proxy): Likewise.
2232 (reject_gcc_builtin): Likewise.
2233 (is_bitfield_expr_with_lowered_type): Likewise.
2234 (maybe_undo_parenthesized_ref): Likewise.
2235 (fold_offsetof): Likewise.
2236 (char_type_p): Likewise.
2237 (resolve_nondeduced_context): Likewise.
2238 (instantiate_non_dependent_or_null): Likewise.
2239 (resolve_nondeduced_context_or_error): Likewise.
2240 (really_overloaded_fn): Likewise.
2241 (invalid_nonstatic_memfn_p): Likewise.
2242 (strip_top_quals): Likewise.
2243 (cxx_incomplete_type_inform): Likewise.
2244 (cxx_incomplete_type_diagnostic): Likewise.
2245 (decl_constant_var_p): Likewise.
2246 (undeduced_auto_decl): Likewise.
2247 (require_deduced_type): Likewise.
2248 * backend/rust-tree.h (enum c_tree_index): Likewise.
2250 (enum cp_tree_index): Likewise.
2251 (wchar_decl_node): Likewise.
2252 (vtable_entry_type): Likewise.
2253 (delta_type_node): Likewise.
2254 (vtable_index_type): Likewise.
2255 (class_type_node): Likewise.
2256 (unknown_type_node): Likewise.
2257 (init_list_type_node): Likewise.
2258 (explicit_void_list_node): Likewise.
2259 (vtbl_type_node): Likewise.
2260 (vtbl_ptr_type_node): Likewise.
2261 (std_node): Likewise.
2262 (abi_node): Likewise.
2263 (global_namespace): Likewise.
2264 (const_type_info_type_node): Likewise.
2265 (conv_op_marker): Likewise.
2266 (abort_fndecl): Likewise.
2267 (current_aggr): Likewise.
2268 (nullptr_node): Likewise.
2269 (nullptr_type_node): Likewise.
2270 (align_type_node): Likewise.
2271 (char8_type_node): Likewise.
2272 (char16_type_node): Likewise.
2273 (char32_type_node): Likewise.
2274 (wchar_type_node): Likewise.
2275 (underlying_wchar_type_node): Likewise.
2276 (wint_type_node): Likewise.
2277 (signed_size_type_node): Likewise.
2278 (unsigned_ptrdiff_type_node): Likewise.
2279 (intmax_type_node): Likewise.
2280 (uintmax_type_node): Likewise.
2281 (widest_integer_literal_type_node): Likewise.
2282 (widest_unsigned_literal_type_node): Likewise.
2283 (sig_atomic_type_node): Likewise.
2284 (int8_type_node): Likewise.
2285 (int16_type_node): Likewise.
2286 (int32_type_node): Likewise.
2287 (int64_type_node): Likewise.
2288 (uint8_type_node): Likewise.
2289 (c_uint16_type_node): Likewise.
2290 (c_uint32_type_node): Likewise.
2291 (c_uint64_type_node): Likewise.
2292 (int_least8_type_node): Likewise.
2293 (int_least16_type_node): Likewise.
2294 (int_least32_type_node): Likewise.
2295 (int_least64_type_node): Likewise.
2296 (uint_least8_type_node): Likewise.
2297 (uint_least16_type_node): Likewise.
2298 (uint_least32_type_node): Likewise.
2299 (uint_least64_type_node): Likewise.
2300 (int_fast8_type_node): Likewise.
2301 (int_fast16_type_node): Likewise.
2302 (int_fast32_type_node): Likewise.
2303 (int_fast64_type_node): Likewise.
2304 (uint_fast8_type_node): Likewise.
2305 (uint_fast16_type_node): Likewise.
2306 (uint_fast32_type_node): Likewise.
2307 (uint_fast64_type_node): Likewise.
2308 (intptr_type_node): Likewise.
2309 (uintptr_type_node): Likewise.
2310 (truthvalue_type_node): Likewise.
2311 (truthvalue_true_node): Likewise.
2312 (truthvalue_false_node): Likewise.
2313 (char_array_type_node): Likewise.
2314 (char8_array_type_node): Likewise.
2315 (char16_array_type_node): Likewise.
2316 (char32_array_type_node): Likewise.
2317 (wchar_array_type_node): Likewise.
2318 (string_type_node): Likewise.
2319 (const_string_type_node): Likewise.
2320 (default_function_type): Likewise.
2321 (function_name_decl_node): Likewise.
2322 (pretty_function_name_decl_node): Likewise.
2323 (c99_function_name_decl_node): Likewise.
2324 (saved_function_name_decls): Likewise.
2325 (null_node): Likewise.
2326 (ctor_identifier): Likewise.
2327 (complete_ctor_identifier): Likewise.
2328 (base_ctor_identifier): Likewise.
2329 (dtor_identifier): Likewise.
2330 (complete_dtor_identifier): Likewise.
2331 (base_dtor_identifier): Likewise.
2332 (deleting_dtor_identifier): Likewise.
2333 (conv_op_identifier): Likewise.
2334 (delta_identifier): Likewise.
2335 (in_charge_identifier): Likewise.
2336 (vtt_parm_identifier): Likewise.
2337 (as_base_identifier): Likewise.
2338 (this_identifier): Likewise.
2339 (pfn_identifier): Likewise.
2340 (vptr_identifier): Likewise.
2341 (global_identifier): Likewise.
2342 (anon_identifier): Likewise.
2343 (auto_identifier): Likewise.
2344 (decltype_auto_identifier): Likewise.
2345 (init_list_identifier): Likewise.
2346 (for_range__identifier): Likewise.
2347 (for_begin__identifier): Likewise.
2348 (for_end__identifier): Likewise.
2349 (for_range_identifier): Likewise.
2350 (for_begin_identifier): Likewise.
2351 (for_end_identifier): Likewise.
2352 (abi_tag_identifier): Likewise.
2353 (aligned_identifier): Likewise.
2354 (begin_identifier): Likewise.
2355 (end_identifier): Likewise.
2356 (get__identifier): Likewise.
2357 (gnu_identifier): Likewise.
2358 (tuple_element_identifier): Likewise.
2359 (tuple_size_identifier): Likewise.
2360 (type_identifier): Likewise.
2361 (value_identifier): Likewise.
2362 (fun_identifier): Likewise.
2363 (closure_identifier): Likewise.
2364 (heap_uninit_identifier): Likewise.
2365 (heap_identifier): Likewise.
2366 (heap_deleted_identifier): Likewise.
2367 (heap_vec_uninit_identifier): Likewise.
2368 (heap_vec_identifier): Likewise.
2369 (omp_identifier): Likewise.
2370 (lang_name_c): Likewise.
2371 (lang_name_cplusplus): Likewise.
2372 (empty_except_spec): Likewise.
2373 (noexcept_true_spec): Likewise.
2374 (noexcept_false_spec): Likewise.
2375 (noexcept_deferred_spec): Likewise.
2376 (terminate_fn): Likewise.
2377 (call_unexpected_fn): Likewise.
2378 (get_exception_ptr_fn): Likewise.
2379 (begin_catch_fn): Likewise.
2380 (end_catch_fn): Likewise.
2381 (allocate_exception_fn): Likewise.
2382 (free_exception_fn): Likewise.
2383 (throw_fn): Likewise.
2384 (rethrow_fn): Likewise.
2385 (atexit_fn_ptr_type_node): Likewise.
2386 (atexit_node): Likewise.
2387 (dso_handle_node): Likewise.
2388 (dynamic_cast_node): Likewise.
2389 (cleanup_type): Likewise.
2390 (vtt_parm_type): Likewise.
2391 (any_targ_node): Likewise.
2392 (source_location_impl): Likewise.
2393 (OVL_FUNCTION): Likewise.
2394 (OVL_CHAIN): Likewise.
2395 (OVL_DEDUP_P): Likewise.
2396 (OVL_USING_P): Likewise.
2397 (OVL_HIDDEN_P): Likewise.
2398 (OVL_NESTED_P): Likewise.
2399 (OVL_LOOKUP_P): Likewise.
2400 (OVL_EXPORT_P): Likewise.
2401 (OVL_FIRST): Likewise.
2402 (OVL_NAME): Likewise.
2404 (OVL_SINGLE_P): Likewise.
2405 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
2406 (CLASSTYPE_LAZY_DEFAULT_CTOR): Likewise.
2407 (CLASSTYPE_CONSTRUCTORS): Likewise.
2408 (ATTR_IS_DEPENDENT): Likewise.
2409 (ABI_TAG_IMPLICIT): Likewise.
2410 (PARENTHESIZED_LIST_P): Likewise.
2411 (DECL_DEPENDENT_P): Likewise.
2412 (USING_DECL_SCOPE): Likewise.
2413 (USING_DECL_DECLS): Likewise.
2414 (USING_DECL_TYPENAME_P): Likewise.
2415 (USING_DECL_UNRELATED_P): Likewise.
2416 (DECL_DECLARES_FUNCTION_P): Likewise.
2417 (DECL_DECLARES_TYPE_P): Likewise.
2418 (IDENTIFIER_KIND_BIT_0): Likewise.
2419 (IDENTIFIER_KIND_BIT_1): Likewise.
2420 (IDENTIFIER_KIND_BIT_2): Likewise.
2421 (IDENTIFIER_MARKED): Likewise.
2422 (IDENTIFIER_VIRTUAL_P): Likewise.
2423 (IDENTIFIER_KEYWORD_P): Likewise.
2424 (IDENTIFIER_CDTOR_P): Likewise.
2425 (IDENTIFIER_CTOR_P): Likewise.
2426 (IDENTIFIER_DTOR_P): Likewise.
2427 (IDENTIFIER_ANY_OP_P): Likewise.
2428 (IDENTIFIER_OVL_OP_P): Likewise.
2429 (IDENTIFIER_ASSIGN_OP_P): Likewise.
2430 (IDENTIFIER_CONV_OP_P): Likewise.
2431 (IDENTIFIER_NEWDEL_OP_P): Likewise.
2432 (IDENTIFIER_NEW_OP_P): Likewise.
2433 (CLASSTYPE_DIAMOND_SHAPED_P): Likewise.
2434 (CLASSTYPE_REPEATED_BASE_P): Likewise.
2435 (CLASSTYPE_KEY_METHOD): Likewise.
2436 (CLASSTYPE_MEMBER_VEC): Likewise.
2437 (CLASSTYPE_DECL_LIST): Likewise.
2438 (CLASSTYPE_DESTRUCTOR): Likewise.
2439 (CLASSTYPE_HAS_PRIMARY_BASE_P): Likewise.
2440 (CLASSTYPE_PRIMARY_BINFO): Likewise.
2441 (CLASSTYPE_VBASECLASSES): Likewise.
2442 (CLASSTYPE_AS_BASE): Likewise.
2443 (DECL_CONV_FN_P): Likewise.
2444 (DECL_CONV_FN_TYPE): Likewise.
2445 (same_type_p): Likewise.
2446 (WILDCARD_TYPE_P): Likewise.
2447 (MAYBE_CLASS_TYPE_P): Likewise.
2448 (FUNCTION_REF_QUALIFIED): Likewise.
2449 (FUNCTION_RVALUE_QUALIFIED): Likewise.
2450 (TYPE_PTRMEMFUNC_FN_TYPE): Likewise.
2451 (TYPE_PTRMEMFUNC_FN_TYPE_RAW): Likewise.
2452 (TYPE_DEPENDENT_P): Likewise.
2453 (TYPE_DEPENDENT_P_VALID): Likewise.
2454 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
2455 (TYPE_RAISES_EXCEPTIONS): Likewise.
2456 (IDENTIFIER_BINDING): Likewise.
2457 (LANG_IDENTIFIER_CAST): Likewise.
2458 (IF_COND): Likewise.
2459 (THEN_CLAUSE): Likewise.
2460 (ELSE_CLAUSE): Likewise.
2461 (IF_SCOPE): Likewise.
2462 (IF_STMT_CONSTEXPR_P): Likewise.
2463 (IF_STMT_CONSTEVAL_P): Likewise.
2464 (DECLTYPE_TYPE_EXPR): Likewise.
2465 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
2466 (CLASSTYPE_INTERFACE_ONLY): Likewise.
2467 (TYPE_NAME_STRING): Likewise.
2468 (TYPE_NAME_LENGTH): Likewise.
2469 (CONSTRAINT_VAR_P): Likewise.
2470 (KOENIG_LOOKUP_P): Likewise.
2471 (DECL_PARM_INDEX): Likewise.
2472 (DECL_PARM_LEVEL): Likewise.
2473 (CONV_IMPLICIT): Likewise.
2474 (CONV_STATIC): Likewise.
2475 (CONV_CONST): Likewise.
2476 (CONV_REINTERPRET): Likewise.
2477 (CONV_PRIVATE): Likewise.
2478 (CONV_FORCE_TEMP): Likewise.
2479 (CONV_FOLD): Likewise.
2480 (CONV_OLD_CONVERT): Likewise.
2481 (CONV_C_CAST): Likewise.
2482 (CONV_BACKEND_CONVERT): Likewise.
2483 (WANT_INT): Likewise.
2484 (WANT_FLOAT): Likewise.
2485 (WANT_ENUM): Likewise.
2486 (WANT_POINTER): Likewise.
2487 (WANT_NULL): Likewise.
2488 (WANT_VECTOR_OR_COMPLEX): Likewise.
2489 (WANT_ARITH): Likewise.
2490 (COMPARE_STRICT): Likewise.
2491 (COMPARE_BASE): Likewise.
2492 (COMPARE_DERIVED): Likewise.
2493 (COMPARE_REDECLARATION): Likewise.
2494 (COMPARE_STRUCTURAL): Likewise.
2495 (SF_DEFAULT): Likewise.
2496 (SF_PRE_PARSED): Likewise.
2497 (SF_INCLASS_INLINE): Likewise.
2498 (SD_UNINITIALIZED): Likewise.
2499 (SD_INITIALIZED): Likewise.
2500 (SD_DECOMPOSITION): Likewise.
2501 (SD_DEFAULTED): Likewise.
2502 (SD_DELETED): Likewise.
2503 (TYPE_PTRDATAMEM_P): Likewise.
2504 (RS_TYPE_CONST_P): Likewise.
2505 (TYPE_MAIN_DECL): Likewise.
2506 (DECL_NONTRIVIALLY_INITIALIZED_P): Likewise.
2507 (DECL_DEFAULTED_FN): Likewise.
2508 (TYPE_HAS_USER_CONSTRUCTOR): Likewise.
2509 (DECL_INITIALIZED_IN_CLASS_P): Likewise.
2510 (DECL_DEFAULTED_IN_CLASS_P): Likewise.
2511 (DECL_NONSTATIC_MEMBER_FUNCTION_P): Likewise.
2512 (DECL_HAS_IN_CHARGE_PARM_P): Likewise.
2513 (DECL_HAS_VTT_PARM_P): Likewise.
2514 (FUNCTION_FIRST_USER_PARMTYPE): Likewise.
2515 (FUNCTION_FIRST_USER_PARM): Likewise.
2516 (DECL_CONSTRUCTOR_P): Likewise.
2517 (DECL_DELETED_FN): Likewise.
2518 (BRACE_ENCLOSED_INITIALIZER_P): Likewise.
2519 (DECL_IMMEDIATE_FUNCTION_P): Likewise.
2520 (SET_DECL_IMMEDIATE_FUNCTION_P): Likewise.
2521 (CONSTRUCTOR_MUTABLE_POISON): Likewise.
2522 (PTRMEM_CST_MEMBER): Likewise.
2523 (REF_PARENTHESIZED_P): Likewise.
2524 (TYPE_PTRMEM_P): Likewise.
2525 (TYPE_PTR_OR_PTRMEM_P): Likewise.
2526 (DECL_DECOMPOSITION_P): Likewise.
2527 (DECL_DECOMP_BASE): Likewise.
2528 (DECL_MAYBE_IN_CHARGE_CDTOR_P): Likewise.
2529 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
2530 (DECL_CLONED_FUNCTION_P): Likewise.
2531 (DECL_CLONED_FUNCTION): Likewise.
2532 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
2533 (cp_function_chain): Likewise.
2534 (cdtor_label): Likewise.
2535 (current_class_ptr): Likewise.
2536 (current_class_ref): Likewise.
2537 (current_eh_spec_block): Likewise.
2538 (current_in_charge_parm): Likewise.
2539 (current_vtt_parm): Likewise.
2540 (current_retval_sentinel): Likewise.
2541 (current_function_returns_value): Likewise.
2542 (current_function_returns_null): Likewise.
2543 (current_function_returns_abnormally): Likewise.
2544 (current_function_infinite_loop): Likewise.
2545 (in_base_initializer): Likewise.
2546 (in_function_try_handler): Likewise.
2547 (current_function_return_value): Likewise.
2548 (current_class_type): Likewise.
2549 (TYPE_BEING_DEFINED): Likewise.
2550 (DECL_STATIC_FUNCTION_P): Likewise.
2551 (DECL_FUNCTION_MEMBER_P): Likewise.
2552 (LANG_DECL_MIN_CHECK): Likewise.
2553 (LANG_DECL_FN_CHECK): Likewise.
2554 (LANG_DECL_NS_CHECK): Likewise.
2555 (LANG_DECL_PARM_CHECK): Likewise.
2556 (LANG_DECL_DECOMP_CHECK): Likewise.
2557 (RS_INTEGRAL_TYPE_P): Likewise.
2558 (STAT_HACK_P): Likewise.
2559 (STAT_TYPE_VISIBLE_P): Likewise.
2560 (STAT_TYPE): Likewise.
2561 (STAT_DECL): Likewise.
2562 (STAT_VISIBLE): Likewise.
2563 (MAYBE_STAT_DECL): Likewise.
2564 (MAYBE_STAT_TYPE): Likewise.
2565 (STAT_TYPE_HIDDEN_P): Likewise.
2566 (STAT_DECL_HIDDEN_P): Likewise.
2567 (class warning_sentinel): Likewise.
2568 (struct uid_sensitive_constexpr_evaluation_checker): Likewise.
2569 (class iloc_sentinel): Likewise.
2570 (struct GTY): Likewise.
2571 (struct named_decl_hash): Likewise.
2572 (enum lang_decl_selector): Likewise.
2573 (LANG_DECL_HAS_MIN): Likewise.
2574 (struct named_label_entry): Likewise.
2575 (struct named_label_hash): Likewise.
2576 (enum ref_operator): Likewise.
2577 (struct c_fileinfo): Likewise.
2578 (class ovl_iterator): Likewise.
2579 (class lkp_iterator): Likewise.
2580 (enum rs_ref_qualifier): Likewise.
2581 (enum tsubst_flags): Likewise.
2582 (enum cp_identifier_kind): Likewise.
2583 (enum tag_types): Likewise.
2584 (enum compare_bounds_t): Likewise.
2585 (mark_rvalue_use): Likewise.
2586 (type_unknown_p): Likewise.
2587 (init_modules): Likewise.
2588 (var_in_constexpr_fn): Likewise.
2589 (ovl_first): Likewise.
2590 (lookup_add): Likewise.
2591 (ovl_make): Likewise.
2592 (is_overloaded_fn): Likewise.
2593 (maybe_add_lang_type_raw): Likewise.
2594 (type_memfn_rqual): Likewise.
2595 (builtin_pack_fn_p): Likewise.
2596 (make_conv_op_name): Likewise.
2597 (type_memfn_quals): Likewise.
2598 (get_fileinfo): Likewise.
2599 (cxx_make_type): Likewise.
2600 (build_cplus_array_type): Likewise.
2601 (is_byte_access_type): Likewise.
2602 (comptypes): Likewise.
2603 (canonical_eh_spec): Likewise.
2604 (cp_tree_operand_length): Likewise.
2605 (rs_tree_equal): Likewise.
2606 (compparms): Likewise.
2607 (rs_build_qualified_type_real): Likewise.
2608 (rs_build_qualified_type): Likewise.
2609 (cv_qualified_p): Likewise.
2610 (similar_type_p): Likewise.
2611 (vector_targets_convertible_p): Likewise.
2612 (same_type_ignoring_top_level_qualifiers_p): Likewise.
2613 (comp_ptr_ttypes_const): Likewise.
2614 (get_class_binding_direct): Likewise.
2615 (skip_artificial_parms_for): Likewise.
2616 (lang_check_failed): Likewise.
2617 (default_init_uninitialized_part): Likewise.
2618 (type_has_non_user_provided_default_constructor): Likewise.
2619 (default_ctor_p): Likewise.
2620 (user_provided_p): Likewise.
2621 (sufficient_parms_p): Likewise.
2622 (next_initializable_field): Likewise.
2623 (in_class_defaulted_default_constructor): Likewise.
2624 (is_instantiation_of_constexpr): Likewise.
2625 (check_for_uninitialized_const_var): Likewise.
2626 (reduced_constant_expression_p): Likewise.
2627 (cv_unqualified): Likewise.
2628 (cp_get_callee): Likewise.
2629 (cp_get_callee_fndecl_nofold): Likewise.
2630 (is_nondependent_static_init_expression): Likewise.
2631 (maybe_constant_init): Likewise.
2632 (build_nop): Likewise.
2633 (scalarish_type_p): Likewise.
2634 (is_bitfield_expr_with_lowered_type): Likewise.
2635 (convert_bitfield_to_declared_type): Likewise.
2636 (cp_fold_maybe_rvalue): Likewise.
2637 (maybe_undo_parenthesized_ref): Likewise.
2638 (fold_offsetof): Likewise.
2639 (cp_truthvalue_conversion): Likewise.
2640 (fold_non_dependent_expr): Likewise.
2641 (char_type_p): Likewise.
2642 (instantiation_dependent_expression_p): Likewise.
2643 (type_has_nontrivial_copy_init): Likewise.
2644 (build_local_temp): Likewise.
2645 (is_normal_capture_proxy): Likewise.
2646 (reject_gcc_builtin): Likewise.
2647 (resolve_nondeduced_context): Likewise.
2648 (cxx_incomplete_type_diagnostic): Likewise.
2649 (cxx_incomplete_type_error): Likewise.
2650 (invalid_nonstatic_memfn_p): Likewise.
2651 (really_overloaded_fn): Likewise.
2652 (resolve_nondeduced_context_or_error): Likewise.
2653 (instantiate_non_dependent_or_null): Likewise.
2654 (cxx_incomplete_type_inform): Likewise.
2655 (strip_top_quals): Likewise.
2656 (undeduced_auto_decl): Likewise.
2657 (require_deduced_type): Likewise.
2658 (decl_constant_var_p): Likewise.
2659 (type_of_this_parm): Likewise.
2660 (class_of_this_parm): Likewise.
2661 (identifier_p): Likewise.
2662 (gnu_vector_type_p): Likewise.
2663 (make_tree_vector): Likewise.
2664 (release_tree_vector): Likewise.
2665 (class releasing_vec): Likewise.
2666 (vec_safe_push): Likewise.
2667 (null_node_p): Likewise.
2668 * backend/rust-compile-base.cc (HIRCompileBase::setup_fndecl): Correctly
2669 set fndecl as constexpr from qualifiers.
2670 (HIRCompileBase::compile_function): Test if fndecl is constexpr.
2671 (HIRCompileBase::compile_constant_item): Set fndecl as constexpr.
2672 * backend/rust-compile-intrinsic.cc : Update include.
2673 (finalize_intrinsic_block): Set fndecl as constexpr.
2674 * backend/rust-constexpr.cc : Update include.
2675 (VERIFY_CONSTANT): New.
2676 (is_instantiation_of_constexpr): New.
2677 (literal_type_p): New.
2678 (verify_constant): New.
2679 (find_array_ctor_elt): New.
2680 (array_index_cmp): New.
2681 (potential_constant_expression_1): New.
2682 (get_nth_callarg): New.
2683 (unshare_constructor): New.
2684 (maybe_save_constexpr_fundef): New.
2689 (struct constexpr_global_ctx): Add new fields.
2690 (constexpr_fundef): New.
2691 (struct constexpr_call): New.
2692 (constexpr_call_hasher : ggc_ptr_hash<constexpr_call>): New.
2693 (enum constexpr_switch_state): New.
2694 (struct constexpr_ctx): Add new fields.
2695 (struct constexpr_fundef_hasher): New.
2696 (constexpr_fundef_table): New.
2697 (constexpr_fundef_hasher::equal): New.
2698 (constexpr_fundef_hasher::hash): New.
2699 (retrieve_constexpr_fundef): New.
2700 (uid_sensitive_constexpr_evaluation_value): New.
2701 (uid_sensitive_constexpr_evaluation_true_counter): New.
2702 (uid_sensitive_constexpr_evaluation_p): New.
2703 (class temp_override): New.
2704 (struct uid_sensitive_constexpr_evaluation_sentinel): New.
2705 (struct uid_sensitive_constexpr_evaluation_checker): New.
2706 (::uid_sensitive_constexpr_evaluation_sentinel): New.
2707 (::uid_sensitive_constexpr_evaluation_checker): New.
2708 (uid_sensitive_constexpr_evaluation_checker::evaluation_restricted_p): New.
2709 (constexpr_call_table): New.
2710 (constexpr_call_hasher::hash): New.
2711 (constexpr_call_hasher::equal): New.
2712 (maybe_initialize_constexpr_call_table): New.
2713 (fundef_copies_table): New.
2714 (get_fundef_copy): New.
2715 (save_fundef_copy): New.
2716 (constexpr_expression): Refactor in ...
2717 (eval_constant_expression): ...this.
2718 (eval_store_expression): Add 3 bool params.
2719 (eval_call_expression): Likewise.
2720 (eval_binary_expression): Likewise.
2721 (eval_statement_list): New.
2722 (extract_string_elt): New.
2723 (eval_conditional_expression): New.
2724 (eval_bit_field_ref): New.
2725 (eval_loop_expr): New.
2726 (eval_switch_expr): New.
2727 (eval_unary_expression): New.
2729 (call_stack_tick): New.
2730 (last_cx_error_tick): New.
2731 (push_cx_call_context): New.
2732 (pop_cx_call_context): New.
2733 (cx_error_context): New.
2734 (fold_expr): Adjust call to eval_constant_expression.
2735 (same_type_ignoring_tlq_and_bounds_p): New.
2736 (union_active_member): Port more for cxx constexpr.
2737 (fold_indirect_ref_1): New.
2738 (rs_fold_indirect_ref): Likewise.
2739 (rs_eval_indirect_ref): New (from corresponding cxx FE file).
2740 (eval_logical_expression): Adjust parameter list.
2741 (lookup_placeholder): New (from corresponding cxx FE file).
2742 (constant_value_1): Remove.
2743 (inline_asm_in_constexpr_error): New (from corresponding cxx FE file).
2744 (verify_ctor_sanity): New.
2745 (get_callee): Remove.
2746 (initialized_type): New.
2747 (maybe_constexpr_fn): Remove.
2748 (init_subob_ctx): New.
2749 (base_field_constructor_elt): New.
2750 (get_or_insert_ctor_field): New.
2751 (eval_vector_conditional_expression): New (from correponding cxx FE file).
2752 (eval_bare_aggregate): New.
2753 (cxx_eval_trinary_expression): New.
2754 (reduced_constant_expression_p): New.
2755 (adjust_temp_type): New.
2756 (free_constructor): New.
2757 (eval_and_check_array_index): New.
2758 (eval_array_reference): New.
2759 (eval_component_reference): New.
2760 (label_matches): New.
2761 (eval_constant_expression): New.
2762 (modifying_const_object_error): New.
2763 (is_empty_field): New.
2764 (eval_store_expression): New.
2765 (eval_binary_expression): New.
2766 (addr_of_non_const_var): New.
2767 (rs_bind_parameters_in_call): New.
2768 (eval_builtin_function_call): New.
2769 (eval_call_expression): New.
2770 (build_anon_member_initialization): New.
2771 (build_data_member_initialization): New.
2772 (constexpr_fn_retval): New.
2773 (constant_value_1): New.
2774 (decl_constant_value): New.
2775 (non_const_var_error): New.
2777 (get_function_named_in_call): New.
2778 (maybe_constexpr_fn): New.
2779 (get_nth_callarg): New.
2780 (var_in_maybe_constexpr_fn): New.
2781 (instantiate_cx_fn_r): New.
2782 (instantiate_constexpr_fns): New.
2783 (array_index_cmp): New.
2784 (unshare_constructor): New.
2785 (find_array_ctor_elt): New.
2786 (verify_constant): New.
2787 (find_heap_var_refs): New.
2788 (find_immediate_fndecl): New.
2789 (diag_array_subscript): New.
2790 (get_array_or_vector_nelts): New.
2791 (eval_and_check_array_index): New.
2792 (extract_string_elt): New.
2793 (is_valid_constexpr_fn): New.
2794 (explain_invalid_constexpr_fn): New.
2795 (register_constexpr_fundef): New.
2796 (maybe_save_constexpr_fundef): New.
2797 (eval_statement_list): New.
2798 (eval_conditional_expression): New.
2799 (eval_bit_field_ref): New.
2804 (eval_loop_expr): New.
2805 (eval_switch_expr): New.
2806 (eval_unary_expression): New.
2807 (cxx_eval_outermost_constant_expr): New.
2808 (is_static_init_expression): New.
2809 (is_constant_expression): New.
2810 (is_nondependent_static_init_expression): New.
2811 (maybe_constant_init_1): New.
2812 (maybe_constant_init): New.
2813 (is_nondependent_constant_expression): New.
2815 (maybe_constant_value): New.
2816 (potential_constant_expression): New.
2817 (struct check_for_return_continue_data): New.
2818 (check_for_return_continue): New.
2819 (decl_namespace_context): New.
2820 (decl_in_std_namespace_p): New.
2821 (is_std_construct_at): New.
2822 (cxx_dynamic_cast_fn_p): New.
2823 (is_std_allocator_allocate): New.
2824 (is_std_allocator_allocate): New.
2825 (potential_constant_expression_1): New.
2826 (potential_constant_expression_1): New.
2827 (fold_non_dependent_init): New.
2828 * backend/rust-constexpr.h (maybe_save_constexpr_fundef): New.
2830 2023-01-31 Arthur Cohen <arthur.cohen@embecosm.com>
2832 * rust-session-manager.cc (Session::compile_crate): Allow the dump of prettified AST
2833 (Session::dump_ast_pretty): New
2834 * rust-session-manager.h: Add new output file for pretty AST dump
2836 2023-01-05 David Malcolm <dmalcolm@redhat.com>
2838 * resolve/rust-ast-resolve-item.cc (selftest::rust_flatten_list):
2839 Remove output to stderr.
2841 2023-01-05 David Malcolm <dmalcolm@redhat.com>
2843 * Make-lang.in (selftest-rust-gdb): New.
2844 (selftest-rust-valgrind): New.
2846 2022-12-20 Marc Poulhiès <dkm@kataplop.net>
2849 * Make-lang.in (rust.serial): New variable.
2850 (rust1$(exeext)): Depend on $(rust.prev). Call LINK_PROGRESS.
2852 2022-12-14 Jakub Jelinek <jakub@redhat.com>
2855 * parse/rust-parse-impl.h (parse_closure_param): Store
2856 pattern->get_locus () in a temporary before std::move (pattern) is
2859 2022-12-13 Philip Herron <philip.herron@embecosm.com>
2861 * CONTRIBUTING.md: New.
2865 2022-12-13 Philip Herron <philip.herron@embecosm.com>
2867 * config-lang.in: New.
2869 2022-12-13 Arthur Cohen <arthur.cohen@embecosm.com>
2871 * lang.opt (-frust-incomplete-and-experimental-compiler-do-not-use):
2873 * rust-session-manager.cc (Session::compile_crate): Check it.
2874 * Make-lang.in (RUST_SELFTEST_FLAGS): Add it.
2876 2022-12-13 Philip Herron <philip.herron@embecosm.com>
2878 * Make-lang.in: New.
2880 2022-12-13 Philip Herron <philip.herron@embecosm.com>
2884 2022-12-13 Philip Herron <philip.herron@embecosm.com>
2886 * lang-specs.h: New.
2888 2022-12-13 Philip Herron <philip.herron@embecosm.com>
2890 * rust-lang.cc: New.
2891 * rust-session-manager.cc: New.
2892 * rust-session-manager.h: New.
2894 2022-12-13 Philip Herron <philip.herron@embecosm.com>
2898 2022-12-13 Philip Herron <philip.herron@embecosm.com>
2900 * rust-diagnostics.cc: New.
2901 * rust-diagnostics.h: New.
2902 * rust-gcc-diagnostics.cc: New.
2903 * rust-linemap.cc: New.
2904 * rust-linemap.h: New.
2905 * rust-location.h: New.
2906 * rust-system.h: New.
2908 2022-12-13 Philip Herron <philip.herron@embecosm.com>
2909 David Faust <david.faust@oracle.com>
2910 Faisal Abbas <90.abbasfaisal@gmail.com>
2912 * backend/rust-compile-context.cc: New.
2913 * backend/rust-compile-context.h: New.
2914 * backend/rust-compile.cc: New.
2915 * backend/rust-compile.h: New.
2916 * backend/rust-constexpr.cc: New.
2917 * backend/rust-constexpr.h: New.
2919 2022-12-13 Philip Herron <philip.herron@embecosm.com>
2920 David Faust <david.faust@oracle.com>
2922 * backend/rust-compile-block.cc: New.
2923 * backend/rust-compile-block.h: New.
2924 * backend/rust-compile-expr.cc: New.
2925 * backend/rust-compile-expr.h: New.
2926 * backend/rust-compile-extern.h: New.
2927 * backend/rust-compile-fnparam.cc: New.
2928 * backend/rust-compile-fnparam.h: New.
2929 * backend/rust-compile-implitem.cc: New.
2930 * backend/rust-compile-implitem.h: New.
2931 * backend/rust-compile-intrinsic.cc: New.
2932 * backend/rust-compile-intrinsic.h: New.
2933 * backend/rust-compile-item.cc: New.
2934 * backend/rust-compile-item.h: New.
2935 * backend/rust-compile-pattern.cc: New.
2936 * backend/rust-compile-pattern.h: New.
2937 * backend/rust-compile-resolve-path.cc: New.
2938 * backend/rust-compile-resolve-path.h: New.
2939 * backend/rust-compile-stmt.cc: New.
2940 * backend/rust-compile-stmt.h: New.
2941 * backend/rust-compile-struct-field-expr.cc: New.
2942 * backend/rust-compile-struct-field-expr.h: New.
2943 * backend/rust-compile-type.cc: New.
2944 * backend/rust-compile-type.h: New.
2945 * backend/rust-compile-var-decl.h: New.
2947 2022-12-13 Philip Herron <philip.herron@embecosm.com>
2948 David Faust <david.faust@oracle.com>
2950 * backend/rust-builtins.h: New.
2951 * backend/rust-compile-base.cc: New.
2952 * backend/rust-compile-base.h: New.
2953 * backend/rust-mangle.cc: New.
2954 * backend/rust-mangle.h: New.
2955 * backend/rust-tree.cc: New.
2956 * backend/rust-tree.h: New.
2957 * rust-backend.h: New.
2960 2022-12-13 Philip Herron <philip.herron@embecosm.com>
2962 * metadata/rust-export-metadata.cc: New.
2963 * metadata/rust-export-metadata.h: New.
2964 * metadata/rust-extern-crate.cc: New.
2965 * metadata/rust-extern-crate.h: New.
2966 * metadata/rust-import-archive.cc: New.
2967 * metadata/rust-imports.cc: New.
2968 * metadata/rust-imports.h: New.
2969 * rust-object-export.cc: New.
2970 * rust-object-export.h: New.
2972 2022-12-13 Philip Herron <philip.herron@embecosm.com>
2974 * checks/lints/rust-lint-unused-var.cc: New.
2975 * checks/lints/rust-lint-unused-var.h: New.
2977 2022-12-13 Thomas Young <wenzhang5800@gmail.com>
2979 * checks/lints/rust-lint-marklive-base.h: New.
2980 * checks/lints/rust-lint-marklive.cc: New.
2981 * checks/lints/rust-lint-marklive.h: New.
2982 * checks/lints/rust-lint-scan-deadcode.h: New.
2984 2022-12-13 Arthur Cohen <arthur.cohen@embecosm.com>
2986 * checks/errors/privacy/rust-privacy-check.cc: New.
2987 * checks/errors/privacy/rust-privacy-check.h: New.
2988 * checks/errors/privacy/rust-privacy-common.h: New.
2989 * checks/errors/privacy/rust-privacy-ctx.cc: New.
2990 * checks/errors/privacy/rust-privacy-ctx.h: New.
2991 * checks/errors/privacy/rust-privacy-reporter.cc: New.
2992 * checks/errors/privacy/rust-privacy-reporter.h: New.
2993 * checks/errors/privacy/rust-pub-restricted-visitor.cc: New.
2994 * checks/errors/privacy/rust-pub-restricted-visitor.h: New.
2995 * checks/errors/privacy/rust-reachability.cc: New.
2996 * checks/errors/privacy/rust-reachability.h: New.
2997 * checks/errors/privacy/rust-visibility-resolver.cc: New.
2998 * checks/errors/privacy/rust-visibility-resolver.h: New.
3000 2022-12-13 Arthur Cohen <arthur.cohen@embecosm.com>
3002 * checks/errors/rust-const-checker.cc: New.
3003 * checks/errors/rust-const-checker.h: New.
3005 2022-12-13 Arthur Cohen <arthur.cohen@embecosm.com>
3007 * checks/errors/rust-unsafe-checker.cc: New.
3008 * checks/errors/rust-unsafe-checker.h: New.
3010 2022-12-13 Philip Herron <philip.herron@embecosm.com>
3012 * typecheck/rust-autoderef.cc: New.
3013 * typecheck/rust-autoderef.h: New.
3014 * typecheck/rust-casts.cc: New.
3015 * typecheck/rust-casts.h: New.
3016 * typecheck/rust-coercion.cc: New.
3017 * typecheck/rust-coercion.h: New.
3018 * typecheck/rust-hir-dot-operator.cc: New.
3019 * typecheck/rust-hir-dot-operator.h: New.
3020 * typecheck/rust-hir-inherent-impl-overlap.h: New.
3021 * typecheck/rust-hir-path-probe.h: New.
3022 * typecheck/rust-hir-trait-ref.h: New.
3023 * typecheck/rust-hir-type-bounds.h: New.
3024 * typecheck/rust-substitution-mapper.cc: New.
3025 * typecheck/rust-substitution-mapper.h: New.
3026 * typecheck/rust-tycheck-dump.h: New.
3027 * typecheck/rust-tyctx.cc: New.
3028 * typecheck/rust-tyty-bounds.cc: New.
3029 * typecheck/rust-tyty-call.cc: New.
3030 * typecheck/rust-tyty-call.h: New.
3031 * typecheck/rust-tyty-cmp.h: New.
3032 * typecheck/rust-tyty-rules.h: New.
3034 2022-12-13 Philip Herron <philip.herron@embecosm.com>
3036 * typecheck/rust-tyty.cc: New.
3037 * typecheck/rust-tyty.h: New.
3039 2022-12-13 Philip Herron <philip.herron@embecosm.com>
3041 * typecheck/rust-hir-trait-resolve.cc: New.
3042 * typecheck/rust-hir-trait-resolve.h: New.
3043 * typecheck/rust-hir-type-check-base.cc: New.
3044 * typecheck/rust-hir-type-check-base.h: New.
3045 * typecheck/rust-hir-type-check-enumitem.cc: New.
3046 * typecheck/rust-hir-type-check-enumitem.h: New.
3047 * typecheck/rust-hir-type-check-expr.cc: New.
3048 * typecheck/rust-hir-type-check-expr.h: New.
3049 * typecheck/rust-hir-type-check-implitem.cc: New.
3050 * typecheck/rust-hir-type-check-implitem.h: New.
3051 * typecheck/rust-hir-type-check-item.cc: New.
3052 * typecheck/rust-hir-type-check-item.h: New.
3053 * typecheck/rust-hir-type-check-path.cc: New.
3054 * typecheck/rust-hir-type-check-pattern.cc: New.
3055 * typecheck/rust-hir-type-check-pattern.h: New.
3056 * typecheck/rust-hir-type-check-stmt.cc: New.
3057 * typecheck/rust-hir-type-check-stmt.h: New.
3058 * typecheck/rust-hir-type-check-struct-field.h: New.
3059 * typecheck/rust-hir-type-check-struct.cc: New.
3060 * typecheck/rust-hir-type-check-toplevel.cc: New.
3061 * typecheck/rust-hir-type-check-toplevel.h: New.
3062 * typecheck/rust-hir-type-check-type.cc: New.
3063 * typecheck/rust-hir-type-check-type.h: New.
3064 * typecheck/rust-hir-type-check-util.cc: New.
3065 * typecheck/rust-hir-type-check-util.h: New.
3066 * typecheck/rust-hir-type-check.cc: New.
3067 * typecheck/rust-hir-type-check.h: New.
3068 * typecheck/rust-tyty-visitor.h: New.
3070 2022-12-13 Philip Herron <philip.herron@embecosm.com>
3072 * util/rust-canonical-path.h: New.
3073 * util/rust-common.h: New.
3074 * util/rust-hir-map.cc: New.
3075 * util/rust-hir-map.h: New.
3076 * util/rust-identifier.h: New.
3077 * util/rust-lang-item.h: New.
3078 * util/rust-mapping-common.h: New.
3079 * util/rust-stacked-contexts.h: New.
3081 2022-12-13 Arthur Cohen <arthur.cohen@embecosm.com>
3083 * util/rust-attributes.cc: New.
3084 * util/rust-attributes.h: New.
3086 2022-12-13 Arthur Cohen <arthur.cohen@embecosm.com>
3088 * util/rust-optional-test.cc: New.
3089 * util/rust-optional.h: New.
3091 2022-12-13 Arthur Cohen <arthur.cohen@embecosm.com>
3093 * util/rust-base62.cc: New.
3094 * util/rust-base62.h: New.
3096 2022-12-13 Philip Herron <philip.herron@embecosm.com>
3098 * util/rust-abi.cc: New.
3099 * util/rust-abi.h: New.
3101 2022-12-13 Philip Herron <philip.herron@embecosm.com>
3103 * util/fnv-hash.h: New.
3105 2022-12-13 Philip Herron <philip.herron@embecosm.com>
3107 * util/rust-make-unique.h: New.
3109 2022-12-13 Philip Herron <philip.herron@embecosm.com>
3111 * hir/rust-ast-lower-base.cc: New.
3112 * hir/rust-ast-lower-base.h: New.
3113 * hir/rust-ast-lower-block.h: New.
3114 * hir/rust-ast-lower-enumitem.h: New.
3115 * hir/rust-ast-lower-expr.h: New.
3116 * hir/rust-ast-lower-extern.h: New.
3117 * hir/rust-ast-lower-implitem.h: New.
3118 * hir/rust-ast-lower-item.cc: New.
3119 * hir/rust-ast-lower-item.h: New.
3120 * hir/rust-ast-lower-pattern.cc: New.
3121 * hir/rust-ast-lower-pattern.h: New.
3122 * hir/rust-ast-lower-stmt.h: New.
3123 * hir/rust-ast-lower-struct-field-expr.h: New.
3124 * hir/rust-ast-lower-type.h: New.
3125 * hir/rust-ast-lower.cc: New.
3126 * hir/rust-ast-lower.h: New.
3127 * hir/rust-hir-dump.cc: New.
3128 * hir/rust-hir-dump.h: New.
3130 2022-12-13 Philip Herron <philip.herron@embecosm.com>
3132 * hir/tree/rust-hir-full-decls.h: New.
3133 * hir/tree/rust-hir-full-test.cc: New.
3134 * hir/tree/rust-hir-full.h: New.
3135 * hir/tree/rust-hir-visitor.h: New.
3136 * hir/tree/rust-hir.h: New.
3138 2022-12-13 Philip Herron <philip.herron@embecosm.com>
3140 * hir/tree/rust-hir-expr.h: New.
3141 * hir/tree/rust-hir-item.h: New.
3142 * hir/tree/rust-hir-path.h: New.
3143 * hir/tree/rust-hir-pattern.h: New.
3144 * hir/tree/rust-hir-stmt.h: New.
3145 * hir/tree/rust-hir-type.h: New.
3147 2022-12-13 Philip Herron <philip.herron@embecosm.com>
3149 * resolve/rust-ast-resolve-base.cc: New.
3150 * resolve/rust-ast-resolve-base.h: New.
3151 * resolve/rust-ast-resolve-expr.cc: New.
3152 * resolve/rust-ast-resolve-expr.h: New.
3153 * resolve/rust-ast-resolve-implitem.h: New.
3154 * resolve/rust-ast-resolve-item.cc: New.
3155 * resolve/rust-ast-resolve-item.h: New.
3156 * resolve/rust-ast-resolve-path.cc: New.
3157 * resolve/rust-ast-resolve-path.h: New.
3158 * resolve/rust-ast-resolve-pattern.cc: New.
3159 * resolve/rust-ast-resolve-pattern.h: New.
3160 * resolve/rust-ast-resolve-stmt.cc: New.
3161 * resolve/rust-ast-resolve-stmt.h: New.
3162 * resolve/rust-ast-resolve-struct-expr-field.cc: New.
3163 * resolve/rust-ast-resolve-struct-expr-field.h: New.
3164 * resolve/rust-ast-resolve-toplevel.h: New.
3165 * resolve/rust-ast-resolve-type.cc: New.
3166 * resolve/rust-ast-resolve-type.h: New.
3167 * resolve/rust-ast-resolve.cc: New.
3168 * resolve/rust-ast-resolve.h: New.
3169 * resolve/rust-ast-verify-assignee.h: New.
3170 * resolve/rust-name-resolver.cc: New.
3171 * resolve/rust-name-resolver.h: New.
3173 2022-12-13 Arthur Cohen <arthur.cohen@embecosm.com>
3174 Philip Herron <philip.herron@embecosm.com>
3175 Joel Phillips <simplytheother@gmail.com>
3177 * expand/rust-attribute-visitor.cc: New.
3178 * expand/rust-attribute-visitor.h: New.
3179 * expand/rust-macro-builtins.cc: New.
3180 * expand/rust-macro-builtins.h: New.
3181 * expand/rust-macro-expand.cc: New.
3182 * expand/rust-macro-expand.h: New.
3183 * expand/rust-macro-invoc-lexer.cc: New.
3184 * expand/rust-macro-invoc-lexer.h: New.
3185 * expand/rust-macro-substitute-ctx.cc: New.
3186 * expand/rust-macro-substitute-ctx.h: New.
3188 2022-12-13 Joel Phillips <simplytheother@gmail.com>
3189 Philip Herron <philip.herron@embecosm.com>
3190 Arthur Cohen <arthur.cohen@embecosm.com>
3192 * parse/rust-parse-impl.h: New, second half.
3194 2022-12-13 Joel Phillips <simplytheother@gmail.com>
3195 Philip Herron <philip.herron@embecosm.com>
3196 Arthur Cohen <arthur.cohen@embecosm.com>
3198 * parse/rust-cfg-parser.cc: New.
3199 * parse/rust-cfg-parser.h: New.
3200 * parse/rust-parse-impl.h: New.
3201 * parse/rust-parse.cc: New.
3202 * parse/rust-parse.h: New.
3204 2022-12-13 Joel Phillips <simplytheother@gmail.com>
3205 Philip Herron <philip.herron@embecosm.com>
3206 Arthur Cohen <arthur.cohen@embecosm.com>
3207 Mark Wielaard <mark@klomp.org>
3209 * lex/rust-codepoint.h: New.
3210 * lex/rust-lex.cc: New.
3211 * lex/rust-lex.h: New.
3212 * lex/rust-token.cc: New.
3213 * lex/rust-token.h: New.
3214 * rust-buffered-queue.h: New.
3216 2022-12-13 Joel Phillips <simplytheother@gmail.com>
3217 Philip Herron <philip.herron@embecosm.com>
3218 Arthur Cohen <arthur.cohen@embecosm.com>
3220 * ast/rust-ast-dump.cc: New.
3221 * ast/rust-ast-dump.h: New.
3222 * ast/rust-ast-visitor.h: New.
3223 * ast/rust-cond-compilation.h: New.
3225 2022-12-13 Joel Phillips <simplytheother@gmail.com>
3226 Philip Herron <philip.herron@embecosm.com>
3228 * ast/rust-expr.h: New.
3229 * ast/rust-macro.h: New.
3230 * ast/rust-path.h: New.
3231 * ast/rust-pattern.h: New.
3232 * ast/rust-stmt.h: New.
3233 * ast/rust-type.h: New.
3235 2022-12-13 Joel Phillips <simplytheother@gmail.com>
3236 Philip Herron <philip.herron@embecosm.com>
3238 * ast/rust-item.h: New.
3240 2022-12-13 Joel Phillips <simplytheother@gmail.com>
3241 Philip Herron <philip.herron@embecosm.com>
3242 Arthur Cohen <arthur.cohen@embecosm.com>
3244 * ast/rust-ast-full-decls.h: New.
3245 * ast/rust-ast-full-test.cc: New.
3246 * ast/rust-ast-full.h: New.
3247 * ast/rust-ast.h: New.
3251 Copyright (C) 2022-2023 Free Software Foundation, Inc.
3253 Copying and distribution of this file, with or without modification,
3254 are permitted in any medium without royalty provided the copyright
3255 notice and this notice are preserved.