-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Coercing bare fn to &fn
is inconsistent in statics.
#5216
Labels
A-type-system
Area: Type system
Comments
Doesn't seem critical for 0.7. Nominating for milestone 2. |
Seems like just-a-bug; if fixed, would only admit more code. Declined milestone. |
related to #5551 |
@jld neither typecheck now. Same error:
|
These are well-typed: fn f() {}
type T = &'static extern "Rust" fn();
pub static C: T = &f; fn f() {}
struct S(&'static extern "Rust" fn());
pub static C: S = S(&f); I guess this bypasses the coercion, though. |
I'm about to check in the test case. |
#10027 will close this. |
closed by SHA: 5de50a3 |
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
May 2, 2020
…-fn, r=flip1995 Prevent `missing_const_for_fn` on functions with const generic params `const` functions cannot have const generic parameters so prevent the `missing_const_for_fn` lint from firing in that case. changelog: Fix false positive in `missing_const_for_fn` Fixes rust-lang#5192
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This types:
This doesn't:
This seems wrong.
The text was updated successfully, but these errors were encountered: