rust/compiler
bors eb4860c7e1 Auto merge of #78864 - Mark-Simulacrum:warn-on-forbids, r=pnkfelix
Use true previous lint level when detecting overriden forbids

Previously, cap-lints was ignored when checking the previous forbid level, which
meant that it was a hard error to do so. This is different from the normal
behavior of lints, which are silenced by cap-lints; if the forbid would not take
effect regardless, there is not much point in complaining about the fact that we
are reducing its level.

It might be considered a bug that even `--cap-lints deny` would suffice to
silence the error on overriding forbid, depending on if one cares about failing
the build or precisely forbid being set. But setting cap-lints to deny is quite
odd and not really done in practice, so we don't try to handle it specially.

This also unifies the code paths for nested and same-level scopes. However, the
special case for CLI lint flags is left in place (introduced by #70918) to fix
the regression noted in #70819. That means that CLI flags do not lint on forbid
being overridden by a non-forbid level. It is unclear whether this is a bug or a
desirable feature, but it is certainly inconsistent. CLI flags are a
sufficiently different "type" of place though that this is deemed out of scope
for this commit.

r? `@pnkfelix` perhaps?

cc #77713 -- not marking as "Fixes" because of the lack of proper unused attribute handling in this PR
2020-12-02 02:07:45 +00:00
..
rustc
rustc_apfloat
rustc_arena Use specialization to avoid copying 2020-11-20 21:02:09 +01:00
rustc_ast Add documentation for name_value_literal_span methods 2020-12-01 17:32:14 +01:00
rustc_ast_lowering Auto merge of #79318 - cjgillot:fitem, r=lcnr 2020-11-27 13:45:22 +00:00
rustc_ast_passes Auto merge of #78296 - Aaron1011:fix/stmt-tokens, r=petrochenkov 2020-11-28 07:48:56 +00:00
rustc_ast_pretty Rollup merge of #79016 - fanzier:underscore-expressions, r=petrochenkov 2020-11-15 13:39:48 +01:00
rustc_attr Created NestedMetaItem::name_value_literal_span method 2020-12-01 16:26:51 +01:00
rustc_builtin_macros Properly handle attributes on statements 2020-11-26 17:08:35 -05:00
rustc_codegen_cranelift Merge commit '5988bbd24aa87732bfa1d111ba00bcdaa22c481a' into sync_cg_clif-2020-11-27 2020-11-27 20:48:53 +01:00
rustc_codegen_llvm Auto merge of #78684 - devsnek:inline-asm-wasm, r=Amanieu 2020-12-01 20:23:06 +00:00
rustc_codegen_ssa Rollup merge of #79508 - jryans:check-dsymutil-result, r=nagisa 2020-12-01 23:46:09 +01:00
rustc_data_structures Rename optin_builtin_traits to auto_traits 2020-11-23 14:14:06 -08:00
rustc_driver Auto merge of #77671 - flip1995:lint_list_always_plugins, r=oli-obk,Manishearth 2020-11-26 18:51:45 +00:00
rustc_error_codes Slightly improve code samples in E0591 2020-11-27 19:07:14 -08:00
rustc_errors Rollup merge of #74293 - GuillaumeGomez:rustdoc-test-compiler-output-color, r=jyn514 2020-11-17 16:13:46 +01:00
rustc_expand Created NestedMetaItem::name_value_literal_span method 2020-12-01 16:26:51 +01:00
rustc_feature Rename optin_builtin_traits to auto_traits 2020-11-23 14:14:06 -08:00
rustc_fs_util
rustc_graphviz Rust coverage before splitting instrument_coverage.rs 2020-11-05 18:24:12 -08:00
rustc_hir Formatting. 2020-11-26 21:32:29 +01:00
rustc_hir_pretty Remove ForeignMod struct. 2020-11-26 21:32:27 +01:00
rustc_incremental Auto merge of #74967 - Aaron1011:feature/incr-def-path-table, r=pnkfelix 2020-12-01 14:30:02 +00:00
rustc_index Stabilise then 2020-11-22 13:45:14 +00:00
rustc_infer Return FxIndexSet instead of FxHashSet to avoid order errors on different platforms 2020-11-27 18:45:34 -03:00
rustc_interface Auto merge of #74967 - Aaron1011:feature/incr-def-path-table, r=pnkfelix 2020-12-01 14:30:02 +00:00
rustc_lexer Add back missing comments 2020-10-30 10:13:41 -04:00
rustc_lint Auto merge of #78864 - Mark-Simulacrum:warn-on-forbids, r=pnkfelix 2020-12-02 02:07:45 +00:00
rustc_lint_defs lint-docs: Add --validate flag to validate lint docs separately. 2020-11-28 13:39:02 -08:00
rustc_llvm Auto merge of #78684 - devsnek:inline-asm-wasm, r=Amanieu 2020-12-01 20:23:06 +00:00
rustc_macros Only create OnDiskCache in incremental compilation mode 2020-11-19 15:50:55 -05:00
rustc_metadata Auto merge of #74967 - Aaron1011:feature/incr-def-path-table, r=pnkfelix 2020-12-01 14:30:02 +00:00
rustc_middle Rollup merge of #79509 - GuillaumeGomez:improve-attr-spans, r=oli-obk 2020-12-01 23:46:11 +01:00
rustc_mir Auto merge of #78296 - Aaron1011:fix/stmt-tokens, r=petrochenkov 2020-11-28 07:48:56 +00:00
rustc_mir_build Don't store ty and span in IntRange 2020-11-28 22:07:15 +00:00
rustc_parse Auto merge of #79329 - camelid:int-lit-suffix-error, r=davidtwco 2020-11-30 01:42:14 +00:00
rustc_parse_format
rustc_passes Improve some attributes error spans 2020-12-01 16:26:51 +01:00
rustc_plugin_impl Store ForeignItem in a side table. 2020-11-26 21:29:27 +01:00
rustc_privacy Remove ForeignMod struct. 2020-11-26 21:32:27 +01:00
rustc_query_system Fix rebase fallout 2020-11-25 15:08:51 -05:00
rustc_resolve Remove ForeignMod struct. 2020-11-26 21:32:27 +01:00
rustc_save_analysis Remove ForeignMod struct. 2020-11-26 21:32:27 +01:00
rustc_serialize
rustc_session Rollup merge of #79508 - jryans:check-dsymutil-result, r=nagisa 2020-12-01 23:46:09 +01:00
rustc_span Rollup merge of #79464 - GuillaumeGomez:doc-keyword-ident, r=jyn514 2020-11-29 03:14:21 +01:00
rustc_symbol_mangling Store ForeignItem in a side table. 2020-11-26 21:29:27 +01:00
rustc_target Auto merge of #78684 - devsnek:inline-asm-wasm, r=Amanieu 2020-12-01 20:23:06 +00:00
rustc_trait_selection Remove extra call to upvar_tys 2020-11-29 19:11:20 -05:00
rustc_traits Don't run resolve_vars_if_possible in normalize_erasing_regions 2020-11-18 12:25:36 -05:00
rustc_ty_utils Be cautious of calling upvar_tys before mir 2020-11-29 19:20:28 -05:00
rustc_typeck Auto merge of #79209 - spastorino:trait-inheritance-self, r=nikomatsakis 2020-11-29 21:04:23 +00:00