Why do we call `codegen_fn_attrs` at all for consts? Most of the codegen attributes don't make any sense for constants. If any are allowed on consts, we should probably have separate handling for them. Only `ffi_returns_twice` seems to throw an error for non-function items.    [This PR added the `target == Target::Const`](https://github.com/rust-lang/rust/pull/51966/files#diff-a7a4db27e720b5572001d15719153b54), but without any comment as to why.