-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Can not create static function pointer to generic instantiation #13971
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
Comments
No longer repros, uncommenting test. |
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
Jan 21, 2015
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Feb 13, 2023
…ypes, r=Veykril fix: more precise binop inference While inferring binary operator expressions, Rust puts some extra constraints on the types of the operands for better inference. Relevant part in rustc is [this](https://github.com/rust-lang/rust/blob/159ba8a92c9e2fa4121f106176309521f4af87e9/compiler/rustc_hir_typeck/src/op.rs#L128-L152). There are two things we currently fail to consider: - we should enforce them only when both lhs and rhs type are builtin types that are applicable to the binop - lhs and rhs types may be single reference to applicable builtin types This PR basically ports [`enforce_builtin_binop_types()`](https://github.com/rust-lang/rust/blob/159ba8a92c9e2fa4121f106176309521f4af87e9/compiler/rustc_hir_typeck/src/op.rs#L159) and [`is_builtin_binop()`](https://github.com/rust-lang/rust/blob/159ba8a92c9e2fa4121f106176309521f4af87e9/compiler/rustc_hir_typeck/src/op.rs#LL927) to our inference context.
bors
pushed a commit
to rust-lang-ci/rust
that referenced
this issue
Jan 28, 2025
I noticed that this was missing bf482928 while doing the release. No harm done, as it was updated on the next push to master. changelog: none
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Testcase:
Output:
The text was updated successfully, but these errors were encountered: