rust/compiler
bors 47121d6d88 Auto merge of #81110 - LeSeulArtichaut:fix-unused-unsafe-label, r=RalfJung
Fix `unused_unsafe` label with `unsafe_block_in_unsafe_fn

Previously, the following code:

```rust
#![feature(unsafe_block_in_unsafe_fn)]

unsafe fn foo() {
    unsafe { unsf() }
}

unsafe fn unsf() {}
```

Would give the following warning:

```
warning: unnecessary `unsafe` block
 --> src/lib.rs:4:5
  |
4 |     unsafe { unsf() }
  |     ^^^^^^ unnecessary `unsafe` block
  |
  = note: `#[warn(unused_unsafe)]` on by default
```
which doesn't point out that the block is in an `unsafe fn`.

Tracking issue: #71668
cc #79208
2021-01-19 08:59:37 +00:00
..
rustc
rustc_apfloat
rustc_arena
rustc_ast Replace let Some(..) = with .is_some() 2021-01-17 19:06:12 -05:00
rustc_ast_lowering Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_ast_passes Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_ast_pretty ast: Remove some indirection layers from values in key-value attributes 2021-01-09 21:50:39 +03:00
rustc_attr
rustc_builtin_macros resolve: Simplify built-in macro table 2021-01-10 14:48:47 +03:00
rustc_codegen_cranelift codegen_cranelift: Fix redundant semicolon warn 2021-01-16 07:17:13 +03:00
rustc_codegen_llvm Rollup merge of #81095 - LingMan:unwrap, r=oli-obk 2021-01-17 12:24:59 +00:00
rustc_codegen_ssa Rollup merge of #80983 - bjorn3:no_dup_is_dllimport_foreign_item, r=nagisa 2021-01-17 12:24:51 +00:00
rustc_data_structures Add track_caller to .steal() 2021-01-17 12:27:20 -05:00
rustc_driver Rollup merge of #80944 - LingMan:map_or, r=nagisa 2021-01-15 18:26:14 +09:00
rustc_error_codes Rollup merge of #80614 - 1000teslas:issue-78938-fix, r=tmandry 2021-01-16 17:29:49 +00:00
rustc_errors Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_expand Remove dead code 2021-01-17 12:45:48 +01:00
rustc_feature Feature-gate pointer and reference in intra-doc links 2021-01-17 15:27:35 -05:00
rustc_fs_util
rustc_graphviz
rustc_hir resolve: Reject ambiguity built-in attr vs different built-in attr 2021-01-17 01:48:17 +03:00
rustc_hir_pretty Auto merge of #79328 - c410-f3r:hir-if, r=matthewjasper 2021-01-14 14:41:58 +00:00
rustc_incremental Remove DepKind::CrateMetadata and pre-allocation of DepNodes 2021-01-12 11:22:57 -08:00
rustc_index
rustc_infer Add suggestion for impl_candidates with E0283 2021-01-18 21:57:15 +09:00
rustc_interface Remove DepKind::CrateMetadata and pre-allocation of DepNodes 2021-01-12 11:22:57 -08:00
rustc_lexer Return EOF_CHAR constant instead of magic char. 2021-01-07 13:20:04 +01:00
rustc_lint Auto merge of #80679 - jackh726:predicate-kind-take2, r=lcnr 2021-01-17 20:49:11 +00:00
rustc_lint_defs Don't mark ineffective_unstable_trait_impl as an internal lint 2021-01-15 17:31:10 -05:00
rustc_llvm Use probe-stack=inline-asm in LLVM 11+ 2021-01-14 22:49:16 -05:00
rustc_macros Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_metadata Impl EncodableWithShorthand for PredicateKind 2021-01-17 02:49:30 -05:00
rustc_middle Rollup merge of #81131 - pierwill:edit-rustc_middle-cast, r=varkor 2021-01-18 21:53:40 +10:00
rustc_mir Auto merge of #81110 - LeSeulArtichaut:fix-unused-unsafe-label, r=RalfJung 2021-01-19 08:59:37 +00:00
rustc_mir_build Auto merge of #80290 - RalfJung:less-intrinsic-write, r=lcnr 2021-01-16 17:28:32 +00:00
rustc_parse Rollup merge of #80944 - LingMan:map_or, r=nagisa 2021-01-15 18:26:14 +09:00
rustc_parse_format rustc_parse_format: Fix character indices in find_skips 2021-01-17 17:40:58 +03:00
rustc_passes Only inherit const stability for methods of impl const Trait blocks 2021-01-18 11:07:35 +00:00
rustc_plugin_impl
rustc_privacy Review changes 2021-01-16 18:56:37 -05:00
rustc_query_system Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_resolve Rollup merge of #81105 - LingMan:init_directly, r=nagisa 2021-01-18 21:53:28 +10:00
rustc_save_analysis Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_serialize rustc_serialize: fix incorrect signed LEB128 decoding 2021-01-11 12:13:26 -08:00
rustc_session Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
rustc_span Feature-gate pointer and reference in intra-doc links 2021-01-17 15:27:35 -05:00
rustc_symbol_mangling Rollup merge of #79968 - bjorn3:better_drop_glue_debuginfo, r=matthewjasper 2021-01-10 16:55:55 +09:00
rustc_target Rollup merge of #80662 - rxrbln:master, r=estebank 2021-01-13 03:20:15 +01:00
rustc_trait_selection Add suggestion for impl_candidates with E0283 2021-01-18 21:57:15 +09:00
rustc_traits Review changes 2021-01-16 18:56:37 -05:00
rustc_ty_utils Review changes 2021-01-16 18:56:37 -05:00
rustc_type_ir
rustc_typeck Auto merge of #81103 - zackmdavis:comma_trail, r=davidtwco 2021-01-19 02:54:58 +00:00