rust/compiler
Jonas Schievink 473ae229f0
Rollup merge of #77136 - ecstatic-morse:issue-77134, r=oli-obk
Suggest `const_mut_refs`, not `const_fn` for mutable references in `const fn`

Resolves #77134.

Prior to #76850, most uses of `&mut` in `const fn` ~~required~~ involved two feature gates, `const_mut_refs` and `const_fn`. The first allowed all mutable borrows of locals. The second allowed only locals, arguments and return values whose types contained `&mut`. I switched the second check to the `const_mut_refs` gate. However, I forgot update the error message with the new suggestion.

Alternatively, we could revert to having two different feature gates for this. OP's code never borrows anything mutably, so it didn't need `const_mut_refs` in the past, only `const_fn`. I'd prefer to keep everything under a single gate, however.

r? @oli-obk
2020-09-25 02:29:47 +02:00
..
rustc just max_level_info 2020-09-11 09:37:51 -07:00
rustc_apfloat /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_arena /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_ast tidy 2020-09-23 22:08:30 +02:00
rustc_ast_lowering simplfy condition in ItemLowerer::with_trait_impl_ref() 2020-09-16 23:09:57 +02:00
rustc_ast_passes use matches!() macro for simple if let conditions 2020-09-18 20:28:35 +02:00
rustc_ast_pretty Fully integrate token collection for additional AST structs 2020-09-10 17:58:14 -04:00
rustc_attr Don't use an if guard to check equality with a constant 2020-09-23 00:29:56 +02:00
rustc_builtin_macros Rollup merge of #77121 - duckymirror:html-root-url, r=jyn514 2020-09-25 02:29:45 +02:00
rustc_codegen_llvm /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_codegen_ssa /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_data_structures Rollup merge of #77121 - duckymirror:html-root-url, r=jyn514 2020-09-25 02:29:45 +02:00
rustc_driver /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_error_codes Add explanation for E0756 2020-09-21 21:04:56 +02:00
rustc_errors /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_expand Remove redundant #![feature(...)] 's from compiler/ 2020-09-17 07:58:45 +02:00
rustc_feature Add cfg(target_has_atomic_equal_alignment). 2020-09-21 20:42:25 +02:00
rustc_fs_util mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
rustc_graphviz /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_hir review, improve note span 2020-09-13 22:53:51 +02:00
rustc_hir_pretty mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
rustc_incremental /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_index cache types during normalization 2020-09-19 17:27:13 +02:00
rustc_infer Rollup merge of #77121 - duckymirror:html-root-url, r=jyn514 2020-09-25 02:29:45 +02:00
rustc_interface PR feedback 2020-09-17 12:18:09 +02:00
rustc_lexer Fix typo in rustc_lexer docs 2020-09-21 05:43:39 +02:00
rustc_lint Rollup merge of #77121 - duckymirror:html-root-url, r=jyn514 2020-09-25 02:29:45 +02:00
rustc_llvm /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_macros Preserve doc-comments when generating queries 2020-09-17 00:28:31 -04:00
rustc_metadata Rollup merge of #77121 - duckymirror:html-root-url, r=jyn514 2020-09-25 02:29:45 +02:00
rustc_middle Rollup merge of #77121 - duckymirror:html-root-url, r=jyn514 2020-09-25 02:29:45 +02:00
rustc_mir Rollup merge of #77136 - ecstatic-morse:issue-77134, r=oli-obk 2020-09-25 02:29:47 +02:00
rustc_mir_build Auto merge of #76918 - ishitatsuyuki:match-fastpath, r=oli-obk 2020-09-24 17:22:56 +00:00
rustc_parse Rollup merge of #76994 - yuk1ty:fix-small-typo, r=estebank 2020-09-23 14:54:07 +02:00
rustc_parse_format /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_passes /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_plugin_impl /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_privacy /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_query_system update the version of itertools and parking_lot 2020-09-12 08:26:53 +02:00
rustc_resolve /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_save_analysis /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_serialize /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_session Don't unwrap but report a fatal error for TargetDataLayout::parse. 2020-09-21 20:43:44 +02:00
rustc_span Rollup merge of #77121 - duckymirror:html-root-url, r=jyn514 2020-09-25 02:29:45 +02:00
rustc_symbol_mangling /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_target Rollup merge of #77121 - duckymirror:html-root-url, r=jyn514 2020-09-25 02:29:45 +02:00
rustc_trait_selection Rollup merge of #77121 - duckymirror:html-root-url, r=jyn514 2020-09-25 02:29:45 +02:00
rustc_traits Remove redundant #![feature(...)] 's from compiler/ 2020-09-17 07:58:45 +02:00
rustc_ty /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_typeck Rollup merge of #77121 - duckymirror:html-root-url, r=jyn514 2020-09-25 02:29:45 +02:00