rust/compiler
Manish Goregaokar 000dbd27f1
Rollup merge of #86165 - m-ou-se:proc-macro-span-shrink, r=dtolnay
Add proc_macro::Span::{before, after}.

This adds `proc_macro::Span::before()` and `proc_macro::Span::after()` to get a zero width span at the start or end of the span.

These are equivalent to rustc's `Span::shrink_to_lo()` and `Span::shrink_to_hi()` but with a less cryptic name. They are useful when generating diagnostlics like "missing \<thing\> after \<thing\>".

E.g.

```rust
syn::Error::new(ident.span().after(), "missing `:` after field name").into_compile_error()
```
2021-09-10 08:23:14 -07:00
..
rustc
rustc_apfloat
rustc_arena
rustc_ast Bump stage0 compiler to 1.56 2021-09-08 20:51:05 -04:00
rustc_ast_lowering Change is_unsized to add_implicitly_sized 2021-09-07 18:08:46 -04:00
rustc_ast_passes Bump stage0 compiler to 1.56 2021-09-08 20:51:05 -04:00
rustc_ast_pretty Add let-else to AST 2021-08-30 20:17:45 -05:00
rustc_attr
rustc_borrowck Rebase fallout. 2021-09-08 20:40:30 +02:00
rustc_builtin_macros Auto merge of #88598 - estebank:type-ascription-can-die-in-a-fire, r=wesleywiser 2021-09-04 01:40:36 +00:00
rustc_codegen_cranelift Move the dataflow framework to its own crate. 2021-09-07 19:57:07 +02:00
rustc_codegen_llvm Auto merge of #88499 - eddyb:layout-off, r=nagisa 2021-09-05 16:14:41 +00:00
rustc_codegen_ssa Auto merge of #88161 - michaelwoerister:fix-whole-archive-no-bundle, r=petrochenkov 2021-09-07 12:31:11 +00:00
rustc_const_eval Bump stage0 compiler to 1.56 2021-09-08 20:51:05 -04:00
rustc_data_structures Bump stage0 compiler to 1.56 2021-09-08 20:51:05 -04:00
rustc_driver Rename rustc_mir to rustc_const_eval. 2021-09-07 20:46:26 +02:00
rustc_error_codes Update E0785.md 2021-08-30 22:18:55 -07:00
rustc_errors Bump stage0 compiler to 1.56 2021-09-08 20:51:05 -04:00
rustc_expand Rollup merge of #86165 - m-ou-se:proc-macro-span-shrink, r=dtolnay 2021-09-10 08:23:14 -07:00
rustc_feature Ignore automatically derived impls of Clone and Debug in dead code analysis 2021-09-09 19:49:07 +02:00
rustc_fs_util
rustc_graphviz
rustc_hir Don't move ?Trait bounds to param bounds if they're in where clauses 2021-09-07 18:08:46 -04:00
rustc_hir_pretty Don't move ?Trait bounds to param bounds if they're in where clauses 2021-09-07 18:08:46 -04:00
rustc_incremental Auto merge of #83214 - cjgillot:dep-map, r=michaelwoerister 2021-09-06 23:58:16 +00:00
rustc_index
rustc_infer Use index newtyping for TyVid 2021-09-06 22:38:06 -04:00
rustc_interface Rename rustc_mir to rustc_const_eval. 2021-09-07 20:46:26 +02:00
rustc_lexer
rustc_lint Auto merge of #88435 - cjgillot:no-walk-crate, r=Aaron1011 2021-09-05 21:40:34 +00:00
rustc_lint_defs
rustc_llvm
rustc_macros
rustc_metadata Auto merge of #88538 - bjorn3:no_session_in_crate_loader, r=petrochenkov 2021-09-04 07:17:12 +00:00
rustc_middle Ignore automatically derived impls of Clone and Debug in dead code analysis 2021-09-09 19:49:07 +02:00
rustc_mir_build Ignore automatically derived impls of Clone and Debug in dead code analysis 2021-09-09 19:49:07 +02:00
rustc_mir_dataflow Rebase fallout. 2021-09-08 20:40:30 +02:00
rustc_mir_transform Ignore automatically derived impls of Clone and Debug in dead code analysis 2021-09-09 19:49:07 +02:00
rustc_monomorphize Rebase fallout. 2021-09-08 20:40:30 +02:00
rustc_parse Bump stage0 compiler to 1.56 2021-09-08 20:51:05 -04:00
rustc_parse_format
rustc_passes Ignore automatically derived impls of Clone and Debug in dead code analysis 2021-09-09 19:49:07 +02:00
rustc_plugin_impl
rustc_privacy Rename walk_crate. 2021-09-02 19:23:11 +02:00
rustc_query_impl Auto merge of #83214 - cjgillot:dep-map, r=michaelwoerister 2021-09-06 23:58:16 +00:00
rustc_query_system Remove redundant Span in QueryJobInfo 2021-09-01 11:10:58 -07:00
rustc_resolve Move confused_type_with_std_module to ResolverOutputs 2021-09-06 11:20:59 -05:00
rustc_save_analysis Bump stage0 compiler to 1.56 2021-09-08 20:51:05 -04:00
rustc_serialize
rustc_session Revert "Remove optimization_fuel_crate from Session" 2021-09-08 17:36:41 +02:00
rustc_span Ignore automatically derived impls of Clone and Debug in dead code analysis 2021-09-09 19:49:07 +02:00
rustc_symbol_mangling
rustc_target Auto merge of #88499 - eddyb:layout-off, r=nagisa 2021-09-05 16:14:41 +00:00
rustc_trait_selection Use index newtyping for TyVid 2021-09-06 22:38:06 -04:00
rustc_traits
rustc_ty_utils
rustc_type_ir Use index newtyping for TyVid 2021-09-06 22:38:06 -04:00
rustc_typeck Bump stage0 compiler to 1.56 2021-09-08 20:51:05 -04:00