rust/compiler/rustc_builtin_macros/src
Matthias Krüger 82538b72c0
Rollup merge of #118131 - lukas-code:multi-default, r=wesleywiser
improve tool-only help for multiple `#[default]` variants

When defining an enum with multiple `#[default]` variants, we emit a tool-only suggestion for every `#[default]`ed variant to remove all other `#[default]`s. This PR improves the suggestion to correctly handle the cases where one variant has multiple `#[default]`s and where different `#[default]`s have the same span due to macro expansions.

fixes https://github.com/rust-lang/rust/issues/118119
2023-11-23 07:06:30 +01:00
..
assert Add gen blocks to ast and do some broken ast lowering 2023-10-27 13:05:48 +00:00
deriving Rollup merge of #118131 - lukas-code:multi-default, r=wesleywiser 2023-11-23 07:06:30 +01:00
format_foreign Use as_deref in compiler (but only where it makes sense) 2022-11-16 21:58:58 +00:00
alloc_error_handler.rs Format all the let chains in compiler 2023-10-13 08:59:36 +00:00
asm.rs inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
assert.rs Don't escape_debug the condition of assert!. 2023-10-10 09:08:11 +11:00
cfg_accessible.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
cfg_eval.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
cfg.rs rustc: Move features from Session to GlobalCtxt 2023-08-11 16:51:50 +08:00
cmdline_attrs.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
compile_error.rs Use Cow in {D,Subd}iagnosticMessage. 2023-05-29 09:23:43 +10:00
concat_bytes.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
concat_idents.rs refactor: use by-ref TokenTree iterator to avoid a few clones 2023-05-11 21:59:38 -05:00
concat.rs Format all the let chains in compiler 2023-10-13 08:59:36 +00:00
derive.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
edition_panic.rs Remove MacDelimiter. 2023-08-03 09:03:30 +10:00
env.rs Use the correct span when emitting the env! result 2023-11-04 14:04:01 -07:00
errors.rs Only give autofix suggestion when no named args are present 2023-10-05 16:11:31 +02:00
format_foreign.rs inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
format.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
global_allocator.rs Format all the let chains in compiler 2023-10-13 08:59:36 +00:00
lib.rs Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
log_syntax.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
proc_macro_harness.rs rustc: Move features from Session to GlobalCtxt 2023-08-11 16:51:50 +08:00
source_util.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
standard_library_imports.rs rustc: Move features from Session to GlobalCtxt 2023-08-11 16:51:50 +08:00
test_harness.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
test.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
trace_macros.rs Migrate some rustc_builtin_macros to SessionDiagnostic 2023-06-25 01:32:30 +08:00
type_ascribe.rs Add unstable type_ascribe macro 2022-11-19 22:16:42 +01:00
util.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00