rust/compiler
bors 8521a8c92d Auto merge of #100726 - jswrenn:transmute, r=oli-obk
safe transmute: use `Assume` struct to provide analysis options

This task was left as a TODO in #92268; resolving it brings [`BikeshedIntrinsicFrom`](https://doc.rust-lang.org/nightly/core/mem/trait.BikeshedIntrinsicFrom.html) more in line with the API defined in [MCP411](https://github.com/rust-lang/compiler-team/issues/411).

**Before:**
```rust
pub unsafe trait BikeshedIntrinsicFrom<
    Src,
    Context,
    const ASSUME_ALIGNMENT: bool,
    const ASSUME_LIFETIMES: bool,
    const ASSUME_VALIDITY: bool,
    const ASSUME_VISIBILITY: bool,
> where
    Src: ?Sized,
{}
```
**After:**
```rust
pub unsafe trait BikeshedIntrinsicFrom<Src, Context, const ASSUME: Assume = { Assume::NOTHING }>
where
    Src: ?Sized,
{}
```

`Assume::visibility` has also been renamed to `Assume::safety`, as library safety invariants are what's actually being assumed; visibility is just the mechanism by which it is currently checked (and that may change).

r? `@oli-obk`

---

Related:
- https://github.com/rust-lang/compiler-team/issues/411
- https://github.com/rust-lang/rust/issues/99571
2022-09-04 07:55:44 +00:00
..
rustc
rustc_apfloat
rustc_arena
rustc_ast
rustc_ast_lowering
rustc_ast_passes
rustc_ast_pretty Fix global_asm macro pretty printing 2022-09-03 08:06:35 +00:00
rustc_attr Also replace the version placeholder in rustc_attr 2022-09-02 01:47:01 +02:00
rustc_borrowck Rollup merge of #101285 - TaKO8Ki:do-not-suggest-adding-move-when-closure-is-already-marked-as-move, r=oli-obk 2022-09-01 21:37:21 +02:00
rustc_builtin_macros
rustc_codegen_cranelift Auto merge of #97802 - Enselic:add-no_ignore_sigkill-feature, r=joshtriplett 2022-09-02 21:08:08 +00:00
rustc_codegen_gcc
rustc_codegen_llvm
rustc_codegen_ssa Auto merge of #97802 - Enselic:add-no_ignore_sigkill-feature, r=joshtriplett 2022-09-02 21:08:08 +00:00
rustc_const_eval Auto merge of #101154 - RalfJung:validation-perf, r=oli-obk 2022-09-03 09:20:54 +00:00
rustc_data_structures
rustc_driver
rustc_error_codes
rustc_error_messages Auto merge of #100574 - Urgau:check-cfg-warn-cfg, r=petrochenkov 2022-09-03 12:02:14 +00:00
rustc_errors Rollup merge of #100928 - CleanCut:rustc_metadata_diagnostics, r=davidtwco 2022-09-03 10:33:05 +05:30
rustc_expand
rustc_feature Auto merge of #97802 - Enselic:add-no_ignore_sigkill-feature, r=joshtriplett 2022-09-02 21:08:08 +00:00
rustc_fs_util
rustc_graphviz
rustc_hir Auto merge of #100726 - jswrenn:transmute, r=oli-obk 2022-09-04 07:55:44 +00:00
rustc_hir_pretty
rustc_incremental
rustc_index
rustc_infer
rustc_interface Rollup merge of #100552 - petrochenkov:flavorcompat, r=lqd 2022-09-02 11:34:49 +02:00
rustc_lexer
rustc_lint Auto merge of #100574 - Urgau:check-cfg-warn-cfg, r=petrochenkov 2022-09-03 12:02:14 +00:00
rustc_lint_defs Add warning against unexpected --cfg with --check-cfg 2022-09-02 12:51:48 +02:00
rustc_llvm
rustc_log
rustc_macros Allow deriving multiple subdiagnostics using one SessionSubdiagnostic 2022-09-01 21:18:01 +02:00
rustc_metadata Do not call object_lifetime_default on lifetime params. 2022-09-03 21:11:42 +02:00
rustc_middle Do not call object_lifetime_default on lifetime params. 2022-09-03 21:11:42 +02:00
rustc_mir_build Use boxed slices in PatKind. 2022-09-02 07:26:22 +10:00
rustc_mir_dataflow
rustc_mir_transform
rustc_monomorphize Auto merge of #97802 - Enselic:add-no_ignore_sigkill-feature, r=joshtriplett 2022-09-02 21:08:08 +00:00
rustc_parse remove redundant clones 2022-09-03 07:58:41 +02:00
rustc_parse_format
rustc_passes Do not call object_lifetime_default on lifetime params. 2022-09-03 21:11:42 +02:00
rustc_plugin_impl
rustc_privacy Rollup merge of #100147 - Bryanskiy:private-in-public, r=petrochenkov 2022-09-02 11:34:48 +02:00
rustc_query_impl Don't create two new closures for each query 2022-09-01 18:47:54 -05:00
rustc_query_system Don't create two new closures for each query 2022-09-01 18:47:54 -05:00
rustc_resolve Do not call object_lifetime_default on lifetime params. 2022-09-03 21:11:42 +02:00
rustc_save_analysis
rustc_serialize
rustc_session Auto merge of #100574 - Urgau:check-cfg-warn-cfg, r=petrochenkov 2022-09-03 12:02:14 +00:00
rustc_smir
rustc_span Auto merge of #100726 - jswrenn:transmute, r=oli-obk 2022-09-04 07:55:44 +00:00
rustc_symbol_mangling
rustc_target
rustc_trait_selection Auto merge of #100726 - jswrenn:transmute, r=oli-obk 2022-09-04 07:55:44 +00:00
rustc_traits
rustc_transmute Auto merge of #100726 - jswrenn:transmute, r=oli-obk 2022-09-04 07:55:44 +00:00
rustc_ty_utils Box PatKind::Range. 2022-09-02 07:26:22 +10:00
rustc_type_ir
rustc_typeck Rollup merge of #100302 - compiler-errors:deref-path-methods, r=jackh726 2022-09-04 00:20:39 +02:00