1
Fork 0
rust/compiler
bors 341f60327f Auto merge of #134353 - oli-obk:safe-target-feature-unsafe-by-default, r=wesleywiser
Treat safe target_feature functions as unsafe by default [less invasive variant]

This unblocks
* #134090

As I stated in https://github.com/rust-lang/rust/pull/134090#issuecomment-2541332415 I think the previous impl was too easy to get wrong, as by default it treated safe target feature functions as safe and had to add additional checks for when they weren't. Now the logic is inverted. By default they are unsafe and you have to explicitly handle safe target feature functions.

This is the less (imo) invasive variant of #134317, as it doesn't require changing the Safety enum, so it only affects FnDefs and nothing else, as it should.
2025-01-15 12:06:56 +00:00
..
rustc
rustc_abi fix ZST handling for Windows ABIs on MSVC target 2025-01-10 12:16:49 +01:00
rustc_arena Add inherent versions of MaybeUninit methods for slices 2025-01-11 23:57:00 -05:00
rustc_ast Remove allocations from case-insensitive comparison to keywords 2025-01-11 12:39:44 -05:00
rustc_ast_ir
rustc_ast_lowering Treat safe target_feature functions as unsafe by default 2025-01-15 08:58:17 +00:00
rustc_ast_passes update cfg(bootstrap) 2025-01-08 21:26:39 +01:00
rustc_ast_pretty Rename PatKind::Lit to Expr 2025-01-08 07:34:59 +00:00
rustc_attr_data_structures mir_transform: implement forced inlining 2025-01-10 18:37:54 +00:00
rustc_attr_parsing Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
rustc_baked_icu_data
rustc_borrowck Rollup merge of #134940 - compiler-errors:scrape, r=lcnr 2025-01-14 19:56:30 -08:00
rustc_builtin_macros Rollup merge of #134877 - DavisRayM:129966-format-string-help-message, r=estebank 2025-01-01 16:35:30 +11:00
rustc_codegen_cranelift Update compiler-builtins to 0.1.143 2025-01-15 04:02:19 +00:00
rustc_codegen_gcc Rollup merge of #134338 - tgross35:overflowing-c-safe-ret, r=bjorn3,antoyo 2025-01-15 04:08:12 -05:00
rustc_codegen_llvm Rollup merge of #133752 - klensy:cp, r=davidtwco 2025-01-13 15:56:55 +01:00
rustc_codegen_ssa Treat safe target_feature functions as unsafe by default 2025-01-15 08:58:17 +00:00
rustc_const_eval Do not consider traits that have unsatisfied const conditions to be conditionally const 2025-01-14 18:52:42 +00:00
rustc_data_structures De-abstract tagged pointer abstraction 2025-01-12 14:56:10 +00:00
rustc_driver
rustc_driver_impl add deprecated and do nothing flag to options table 2025-01-06 15:38:02 +03:00
rustc_error_codes Rewrite the error-code docs for coverage attributes [E0788] 2024-12-25 19:23:48 +11:00
rustc_error_messages Convert some Into impls into From impls 2024-12-31 01:56:33 +00:00
rustc_errors Auto merge of #135402 - matthiaskrgr:rollup-cz7hs13, r=matthiaskrgr 2025-01-12 14:43:10 +00:00
rustc_expand Rollup merge of #135247 - tgross35:stdlib-sym-list, r=oli-obk 2025-01-09 09:05:09 +01:00
rustc_feature Rollup merge of #135245 - Enselic:no-set-env, r=davidtwco 2025-01-13 15:57:03 +01:00
rustc_fluent_macro
rustc_fs_util
rustc_graphviz
rustc_hir Treat safe target_feature functions as unsafe by default 2025-01-15 08:58:17 +00:00
rustc_hir_analysis Auto merge of #134353 - oli-obk:safe-target-feature-unsafe-by-default, r=wesleywiser 2025-01-15 12:06:56 +00:00
rustc_hir_pretty Treat safe target_feature functions as unsafe by default 2025-01-15 08:58:17 +00:00
rustc_hir_typeck Treat safe target_feature functions as unsafe by default 2025-01-15 08:58:17 +00:00
rustc_incremental turn hir::ItemKind::Fn into a named-field variant 2025-01-04 11:35:31 +01:00
rustc_index document the use-cases of DenseBitSet a bit more 2025-01-11 11:34:03 +00:00
rustc_index_macros update rustc_index_macros feature handling 2024-12-19 20:32:12 +03:00
rustc_infer rm unnecessary OpaqueTypeDecl wrapper 2025-01-13 14:33:18 +01:00
rustc_interface Rollup merge of #134030 - folkertdev:min-fn-align, r=workingjubilee 2025-01-11 18:13:45 +01:00
rustc_lexer Add test to check unicode identifier version 2024-12-09 06:23:59 -08:00
rustc_lint Rollup merge of #135441 - compiler-errors:redundant-captures-lint, r=lqd 2025-01-13 20:43:48 -05:00
rustc_lint_defs Rollup merge of #132397 - m-ou-se:warn-missing-abi, r=Nadrieril 2025-01-15 04:08:10 -05:00
rustc_llvm llvm: Ignore error value that is always false 2025-01-07 01:02:22 +00:00
rustc_log Avoid naming variables str 2025-01-07 14:30:02 +02:00
rustc_macros Avoid naming variables str 2025-01-07 14:30:02 +02:00
rustc_metadata Mark dependencies of the standard library as private by default 2025-01-14 08:51:19 +00:00
rustc_middle Auto merge of #134353 - oli-obk:safe-target-feature-unsafe-by-default, r=wesleywiser 2025-01-15 12:06:56 +00:00
rustc_mir_build Avoid notes that only make sense for unsafe functions 2025-01-15 08:58:17 +00:00
rustc_mir_dataflow rename BitSet to DenseBitSet 2025-01-11 11:34:01 +00:00
rustc_mir_transform Rollup merge of #135377 - compiler-errors:impossible-step, r=oli-obk 2025-01-12 12:07:58 +01:00
rustc_monomorphize Make sure we actually use the right trivial lifetime substs when eagerly monomorphizing drop for structs 2025-01-15 04:20:25 +00:00
rustc_next_trait_solver Implement const Destruct in old solver 2025-01-08 18:14:58 +00:00
rustc_parse Remove allocations from case-insensitive comparison to keywords 2025-01-11 12:39:44 -05:00
rustc_parse_format add suggestion for wrongly ordered format parameters 2024-12-30 06:14:26 -08:00
rustc_passes Enforce syntactical stability of const traits in HIR 2025-01-14 19:12:08 +00:00
rustc_pattern_analysis rename BitSet to DenseBitSet 2025-01-11 11:34:01 +00:00
rustc_privacy turn hir::ItemKind::Fn into a named-field variant 2025-01-04 11:35:31 +01:00
rustc_query_impl don't return an Option from try_find_dep_kind 2025-01-07 21:57:00 +01:00
rustc_query_system remove code duplication when hashing query result and interning node 2025-01-13 20:25:46 +01:00
rustc_resolve Auto merge of #134353 - oli-obk:safe-target-feature-unsafe-by-default, r=wesleywiser 2025-01-15 12:06:56 +00:00
rustc_sanitizers Eliminate an unnecessary Symbol::to_string; use as_str 2025-01-07 14:24:47 +02:00
rustc_serialize
rustc_session Rollup merge of #134030 - folkertdev:min-fn-align, r=workingjubilee 2025-01-11 18:13:45 +01:00
rustc_smir Auto merge of #134625 - compiler-errors:unsafe-binders-ty, r=oli-obk 2024-12-24 00:51:51 +00:00
rustc_span mir_transform: implement forced inlining 2025-01-10 18:37:54 +00:00
rustc_symbol_mangling Fix legacy symbol mangling of closures 2025-01-14 16:33:03 +00:00
rustc_target on Windows, consistently pass ZST by-ref 2025-01-12 13:32:36 +01:00
rustc_trait_selection Auto merge of #134353 - oli-obk:safe-target-feature-unsafe-by-default, r=wesleywiser 2025-01-15 12:06:56 +00:00
rustc_traits
rustc_transmute add comment explaining why ty_and_layout_field is not used 2024-12-18 11:01:54 +01:00
rustc_ty_utils Consider more erroneous layouts as LayoutError::ReferencesError to suppress spurious errors 2025-01-14 19:07:37 +00:00
rustc_type_ir Make sure we actually use the right trivial lifetime substs when eagerly monomorphizing drop for structs 2025-01-15 04:20:25 +00:00
rustc_type_ir_macros
stable_mir make no-variant types a dedicated Variants variant 2024-12-18 11:01:54 +01:00