-
Notifications
You must be signed in to change notification settings - Fork 179
Pointers are coerceable #1901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Labels
Comments
This was referenced Feb 21, 2023
Closed
philberty
added a commit
that referenced
this issue
Feb 28, 2023
Rust allows us to call generic pointer methods on pointers so in non generic contexts the old code using the bad can_eq interface couldn't handle this case. So taking advantage of our new unify_and interface to try and infer when required we can start using our TryCoerce interface to reuse existing code to assemble possible candidates more acurately using the existing coercion rules. Fixes #1901 #878 Signed-off-by: Philip Herron <[email protected]> gcc/rust/ChangeLog: * typecheck/rust-coercion.cc (TypeCoercionRules::Coerce): Add new try_flag (TypeCoercionRules::TypeCoercionRules): set new try flag (TypeCoercionRules::do_coercion): default to a final unify_and in the else case (TypeCoercionRules::coerce_unsafe_ptr): cannot coerce to a ptr from ref during autoderef (TypeCoercionRules::coerce_borrowed_pointer): respect coerceable mutability * typecheck/rust-coercion.h: update header * typecheck/rust-hir-dot-operator.cc (MethodResolver::select): use new TryCoerce interface (MethodResolver::append_adjustments): ensure we maintain adjustment mappings * typecheck/rust-hir-dot-operator.h: add new method append_adjustments * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): extra logging gcc/testsuite/ChangeLog: * rust/compile/issue-1901.rs: New test.
philberty
added a commit
that referenced
this issue
Feb 28, 2023
Rust allows us to call generic pointer methods on pointers so in non generic contexts the old code using the bad can_eq interface couldn't handle this case. So taking advantage of our new unify_and interface to try and infer when required we can start using our TryCoerce interface to reuse existing code to assemble possible candidates more acurately using the existing coercion rules. Fixes #1901 #878 Signed-off-by: Philip Herron <[email protected]> gcc/rust/ChangeLog: * typecheck/rust-coercion.cc (TypeCoercionRules::Coerce): Add new try_flag (TypeCoercionRules::TypeCoercionRules): set new try flag (TypeCoercionRules::do_coercion): default to a final unify_and in the else case (TypeCoercionRules::coerce_unsafe_ptr): cannot coerce to a ptr from ref during autoderef (TypeCoercionRules::coerce_borrowed_pointer): respect coerceable mutability * typecheck/rust-coercion.h: update header * typecheck/rust-hir-dot-operator.cc (MethodResolver::select): use new TryCoerce interface (MethodResolver::append_adjustments): ensure we maintain adjustment mappings * typecheck/rust-hir-dot-operator.h: add new method append_adjustments * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): extra logging gcc/testsuite/ChangeLog: * rust/compile/issue-1901.rs: New test.
philberty
added a commit
that referenced
this issue
Feb 28, 2023
Rust allows us to call generic pointer methods on pointers so in non generic contexts the old code using the bad can_eq interface couldn't handle this case. So taking advantage of our new unify_and interface to try and infer when required we can start using our TryCoerce interface to reuse existing code to assemble possible candidates more acurately using the existing coercion rules. Fixes #1901 #878 Signed-off-by: Philip Herron <[email protected]> gcc/rust/ChangeLog: * typecheck/rust-coercion.cc (TypeCoercionRules::Coerce): Add new try_flag (TypeCoercionRules::TypeCoercionRules): set new try flag (TypeCoercionRules::do_coercion): default to a final unify_and in the else case (TypeCoercionRules::coerce_unsafe_ptr): cannot coerce to a ptr from ref during autoderef (TypeCoercionRules::coerce_borrowed_pointer): respect coerceable mutability * typecheck/rust-coercion.h: update header * typecheck/rust-hir-dot-operator.cc (MethodResolver::select): use new TryCoerce interface (MethodResolver::append_adjustments): ensure we maintain adjustment mappings * typecheck/rust-hir-dot-operator.h: add new method append_adjustments * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): extra logging gcc/testsuite/ChangeLog: * rust/compile/issue-1901.rs: New test.
TuringKi
pushed a commit
to TuringKi/gccrs
that referenced
this issue
Mar 1, 2023
Rust allows us to call generic pointer methods on pointers so in non generic contexts the old code using the bad can_eq interface couldn't handle this case. So taking advantage of our new unify_and interface to try and infer when required we can start using our TryCoerce interface to reuse existing code to assemble possible candidates more acurately using the existing coercion rules. Fixes Rust-GCC#1901 Rust-GCC#878 Signed-off-by: Philip Herron <[email protected]> gcc/rust/ChangeLog: * typecheck/rust-coercion.cc (TypeCoercionRules::Coerce): Add new try_flag (TypeCoercionRules::TypeCoercionRules): set new try flag (TypeCoercionRules::do_coercion): default to a final unify_and in the else case (TypeCoercionRules::coerce_unsafe_ptr): cannot coerce to a ptr from ref during autoderef (TypeCoercionRules::coerce_borrowed_pointer): respect coerceable mutability * typecheck/rust-coercion.h: update header * typecheck/rust-hir-dot-operator.cc (MethodResolver::select): use new TryCoerce interface (MethodResolver::append_adjustments): ensure we maintain adjustment mappings * typecheck/rust-hir-dot-operator.h: add new method append_adjustments * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): extra logging gcc/testsuite/ChangeLog: * rust/compile/issue-1901.rs: New test.
CohenArthur
pushed a commit
to CohenArthur/gccrs
that referenced
this issue
Mar 27, 2023
Rust allows us to call generic pointer methods on pointers so in non generic contexts the old code using the bad can_eq interface couldn't handle this case. So taking advantage of our new unify_and interface to try and infer when required we can start using our TryCoerce interface to reuse existing code to assemble possible candidates more acurately using the existing coercion rules. Fixes Rust-GCC#1901 Rust-GCC#878 Signed-off-by: Philip Herron <[email protected]> gcc/rust/ChangeLog: * typecheck/rust-coercion.cc (TypeCoercionRules::Coerce): Add new try_flag (TypeCoercionRules::TypeCoercionRules): set new try flag (TypeCoercionRules::do_coercion): default to a final unify_and in the else case (TypeCoercionRules::coerce_unsafe_ptr): cannot coerce to a ptr from ref during autoderef (TypeCoercionRules::coerce_borrowed_pointer): respect coerceable mutability * typecheck/rust-coercion.h: update header * typecheck/rust-hir-dot-operator.cc (MethodResolver::select): use new TryCoerce interface (MethodResolver::append_adjustments): ensure we maintain adjustment mappings * typecheck/rust-hir-dot-operator.h: add new method append_adjustments * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): extra logging gcc/testsuite/ChangeLog: * rust/compile/issue-1901.rs: New test.
CohenArthur
pushed a commit
to CohenArthur/gccrs
that referenced
this issue
Apr 6, 2023
Rust allows us to call generic pointer methods on pointers so in non generic contexts the old code using the bad can_eq interface couldn't handle this case. So taking advantage of our new unify_and interface to try and infer when required we can start using our TryCoerce interface to reuse existing code to assemble possible candidates more acurately using the existing coercion rules. Fixes Rust-GCC#1901 Rust-GCC#878 Signed-off-by: Philip Herron <[email protected]> gcc/rust/ChangeLog: * typecheck/rust-coercion.cc (TypeCoercionRules::Coerce): Add new try_flag (TypeCoercionRules::TypeCoercionRules): set new try flag (TypeCoercionRules::do_coercion): default to a final unify_and in the else case (TypeCoercionRules::coerce_unsafe_ptr): cannot coerce to a ptr from ref during autoderef (TypeCoercionRules::coerce_borrowed_pointer): respect coerceable mutability * typecheck/rust-coercion.h: update header * typecheck/rust-hir-dot-operator.cc (MethodResolver::select): use new TryCoerce interface (MethodResolver::append_adjustments): ensure we maintain adjustment mappings * typecheck/rust-hir-dot-operator.h: add new method append_adjustments * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): extra logging gcc/testsuite/ChangeLog: * rust/compile/issue-1901.rs: New test.
CohenArthur
pushed a commit
to CohenArthur/gccrs
that referenced
this issue
Apr 7, 2023
Rust allows us to call generic pointer methods on pointers so in non generic contexts the old code using the bad can_eq interface couldn't handle this case. So taking advantage of our new unify_and interface to try and infer when required we can start using our TryCoerce interface to reuse existing code to assemble possible candidates more acurately using the existing coercion rules. Fixes Rust-GCC#1901 Rust-GCC#878 Signed-off-by: Philip Herron <[email protected]> gcc/rust/ChangeLog: * typecheck/rust-coercion.cc (TypeCoercionRules::Coerce): Add new try_flag (TypeCoercionRules::TypeCoercionRules): set new try flag (TypeCoercionRules::do_coercion): default to a final unify_and in the else case (TypeCoercionRules::coerce_unsafe_ptr): cannot coerce to a ptr from ref during autoderef (TypeCoercionRules::coerce_borrowed_pointer): respect coerceable mutability * typecheck/rust-coercion.h: update header * typecheck/rust-hir-dot-operator.cc (MethodResolver::select): use new TryCoerce interface (MethodResolver::append_adjustments): ensure we maintain adjustment mappings * typecheck/rust-hir-dot-operator.h: add new method append_adjustments * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): extra logging gcc/testsuite/ChangeLog: * rust/compile/issue-1901.rs: New test.
CohenArthur
pushed a commit
to CohenArthur/gccrs
that referenced
this issue
Nov 15, 2023
Rust allows us to call generic pointer methods on pointers so in non generic contexts the old code using the bad can_eq interface couldn't handle this case. So taking advantage of our new unify_and interface to try and infer when required we can start using our TryCoerce interface to reuse existing code to assemble possible candidates more acurately using the existing coercion rules. Fixes Rust-GCC#1901 Rust-GCC#878 Signed-off-by: Philip Herron <[email protected]> gcc/rust/ChangeLog: * typecheck/rust-coercion.cc (TypeCoercionRules::Coerce): Add new try_flag (TypeCoercionRules::TypeCoercionRules): set new try flag (TypeCoercionRules::do_coercion): default to a final unify_and in the else case (TypeCoercionRules::coerce_unsafe_ptr): cannot coerce to a ptr from ref during autoderef (TypeCoercionRules::coerce_borrowed_pointer): respect coerceable mutability * typecheck/rust-coercion.h: update header * typecheck/rust-hir-dot-operator.cc (MethodResolver::select): use new TryCoerce interface (MethodResolver::append_adjustments): ensure we maintain adjustment mappings * typecheck/rust-hir-dot-operator.h: add new method append_adjustments * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): extra logging gcc/testsuite/ChangeLog: * rust/compile/issue-1901.rs: New test.
CohenArthur
pushed a commit
to CohenArthur/gccrs
that referenced
this issue
Nov 21, 2023
Rust allows us to call generic pointer methods on pointers so in non generic contexts the old code using the bad can_eq interface couldn't handle this case. So taking advantage of our new unify_and interface to try and infer when required we can start using our TryCoerce interface to reuse existing code to assemble possible candidates more acurately using the existing coercion rules. Fixes Rust-GCC#1901 Rust-GCC#878 Signed-off-by: Philip Herron <[email protected]> gcc/rust/ChangeLog: * typecheck/rust-coercion.cc (TypeCoercionRules::Coerce): Add new try_flag (TypeCoercionRules::TypeCoercionRules): set new try flag (TypeCoercionRules::do_coercion): default to a final unify_and in the else case (TypeCoercionRules::coerce_unsafe_ptr): cannot coerce to a ptr from ref during autoderef (TypeCoercionRules::coerce_borrowed_pointer): respect coerceable mutability * typecheck/rust-coercion.h: update header * typecheck/rust-hir-dot-operator.cc (MethodResolver::select): use new TryCoerce interface (MethodResolver::append_adjustments): ensure we maintain adjustment mappings * typecheck/rust-hir-dot-operator.h: add new method append_adjustments * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): extra logging gcc/testsuite/ChangeLog: * rust/compile/issue-1901.rs: New test.
CohenArthur
pushed a commit
to CohenArthur/gccrs
that referenced
this issue
Nov 21, 2023
Rust allows us to call generic pointer methods on pointers so in non generic contexts the old code using the bad can_eq interface couldn't handle this case. So taking advantage of our new unify_and interface to try and infer when required we can start using our TryCoerce interface to reuse existing code to assemble possible candidates more acurately using the existing coercion rules. Fixes Rust-GCC#1901 Rust-GCC#878 Signed-off-by: Philip Herron <[email protected]> gcc/rust/ChangeLog: * typecheck/rust-coercion.cc (TypeCoercionRules::Coerce): Add new try_flag (TypeCoercionRules::TypeCoercionRules): set new try flag (TypeCoercionRules::do_coercion): default to a final unify_and in the else case (TypeCoercionRules::coerce_unsafe_ptr): cannot coerce to a ptr from ref during autoderef (TypeCoercionRules::coerce_borrowed_pointer): respect coerceable mutability * typecheck/rust-coercion.h: update header * typecheck/rust-hir-dot-operator.cc (MethodResolver::select): use new TryCoerce interface (MethodResolver::append_adjustments): ensure we maintain adjustment mappings * typecheck/rust-hir-dot-operator.h: add new method append_adjustments * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): extra logging gcc/testsuite/ChangeLog: * rust/compile/issue-1901.rs: New test.
CohenArthur
pushed a commit
to CohenArthur/gccrs
that referenced
this issue
Jan 5, 2024
Rust allows us to call generic pointer methods on pointers so in non generic contexts the old code using the bad can_eq interface couldn't handle this case. So taking advantage of our new unify_and interface to try and infer when required we can start using our TryCoerce interface to reuse existing code to assemble possible candidates more acurately using the existing coercion rules. Fixes Rust-GCC#1901 Rust-GCC#878 Signed-off-by: Philip Herron <[email protected]> gcc/rust/ChangeLog: * typecheck/rust-coercion.cc (TypeCoercionRules::Coerce): Add new try_flag (TypeCoercionRules::TypeCoercionRules): set new try flag (TypeCoercionRules::do_coercion): default to a final unify_and in the else case (TypeCoercionRules::coerce_unsafe_ptr): cannot coerce to a ptr from ref during autoderef (TypeCoercionRules::coerce_borrowed_pointer): respect coerceable mutability * typecheck/rust-coercion.h: update header * typecheck/rust-hir-dot-operator.cc (MethodResolver::select): use new TryCoerce interface (MethodResolver::append_adjustments): ensure we maintain adjustment mappings * typecheck/rust-hir-dot-operator.h: add new method append_adjustments * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): extra logging gcc/testsuite/ChangeLog: * rust/compile/issue-1901.rs: New test.
CohenArthur
pushed a commit
to CohenArthur/gccrs
that referenced
this issue
Jan 9, 2024
Rust allows us to call generic pointer methods on pointers so in non generic contexts the old code using the bad can_eq interface couldn't handle this case. So taking advantage of our new unify_and interface to try and infer when required we can start using our TryCoerce interface to reuse existing code to assemble possible candidates more acurately using the existing coercion rules. Fixes Rust-GCC#1901 Rust-GCC#878 Signed-off-by: Philip Herron <[email protected]> gcc/rust/ChangeLog: * typecheck/rust-coercion.cc (TypeCoercionRules::Coerce): Add new try_flag (TypeCoercionRules::TypeCoercionRules): set new try flag (TypeCoercionRules::do_coercion): default to a final unify_and in the else case (TypeCoercionRules::coerce_unsafe_ptr): cannot coerce to a ptr from ref during autoderef (TypeCoercionRules::coerce_borrowed_pointer): respect coerceable mutability * typecheck/rust-coercion.h: update header * typecheck/rust-hir-dot-operator.cc (MethodResolver::select): use new TryCoerce interface (MethodResolver::append_adjustments): ensure we maintain adjustment mappings * typecheck/rust-hir-dot-operator.h: add new method append_adjustments * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): extra logging gcc/testsuite/ChangeLog: * rust/compile/issue-1901.rs: New test.
CohenArthur
pushed a commit
to CohenArthur/gccrs
that referenced
this issue
Jan 9, 2024
Rust allows us to call generic pointer methods on pointers so in non generic contexts the old code using the bad can_eq interface couldn't handle this case. So taking advantage of our new unify_and interface to try and infer when required we can start using our TryCoerce interface to reuse existing code to assemble possible candidates more acurately using the existing coercion rules. Fixes Rust-GCC#1901 Rust-GCC#878 Signed-off-by: Philip Herron <[email protected]> gcc/rust/ChangeLog: * typecheck/rust-coercion.cc (TypeCoercionRules::Coerce): Add new try_flag (TypeCoercionRules::TypeCoercionRules): set new try flag (TypeCoercionRules::do_coercion): default to a final unify_and in the else case (TypeCoercionRules::coerce_unsafe_ptr): cannot coerce to a ptr from ref during autoderef (TypeCoercionRules::coerce_borrowed_pointer): respect coerceable mutability * typecheck/rust-coercion.h: update header * typecheck/rust-hir-dot-operator.cc (MethodResolver::select): use new TryCoerce interface (MethodResolver::append_adjustments): ensure we maintain adjustment mappings * typecheck/rust-hir-dot-operator.h: add new method append_adjustments * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): extra logging gcc/testsuite/ChangeLog: * rust/compile/issue-1901.rs: New test.
CohenArthur
pushed a commit
to CohenArthur/gccrs
that referenced
this issue
Jan 11, 2024
Rust allows us to call generic pointer methods on pointers so in non generic contexts the old code using the bad can_eq interface couldn't handle this case. So taking advantage of our new unify_and interface to try and infer when required we can start using our TryCoerce interface to reuse existing code to assemble possible candidates more acurately using the existing coercion rules. Fixes Rust-GCC#1901 Rust-GCC#878 Signed-off-by: Philip Herron <[email protected]> gcc/rust/ChangeLog: * typecheck/rust-coercion.cc (TypeCoercionRules::Coerce): Add new try_flag (TypeCoercionRules::TypeCoercionRules): set new try flag (TypeCoercionRules::do_coercion): default to a final unify_and in the else case (TypeCoercionRules::coerce_unsafe_ptr): cannot coerce to a ptr from ref during autoderef (TypeCoercionRules::coerce_borrowed_pointer): respect coerceable mutability * typecheck/rust-coercion.h: update header * typecheck/rust-hir-dot-operator.cc (MethodResolver::select): use new TryCoerce interface (MethodResolver::append_adjustments): ensure we maintain adjustment mappings * typecheck/rust-hir-dot-operator.h: add new method append_adjustments * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): extra logging gcc/testsuite/ChangeLog: * rust/compile/issue-1901.rs: New test.
CohenArthur
pushed a commit
to CohenArthur/gccrs
that referenced
this issue
Jan 12, 2024
Rust allows us to call generic pointer methods on pointers so in non generic contexts the old code using the bad can_eq interface couldn't handle this case. So taking advantage of our new unify_and interface to try and infer when required we can start using our TryCoerce interface to reuse existing code to assemble possible candidates more acurately using the existing coercion rules. Fixes Rust-GCC#1901 Rust-GCC#878 Signed-off-by: Philip Herron <[email protected]> gcc/rust/ChangeLog: * typecheck/rust-coercion.cc (TypeCoercionRules::Coerce): Add new try_flag (TypeCoercionRules::TypeCoercionRules): set new try flag (TypeCoercionRules::do_coercion): default to a final unify_and in the else case (TypeCoercionRules::coerce_unsafe_ptr): cannot coerce to a ptr from ref during autoderef (TypeCoercionRules::coerce_borrowed_pointer): respect coerceable mutability * typecheck/rust-coercion.h: update header * typecheck/rust-hir-dot-operator.cc (MethodResolver::select): use new TryCoerce interface (MethodResolver::append_adjustments): ensure we maintain adjustment mappings * typecheck/rust-hir-dot-operator.h: add new method append_adjustments * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): extra logging gcc/testsuite/ChangeLog: * rust/compile/issue-1901.rs: New test.
CohenArthur
pushed a commit
to CohenArthur/gccrs
that referenced
this issue
Jan 16, 2024
Rust allows us to call generic pointer methods on pointers so in non generic contexts the old code using the bad can_eq interface couldn't handle this case. So taking advantage of our new unify_and interface to try and infer when required we can start using our TryCoerce interface to reuse existing code to assemble possible candidates more acurately using the existing coercion rules. Fixes Rust-GCC#1901 Rust-GCC#878 Signed-off-by: Philip Herron <[email protected]> gcc/rust/ChangeLog: * typecheck/rust-coercion.cc (TypeCoercionRules::Coerce): Add new try_flag (TypeCoercionRules::TypeCoercionRules): set new try flag (TypeCoercionRules::do_coercion): default to a final unify_and in the else case (TypeCoercionRules::coerce_unsafe_ptr): cannot coerce to a ptr from ref during autoderef (TypeCoercionRules::coerce_borrowed_pointer): respect coerceable mutability * typecheck/rust-coercion.h: update header * typecheck/rust-hir-dot-operator.cc (MethodResolver::select): use new TryCoerce interface (MethodResolver::append_adjustments): ensure we maintain adjustment mappings * typecheck/rust-hir-dot-operator.h: add new method append_adjustments * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): extra logging gcc/testsuite/ChangeLog: * rust/compile/issue-1901.rs: New test.
CohenArthur
pushed a commit
to CohenArthur/gccrs
that referenced
this issue
Jan 16, 2024
Rust allows us to call generic pointer methods on pointers so in non generic contexts the old code using the bad can_eq interface couldn't handle this case. So taking advantage of our new unify_and interface to try and infer when required we can start using our TryCoerce interface to reuse existing code to assemble possible candidates more acurately using the existing coercion rules. Fixes Rust-GCC#1901 Rust-GCC#878 Signed-off-by: Philip Herron <[email protected]> gcc/rust/ChangeLog: * typecheck/rust-coercion.cc (TypeCoercionRules::Coerce): Add new try_flag (TypeCoercionRules::TypeCoercionRules): set new try flag (TypeCoercionRules::do_coercion): default to a final unify_and in the else case (TypeCoercionRules::coerce_unsafe_ptr): cannot coerce to a ptr from ref during autoderef (TypeCoercionRules::coerce_borrowed_pointer): respect coerceable mutability * typecheck/rust-coercion.h: update header * typecheck/rust-hir-dot-operator.cc (MethodResolver::select): use new TryCoerce interface (MethodResolver::append_adjustments): ensure we maintain adjustment mappings * typecheck/rust-hir-dot-operator.h: add new method append_adjustments * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): extra logging gcc/testsuite/ChangeLog: * rust/compile/issue-1901.rs: New test.
CohenArthur
pushed a commit
to CohenArthur/gccrs
that referenced
this issue
Jan 17, 2024
Rust allows us to call generic pointer methods on pointers so in non generic contexts the old code using the bad can_eq interface couldn't handle this case. So taking advantage of our new unify_and interface to try and infer when required we can start using our TryCoerce interface to reuse existing code to assemble possible candidates more acurately using the existing coercion rules. Fixes Rust-GCC#1901 Rust-GCC#878 Signed-off-by: Philip Herron <[email protected]> gcc/rust/ChangeLog: * typecheck/rust-coercion.cc (TypeCoercionRules::Coerce): Add new try_flag (TypeCoercionRules::TypeCoercionRules): set new try flag (TypeCoercionRules::do_coercion): default to a final unify_and in the else case (TypeCoercionRules::coerce_unsafe_ptr): cannot coerce to a ptr from ref during autoderef (TypeCoercionRules::coerce_borrowed_pointer): respect coerceable mutability * typecheck/rust-coercion.h: update header * typecheck/rust-hir-dot-operator.cc (MethodResolver::select): use new TryCoerce interface (MethodResolver::append_adjustments): ensure we maintain adjustment mappings * typecheck/rust-hir-dot-operator.h: add new method append_adjustments * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): extra logging gcc/testsuite/ChangeLog: * rust/compile/issue-1901.rs: New test.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tried this code: https://godbolt.org/z/aE71GeqjK
I expected to see this happen: compile without error
Instead, this happened:
Meta
The text was updated successfully, but these errors were encountered: