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