rust/compiler
Yuki Okushi 5ebc4d3697
Rollup merge of #85939 - m-ou-se:fix-remove-ref-macro-invocation, r=estebank
Fix suggestion for removing &mut from &mut macro!().

Fixes #85933

Before: (Note the suggestions.)
```
error[E0308]: mismatched types
 --> src/main.rs:2:21
  |
2 |     let _: String = &mut format!("");
  |            ------   ^^^^^^^^^^^^^^^^
  |            |        |
  |            |        expected struct `String`, found `&mut String`
  |            |        help: consider removing the borrow: `mut format!("")`
  |            expected due to this

error[E0308]: mismatched types
 --> src/main.rs:3:21
  |
3 |     let _: String = &mut (format!(""));
  |            ------   ^^^^^^^^^^^^^^^^^^
  |            |        |
  |            |        expected struct `String`, found `&mut String`
  |            |        help: consider removing the borrow: `mut (format!(""))`
  |            expected due to this
```

After:
```
error[E0308]: mismatched types
 --> src/main.rs:2:21
  |
2 |     let _: String = &mut format!("");
  |            ------   ^^^^^^^^^^^^^^^^
  |            |        |
  |            |        expected struct `String`, found `&mut String`
  |            |        help: consider removing the borrow: `format!("")`
  |            expected due to this

error[E0308]: mismatched types
 --> src/main.rs:3:21
  |
3 |     let _: String = &mut (format!(""));
  |            ------   ^^^^^^^^^^^^^^^^^^
  |            |        |
  |            |        expected struct `String`, found `&mut String`
  |            |        help: consider removing the borrow: `format!("")`
  |            expected due to this
```
2021-06-05 06:13:39 +09:00
..
rustc use jemallocator in rustc/rustdoc 2021-04-04 14:10:26 -07:00
rustc_apfloat remove cfg(bootstrap) 2021-05-24 11:07:48 -04:00
rustc_arena Remove (lots of) dead code 2021-03-27 22:16:33 -04:00
rustc_ast Revert "Reduce the amount of untracked state in TyCtxt" 2021-06-01 09:05:22 +02:00
rustc_ast_lowering Rename take_trait_map. 2021-06-01 20:53:04 +02:00
rustc_ast_passes Remove unused feature gates 2021-05-31 13:55:43 +02:00
rustc_ast_pretty remove cfg(bootstrap) 2021-05-24 11:07:48 -04:00
rustc_attr remove cfg(bootstrap) 2021-05-24 11:07:48 -04:00
rustc_builtin_macros remove cfg(bootstrap) 2021-05-24 11:07:48 -04:00
rustc_codegen_cranelift Revert "Reduce the amount of untracked state in TyCtxt" 2021-06-01 09:05:22 +02:00
rustc_codegen_llvm Respond to review feedback 2021-06-02 10:23:12 -04:00
rustc_codegen_ssa Auto merge of #85385 - richkadel:simpler-simplify-with-coverage, r=wesleywiser 2021-06-04 10:18:54 +00:00
rustc_data_structures Unify parallel and non-parallel APIs 2021-06-04 15:26:08 -04:00
rustc_driver Auto merge of #83842 - LeSeulArtichaut:thir-vec, r=nikomatsakis 2021-05-19 18:41:23 +00:00
rustc_error_codes swap function order for better read flow 2021-05-13 13:22:24 +02:00
rustc_errors Miscellaneous inlining improvements 2021-06-02 08:49:58 +02:00
rustc_expand Rollup merge of #85850 - bjorn3:less_feature_gates, r=jyn514 2021-06-04 13:42:54 +09:00
rustc_feature Auto merge of #85331 - cjgillot:dirty-dancing, r=Aaron1011 2021-06-01 23:02:52 +00:00
rustc_fs_util Optimize away a fs::metadata call. 2021-01-06 08:33:15 -08:00
rustc_graphviz Remove (lots of) dead code 2021-03-27 22:16:33 -04:00
rustc_hir Rollup merge of #85850 - bjorn3:less_feature_gates, r=jyn514 2021-06-04 13:42:54 +09:00
rustc_hir_pretty remove cfg(bootstrap) 2021-05-24 11:07:48 -04:00
rustc_incremental Auto merge of #85337 - cjgillot:less-anon, r=michaelwoerister 2021-06-02 13:11:41 +00:00
rustc_index Remove unused feature gates 2021-05-31 13:55:43 +02:00
rustc_infer Rollup merge of #85850 - bjorn3:less_feature_gates, r=jyn514 2021-06-04 13:42:54 +09:00
rustc_interface Rollup merge of #85850 - bjorn3:less_feature_gates, r=jyn514 2021-06-04 13:42:54 +09:00
rustc_lexer Fix outdated crate names in compiler docs 2021-04-08 11:12:14 -05:00
rustc_lint Rollup merge of #85853 - marmeladema:improper-ctypes-definitions-boxed-dst, r=petrochenkov 2021-06-05 06:13:38 +09:00
rustc_lint_defs Rollup merge of #85852 - m-ou-se:machineapplicable-docs, r=nikomatsakis 2021-06-03 14:35:30 +09:00
rustc_llvm Update cc 2021-05-24 23:34:12 +01:00
rustc_macros Use iter::zip in compiler/ 2021-03-26 09:32:31 -07:00
rustc_metadata Rollup merge of #85889 - denismerigoux:master, r=petrochenkov 2021-06-04 13:42:56 +09:00
rustc_middle Auto merge of #85788 - rylev:force-warns, r=nikomatsakis 2021-06-04 13:31:51 +00:00
rustc_mir Auto merge of #85385 - richkadel:simpler-simplify-with-coverage, r=wesleywiser 2021-06-04 10:18:54 +00:00
rustc_mir_build Rollup merge of #85850 - bjorn3:less_feature_gates, r=jyn514 2021-06-04 13:42:54 +09:00
rustc_parse Rollup merge of #85850 - bjorn3:less_feature_gates, r=jyn514 2021-06-04 13:42:54 +09:00
rustc_parse_format remove cfg(bootstrap) 2021-05-24 11:07:48 -04:00
rustc_passes Rollup merge of #85850 - bjorn3:less_feature_gates, r=jyn514 2021-06-04 13:42:54 +09:00
rustc_plugin_impl Use () for plugin_registrar_fn. 2021-05-12 13:58:43 +02:00
rustc_privacy Revert "Reduce the amount of untracked state in TyCtxt" 2021-06-01 09:05:22 +02:00
rustc_query_impl Rollup merge of #85850 - bjorn3:less_feature_gates, r=jyn514 2021-06-04 13:42:54 +09:00
rustc_query_system Rollup merge of #85850 - bjorn3:less_feature_gates, r=jyn514 2021-06-04 13:42:54 +09:00
rustc_resolve Rollup merge of #85896 - BoxyUwU:remove-fixme-fwd-declared-const-default, r=petrochenkov 2021-06-03 14:35:36 +09:00
rustc_save_analysis Merge CrateDisambiguator into StableCrateId 2021-05-30 12:51:34 +02:00
rustc_serialize Remove unused feature gates 2021-05-31 13:55:43 +02:00
rustc_session Auto merge of #85788 - rylev:force-warns, r=nikomatsakis 2021-06-04 13:31:51 +00:00
rustc_span Rollup merge of #85850 - bjorn3:less_feature_gates, r=jyn514 2021-06-04 13:42:54 +09:00
rustc_symbol_mangling Restrict access to crate_name. 2021-06-02 18:35:32 +02:00
rustc_target Rollup merge of #85850 - bjorn3:less_feature_gates, r=jyn514 2021-06-04 13:42:54 +09:00
rustc_trait_selection Restrict access to crate_name. 2021-06-02 18:35:32 +02:00
rustc_traits Auto merge of #83207 - oli-obk:valtree2, r=lcnr 2021-04-02 10:28:12 +00:00
rustc_ty_utils Restrict access to crate_name. 2021-06-02 18:35:32 +02:00
rustc_type_ir Remove unused feature gates 2021-05-31 13:55:43 +02:00
rustc_typeck Rollup merge of #85939 - m-ou-se:fix-remove-ref-macro-invocation, r=estebank 2021-06-05 06:13:39 +09:00