rust/compiler
Matthias Krüger 3cd1dc1d6e
Rollup merge of #94270 - RalfJung:fn-ptrs, r=oli-obk
Miri: relax fn ptr check

As discussed in https://github.com/rust-lang/unsafe-code-guidelines/issues/72#issuecomment-1025407536, the function pointer check done by Miri is currently overeager: contrary to our usual principle of only checking rather uncontroversial validity invariants, we actually check that the pointer points to a real function.

So, this relaxes the check to what the validity invariant probably will be (and what the reference already says it is): the function pointer must be non-null, and that's it.

The check that CTFE does on the final value of a constant is unchanged -- CTFE recurses through references, so it makes some sense to also recurse through function pointers. We might still want to relax this in the future, but that would be a separate change.

r? `@oli-obk`
2022-02-24 07:48:06 +01:00
..
rustc
rustc_apfloat
rustc_arena
rustc_ast Rollup merge of #94128 - mqy:master, r=Dylan-DPC 2022-02-23 12:26:40 +01:00
rustc_ast_lowering Auto merge of #93438 - spastorino:node_id_to_hir_id_refactor, r=oli-obk 2022-02-24 01:26:57 +00:00
rustc_ast_passes Rollup merge of #94146 - est31:let_else, r=cjgillot 2022-02-20 00:37:34 +01:00
rustc_ast_pretty
rustc_attr Rollup merge of #94146 - est31:let_else, r=cjgillot 2022-02-20 00:37:34 +01:00
rustc_borrowck Auto merge of #93984 - nnethercote:ChunkedBitSet, r=Mark-Simulacrum 2022-02-23 01:26:07 +00:00
rustc_builtin_macros Rollup merge of #94146 - est31:let_else, r=cjgillot 2022-02-20 00:37:34 +01:00
rustc_codegen_cranelift Merge commit '35d9c6bf256968e1b40e0d554607928bdf9cebea' into sync_cg_clif-2022-02-23 2022-02-23 11:49:34 +01:00
rustc_codegen_gcc
rustc_codegen_llvm Rollup merge of #89887 - arlosi:char-debug, r=wesleywiser 2022-02-24 07:48:04 +01:00
rustc_codegen_ssa Rollup merge of #94169 - Amanieu:asm_stuff, r=nagisa 2022-02-22 12:16:28 +01:00
rustc_const_eval Rollup merge of #94270 - RalfJung:fn-ptrs, r=oli-obk 2022-02-24 07:48:06 +01:00
rustc_data_structures Auto merge of #93984 - nnethercote:ChunkedBitSet, r=Mark-Simulacrum 2022-02-23 01:26:07 +00:00
rustc_driver Rollup merge of #94146 - est31:let_else, r=cjgillot 2022-02-20 00:37:34 +01:00
rustc_error_codes
rustc_errors Remove support for JSON deserialization to Rust 2022-02-20 18:58:21 -05:00
rustc_expand Rollup merge of #94146 - est31:let_else, r=cjgillot 2022-02-20 00:37:34 +01:00
rustc_feature fix names in feature(...) suggestion 2022-02-21 01:17:37 -08:00
rustc_fs_util
rustc_graphviz
rustc_hir Auto merge of #93438 - spastorino:node_id_to_hir_id_refactor, r=oli-obk 2022-02-24 01:26:57 +00:00
rustc_hir_pretty
rustc_incremental
rustc_index Introduce ChunkedBitSet and use it for some dataflow analyses. 2022-02-23 10:18:49 +11:00
rustc_infer Auto merge of #94225 - matthiaskrgr:rollup-0728x8n, r=matthiaskrgr 2022-02-21 22:53:45 +00:00
rustc_interface Rollup merge of #94146 - est31:let_else, r=cjgillot 2022-02-20 00:37:34 +01:00
rustc_lexer
rustc_lint use List<Ty<'tcx>> for tuples 2022-02-21 07:09:11 +01:00
rustc_lint_defs
rustc_llvm
rustc_log
rustc_macros Delete Decoder::read_enum_variant 2022-02-20 18:58:23 -05:00
rustc_metadata
rustc_middle Rollup merge of #94267 - pierwill:fast-reject-bound, r=michaelwoerister 2022-02-24 07:48:05 +01:00
rustc_mir_build Auto merge of #93505 - lcnr:substsref-vs-ty-list, r=michaelwoerister 2022-02-21 16:03:38 +00:00
rustc_mir_dataflow Auto merge of #93984 - nnethercote:ChunkedBitSet, r=Mark-Simulacrum 2022-02-23 01:26:07 +00:00
rustc_mir_transform Auto merge of #93984 - nnethercote:ChunkedBitSet, r=Mark-Simulacrum 2022-02-23 01:26:07 +00:00
rustc_monomorphize Auto merge of #94062 - Mark-Simulacrum:drop-print-cfg, r=oli-obk 2022-02-20 18:12:59 +00:00
rustc_parse Better error if the user tries to do assignment ... else 2022-02-21 08:59:39 +01:00
rustc_parse_format
rustc_passes Take CodegenFnAttrs into account when validating asm! register operands 2022-02-21 18:28:22 +00:00
rustc_plugin_impl
rustc_privacy
rustc_query_impl Auto merge of #94066 - Mark-Simulacrum:factor-out-simple-def-kind, r=davidtwco 2022-02-21 03:36:55 +00:00
rustc_query_system Auto merge of #93839 - Mark-Simulacrum:delete-json-rust-deserialization, r=nnethercote 2022-02-22 07:54:22 +00:00
rustc_resolve Rollup merge of #94146 - est31:let_else, r=cjgillot 2022-02-20 00:37:34 +01:00
rustc_save_analysis Auto merge of #94062 - Mark-Simulacrum:drop-print-cfg, r=oli-obk 2022-02-20 18:12:59 +00:00
rustc_serialize Delete Decoder::read_map 2022-02-20 18:58:23 -05:00
rustc_session Rollup merge of #94146 - est31:let_else, r=cjgillot 2022-02-20 00:37:34 +01:00
rustc_span Rollup merge of #94169 - Amanieu:asm_stuff, r=nagisa 2022-02-22 12:16:28 +01:00
rustc_symbol_mangling Rename region_should_not_be_omitted to should_print_region 2022-02-23 08:58:36 +01:00
rustc_target Add tests 2022-02-21 18:28:22 +00:00
rustc_trait_selection Auto merge of #94225 - matthiaskrgr:rollup-0728x8n, r=matthiaskrgr 2022-02-21 22:53:45 +00:00
rustc_traits use List<Ty<'tcx>> for tuples 2022-02-21 07:09:11 +01:00
rustc_ty_utils use List<Ty<'tcx>> for tuples 2022-02-21 07:09:11 +01:00
rustc_type_ir
rustc_typeck Rollup merge of #94237 - compiler-errors:dont-wrap-ambiguous-receivers, r=lcnr 2022-02-22 12:16:33 +01:00