Support qualified trait item call expression#2097
Merged
Merged
Conversation
Calling PathProbeImplTrait resolves directly to the trait bound in question to stop resolving to potentially multiple implementations of that bound gcc/rust/ChangeLog: * backend/rust-compile-expr.cc (CompileExpr::resolve_method_address): call path probe impl trait Signed-off-by: Philip Herron <herron.philip@googlemail.com>
gcc/rust/ChangeLog: * backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile): call destructure Signed-off-by: Philip Herron <herron.philip@googlemail.com>
gcc/rust/ChangeLog: * backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile): remove unused Signed-off-by: Philip Herron <herron.philip@googlemail.com>
gcc/rust/ChangeLog: * backend/rust-compile-base.cc (HIRCompileBase::resolve_method_address): moved here * backend/rust-compile-base.h: refactored prototype * backend/rust-compile-expr.cc (CompileExpr::resolve_method_address): refactor * backend/rust-compile-expr.h: likewise Signed-off-by: Philip Herron <herron.philip@googlemail.com>
It results in a recursive generic Param cycle. gcc/rust/ChangeLog: * typecheck/rust-hir-path-probe.cc: dont subst with a dynamic object Signed-off-by: Philip Herron <herron.philip@googlemail.com>
Fixes #2070 gcc/rust/ChangeLog: * backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile): reuse resolve_method_address to monomorphize the call if required * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_segments): allow matching against unimplemented trait item bounds gcc/testsuite/ChangeLog: * rust/compile/issue-2070.rs: New test. Signed-off-by: Philip Herron <herron.philip@googlemail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2070