rust/compiler
Matthias Krüger 1a6ed3050f
Rollup merge of #103439 - Nilstrieb:help-me-with-my-macro, r=estebank
Show note where the macro failed to match

When feeding the wrong tokens, it used to fail with a very generic error that wasn't very helpful. This change tries to help by noting where specifically the matching went wrong.

```rust
macro_rules! uwu {
    (a a a b) => {};
}
uwu! { a a a c }
```

```diff
error: no rules expected the token `c`
 --> macros.rs:5:14
  |
1 | macro_rules! uwu {
  | ---------------- when calling this macro
...
4 | uwu! { a a a c }
  |              ^ no rules expected this token in macro call
  |
+note: while trying to match `b`
+ --> macros.rs:2:12
+  |
+2 |     (a a a b) => {};
+  |            ^
```
2022-11-15 10:44:07 +01:00
..
rustc rustc: Use unix_sigpipe instead of rustc_driver::set_sigpipe_handler 2022-10-02 17:49:36 +02:00
rustc_apfloat
rustc_arena Make use of [wrapping_]byte_{add,sub} 2022-08-23 19:32:37 +04:00
rustc_ast Rollup merge of #104391 - nnethercote:deriving-cleanups, r=jackh726 2022-11-15 01:40:44 +01:00
rustc_ast_lowering Introduce ExprKind::IncludedBytes 2022-11-11 16:31:32 +00:00
rustc_ast_passes Rollup merge of #95710 - fee1-dead-contrib:stabilize_arbitrary_enum_discriminant, r=joshtriplett 2022-10-26 17:32:53 +05:30
rustc_ast_pretty Introduce ExprKind::IncludedBytes 2022-11-11 16:31:32 +00:00
rustc_attr Migrate all diagnostics 2022-10-23 10:09:44 +02:00
rustc_borrowck Rollup merge of #103960 - AndyJado:var_path_only_diag, r=davidtwco 2022-11-11 12:12:30 -05:00
rustc_builtin_macros Rollup merge of #104391 - nnethercote:deriving-cleanups, r=jackh726 2022-11-15 01:40:44 +01:00
rustc_codegen_cranelift add is_sized method on Abi and Layout, and use it 2022-11-13 12:23:53 +01:00
rustc_codegen_gcc add is_sized method on Abi and Layout, and use it 2022-11-13 12:23:53 +01:00
rustc_codegen_llvm Rollup merge of #104105 - davidtwco:split-dwarf-lto, r=michaelwoerister 2022-11-13 21:49:25 -05:00
rustc_codegen_ssa Auto merge of #104091 - BelovDV:issue-103044, r=petrochenkov 2022-11-15 00:38:08 +00:00
rustc_const_eval Rollup merge of #104356 - RalfJung:interpret-check-mplace, r=oli-obk 2022-11-14 19:26:18 +01:00
rustc_data_structures Use the interned stable hash as plain hash. 2022-11-11 13:02:37 +00:00
rustc_driver Rollup merge of #104184 - jyn514:rustdoc-version, r=davidtwco 2022-11-09 15:39:07 -05:00
rustc_error_codes Rollup merge of #103924 - PeteDevoy:patch-1, r=estebank 2022-11-11 20:51:39 +05:30
rustc_error_messages Auto merge of #104418 - matthiaskrgr:rollup-y4i6xjc, r=matthiaskrgr 2022-11-15 03:37:07 +00:00
rustc_errors Rollup merge of #104229 - compiler-errors:overlap-full-path, r=davidtwco 2022-11-14 19:26:16 +01:00
rustc_expand Rollup merge of #103439 - Nilstrieb:help-me-with-my-macro, r=estebank 2022-11-15 10:44:07 +01:00
rustc_feature Rollup merge of #104349 - rustaceanclub:master, r=oli-obk 2022-11-14 19:26:18 +01:00
rustc_fs_util
rustc_graphviz
rustc_hir Some tracing and comment cleanups 2022-11-04 17:10:07 +00:00
rustc_hir_analysis Auto merge of #104310 - Dylan-DPC:rollup-wgt1z4a, r=Dylan-DPC 2022-11-12 08:03:01 +00:00
rustc_hir_pretty pretty: fix to print some lifetimes on HIR pretty-print 2022-10-15 23:34:21 +09:00
rustc_hir_typeck Auto merge of #104428 - matthiaskrgr:rollup-jo3078i, r=matthiaskrgr 2022-11-15 06:43:28 +00:00
rustc_incremental Rename some OwnerId fields. 2022-10-29 20:28:38 +11:00
rustc_index Remove from compiler/ crates 2022-09-29 16:49:04 +09:00
rustc_infer Rollup merge of #104206 - compiler-errors:ocx-more-2, r=lcnr 2022-11-12 12:02:52 +05:30
rustc_interface Fix rustdoc --version when used with download-rustc 2022-11-09 02:54:51 -06:00
rustc_lexer Rollup merge of #103919 - nnethercote:unescaping-cleanups, r=matklad 2022-11-09 19:21:22 +05:30
rustc_lint Auto merge of #104428 - matthiaskrgr:rollup-jo3078i, r=matthiaskrgr 2022-11-15 06:43:28 +00:00
rustc_lint_defs Make PROC_MACRO_DERIVE_RESOLUTION_FALLBACK a hard error 2022-10-24 13:40:07 -05:00
rustc_llvm [llvm-wrapper] adapt for LLVM API change 2022-11-14 14:59:32 +00:00
rustc_log
rustc_macros Modify comment syntax error 2022-11-07 14:33:33 +08:00
rustc_metadata Wrap bundlen static libraries into object files 2022-11-14 12:01:49 +03:00
rustc_middle Rollup merge of #104378 - compiler-errors:chalk-up, r=jackh726 2022-11-14 19:26:19 +01:00
rustc_mir_build Rollup merge of #104349 - rustaceanclub:master, r=oli-obk 2022-11-14 19:26:18 +01:00
rustc_mir_dataflow Some tracing and comment cleanups 2022-11-04 17:10:07 +00:00
rustc_mir_transform add is_sized method on Abi and Layout, and use it 2022-11-13 12:23:53 +01:00
rustc_monomorphize Fix ICE when negative impl is collected during eager mono 2022-11-04 03:08:28 +00:00
rustc_parse Rollup merge of #104223 - fmease:recover-fn-ptr-with-generics, r=estebank 2022-11-14 19:26:16 +01:00
rustc_parse_format Fix rustc_parse_format spans following escaped utf-8 multibyte chars 2022-10-27 18:20:56 +00:00
rustc_passes Rollup merge of #104320 - fee1-dead-contrib:use-derive-const-in-std, r=oli-obk 2022-11-13 17:37:37 +01:00
rustc_plugin_impl Migrate all diagnostics 2022-10-23 10:09:44 +02:00
rustc_privacy privacy: Check effective visibility invariants 2022-11-05 16:25:41 +04:00
rustc_query_impl Make AbsoluteBytePos a u64. 2022-11-08 18:47:26 +00:00
rustc_query_system Hash spans when interning. 2022-11-11 13:02:37 +00:00
rustc_resolve Rollup merge of #104364 - petrochenkov:docice2, r=GuillaumeGomez 2022-11-14 19:26:19 +01:00
rustc_save_analysis Rename some OwnerId fields. 2022-10-29 20:28:38 +11:00
rustc_serialize rustdoc: use ThinVec for cleaned generics 2022-11-02 16:17:22 -07:00
rustc_session Add --print=split-debuginfo 2022-11-07 16:11:32 +01:00
rustc_smir Only keep one version of ImplicitSelfKind. 2022-09-13 19:18:23 +02:00
rustc_span Rollup merge of #104383 - WaffleLapkin:rustc_undiagnostic_item, r=compiler-errors 2022-11-15 01:40:44 +01:00
rustc_symbol_mangling Add an optional Span to BrAnon and use it to print better error for HRTB error from generator interior 2022-11-07 17:39:29 -05:00
rustc_target Rollup merge of #104349 - rustaceanclub:master, r=oli-obk 2022-11-14 19:26:18 +01:00
rustc_trait_selection Auto merge of #104428 - matthiaskrgr:rollup-jo3078i, r=matthiaskrgr 2022-11-15 06:43:28 +00:00
rustc_traits Make rustc build with new chalk 2022-11-13 19:53:44 +00:00
rustc_transmute Auto merge of #103831 - chenyukang:yukang/fix-103751-ice, r=nagisa 2022-11-05 13:48:30 +00:00
rustc_ty_utils add is_sized method on Abi and Layout, and use it 2022-11-13 12:23:53 +01:00
rustc_type_ir deprecate DelaySpanBugEmitted and use ErrorGuaranteed directly 2022-11-02 23:15:49 +08:00