rust/compiler
Jonas Schievink ae1916b3b4
Rollup merge of #79058 - dtolnay:likelymacro, r=Mark-Simulacrum
Move likely/unlikely argument outside of invisible unsafe block

The previous `likely!`/`unlikely!` macros were unsound because it permits the caller's expr to contain arbitrary unsafe code.

```rust
pub fn huh() -> bool {
    likely!(std::ptr::read(&() as *const () as *const bool))
}
```

**Before:** compiles cleanly.
**After:**

```console
error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
   |
70 |     likely!(std::ptr::read(&() as *const () as *const bool))
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
   |
   = note: consult the function's documentation for information on how to avoid undefined behavior
```
2020-11-15 13:40:03 +01:00
..
rustc
rustc_apfloat
rustc_arena
rustc_ast Rollup merge of #79016 - fanzier:underscore-expressions, r=petrochenkov 2020-11-15 13:39:48 +01:00
rustc_ast_lowering Rollup merge of #79016 - fanzier:underscore-expressions, r=petrochenkov 2020-11-15 13:39:48 +01:00
rustc_ast_passes Add underscore expressions for destructuring assignments 2020-11-14 13:53:12 +00:00
rustc_ast_pretty Rollup merge of #79016 - fanzier:underscore-expressions, r=petrochenkov 2020-11-15 13:39:48 +01:00
rustc_attr
rustc_builtin_macros Rollup merge of #79005 - petrochenkov:noinjected, r=davidtwco 2020-11-15 13:39:46 +01:00
rustc_codegen_cranelift
rustc_codegen_llvm Rollup merge of #77802 - jyn514:bootstrap-specific, r=nikomatsakis 2020-11-15 13:39:43 +01:00
rustc_codegen_ssa rustc_target: Mark UEFI targets as is_like_windows/is_like_msvc 2020-11-12 19:40:41 +03:00
rustc_data_structures Rollup merge of #79058 - dtolnay:likelymacro, r=Mark-Simulacrum 2020-11-15 13:40:03 +01:00
rustc_driver Rollup merge of #79005 - petrochenkov:noinjected, r=davidtwco 2020-11-15 13:39:46 +01:00
rustc_error_codes
rustc_errors
rustc_expand Rollup merge of #78836 - fanzier:struct-and-slice-destructuring, r=petrochenkov 2020-11-12 19:46:09 +01:00
rustc_feature Rollup merge of #77802 - jyn514:bootstrap-specific, r=nikomatsakis 2020-11-15 13:39:43 +01:00
rustc_fs_util
rustc_graphviz
rustc_hir Rollup merge of #78836 - fanzier:struct-and-slice-destructuring, r=petrochenkov 2020-11-12 19:46:09 +01:00
rustc_hir_pretty
rustc_incremental
rustc_index
rustc_infer Rollup merge of #78463 - varkor:placeholder-const, r=nikomatsakis 2020-11-13 15:26:14 +01:00
rustc_interface Rollup merge of #79036 - cjgillot:steal, r=oli-obk 2020-11-15 13:39:59 +01:00
rustc_lexer
rustc_lint Reserve space in advance 2020-11-13 11:19:25 +01:00
rustc_lint_defs
rustc_llvm fully exploited the dropped support of LLVM 8 2020-11-12 14:39:47 +01:00
rustc_macros
rustc_metadata Push to result vector instead of allocating 2020-11-13 11:19:25 +01:00
rustc_middle Rollup merge of #79036 - cjgillot:steal, r=oli-obk 2020-11-15 13:39:59 +01:00
rustc_mir Rollup merge of #79036 - cjgillot:steal, r=oli-obk 2020-11-15 13:39:59 +01:00
rustc_mir_build Rollup merge of #79036 - cjgillot:steal, r=oli-obk 2020-11-15 13:39:59 +01:00
rustc_parse Rollup merge of #79016 - fanzier:underscore-expressions, r=petrochenkov 2020-11-15 13:39:48 +01:00
rustc_parse_format
rustc_passes Rollup merge of #77802 - jyn514:bootstrap-specific, r=nikomatsakis 2020-11-15 13:39:43 +01:00
rustc_plugin_impl
rustc_privacy
rustc_query_system
rustc_resolve Rollup merge of #79034 - petrochenkov:mrscopes3, r=eddyb 2020-11-15 13:39:57 +01:00
rustc_save_analysis Rollup merge of #78352 - JohnTitor:issue-75229, r=Dylan-DPC 2020-11-15 03:02:34 +01:00
rustc_serialize
rustc_session Rollup merge of #79005 - petrochenkov:noinjected, r=davidtwco 2020-11-15 13:39:46 +01:00
rustc_span Auto merge of #76256 - tgnottingham:issue-74890, r=nikomatsakis 2020-11-12 15:34:09 +00:00
rustc_symbol_mangling
rustc_target Rollup merge of #78993 - petrochenkov:specdash, r=oli-obk 2020-11-15 03:02:59 +01:00
rustc_trait_selection Rollup merge of #77802 - jyn514:bootstrap-specific, r=nikomatsakis 2020-11-15 13:39:43 +01:00
rustc_traits
rustc_ty
rustc_typeck Rollup merge of #79019 - lcnr:generic-arg-validation, r=petrochenkov 2020-11-15 13:39:50 +01:00