about summary refs log tree commit diff
path: root/compiler/rustc_passes/src/errors.rs
AgeCommit message (Collapse)AuthorLines
2022-10-07migrate stability.rs to translateable diagnosticsNathan Stocks-0/+113
2022-10-07migrate the rest of check_attr.rs to translateable diagnosticsNathan Stocks-0/+41
2022-10-07migrate dead.rs to translateable diagnosticsNathan Stocks-1/+8
2022-10-07migrate lang_items.rs to translateable diagnosticsNathan Stocks-0/+74
2022-10-07migrate entry.rs to translateable diagnosticsNathan Stocks-2/+130
2022-10-07migrate naked_functions.rs to translateable diagnosticsNathan Stocks-0/+76
2022-10-07migrate loops.rs to translateable diagnosticsNathan Stocks-2/+119
2022-10-07migrate check_const.rs to translateable diagnosticsNathan Stocks-0/+18
2022-10-07migrate lib_features.rs to translateable diagnosticsNathan Stocks-0/+20
2022-10-07migrate layout_test.rs to translateable diagnosticsNathan Stocks-0/+57
2022-10-07migrate diagnostic_items.rs to translateable diagnosticsNathan Stocks-0/+20
2022-10-07use cherry-picked commit from #100754 to emit note without errorNathan Stocks-1/+4
2022-10-07migrate the rest of weak_lang_items.rs to translateable diagnosticsNathan Stocks-7/+8
2022-10-07resolve merge conflict from cherry-picking ↵Diego de Oliveira-0/+7
6a47326a0452cc8d5cb57676508b5469d648c67f
2022-10-07Migrate InvalidAttrAtCrateLevelrdvdev2-1/+31
Co-authored-by: Nathan Stocks <cleancut@github.com> Co-authored-by: rdvdev2 <rdvdev2@gmail.com>
2022-10-07Migrate derivable diagnostics in check_attr.rsrdvdev2-0/+11
2022-10-07Migrate derivable diagnostics in lang_items.rsrdvdev2-0/+21
2022-10-07Migrate weak_lang_items.rsrdvdev2-0/+17
2022-09-26Rollup merge of #101851 - Xiretza:diagnostic-derive-cleanups, r=davidtwcofee1-dead-2/+2
Clean up (sub)diagnostic derives The biggest chunk of this is unifying the parsing of subdiagnostic attributes (`#[error]`, `#[suggestion(...)]`, `#[label(...)]`, etc) between `Subdiagnostic` and `Diagnostic` type attributes as well as `Diagnostic` field attributes. It also improves a number of proc macro diagnostics. Waiting for #101558.
2022-09-23Rollup merge of #101815 - diegooliveira:master, r=davidtwcoMatthias Krüger-0/+7
Migrated the rustc_passes annotation without effect diagnostic infrastructure Small change to move the validation for annotations to the new diagnostic infrastructure.
2022-09-22Add missing code="" attributes to suggestion subdiagnosticsXiretza-2/+2
2022-09-21FIX - adopt new Diagnostic naming in newly migrated modulesJhonny Bill Mena-1/+1
FIX - ambiguous Diagnostic link in docs UPDATE - rename diagnostic_items to IntoDiagnostic and AddToDiagnostic [Gardening] FIX - formatting via `x fmt` FIX - rebase conflicts. NOTE: Confirm wheather or not we want to handle TargetDataLayoutErrorsWrapper this way DELETE - unneeded allow attributes in Handler method FIX - broken test FIX - Rebase conflict UPDATE - rename residual _SessionDiagnostic and fix LintDiag link
2022-09-21UPDATE - rename SessionSubdiagnostic macro to SubdiagnosticJhonny Bill Mena-2/+2
Also renames: - sym::AddSubdiagnostic to sym:: Subdiagnostic - rustc_diagnostic_item = "AddSubdiagnostic" to rustc_diagnostic_item = "Subdiagnostic"
2022-09-21UPDATE - rename DiagnosticHandler macro to DiagnosticJhonny Bill Mena-52/+52
2022-09-21UPDATE - rename DiagnosticHandler trait to IntoDiagnosticJhonny Bill Mena-52/+52
2022-09-14Migrated the rustc_passes lint for annotations without effect to the new ↵Diego de Oliveira-0/+7
diagnostic infrastructure
2022-09-07ssa: implement `#[collapse_debuginfo]`David Wood-0/+9
Debuginfo line information for macro invocations are collapsed by default - line information are replaced by the line of the outermost expansion site. Using `-Zdebug-macros` disables this behaviour. When the `collapse_debuginfo` feature is enabled, the default behaviour is reversed so that debuginfo is not collapsed by default. In addition, the `#[collapse_debuginfo]` attribute is available and can be applied to macro definitions which will then have their line information collapsed. Signed-off-by: David Wood <david.wood@huawei.com>
2022-08-24translations: rename warn_ to warningLuis Cardoso-8/+8
The macro warn_ was named like that because it the keyword warn is a built-in attribute and at the time this macro was created the word 'warning' was also taken. However it is no longer the case and we can rename warn_ to warning.
2022-08-21Replace #[lint/warning/error] with #[diag]Xiretza-85/+85
2022-08-21Disallow #[primary_span] on LintDiagnosticsXiretza-1/+0
2022-08-03fix tidyyukang-1/+1
2022-08-03check link ordinal make sure target is foreign functionyukang-0/+7
2022-07-27lint: add bad opt access internal lintDavid Wood-0/+18
Some command-line options accessible through `sess.opts` are best accessed through wrapper functions on `Session`, `TyCtxt` or otherwise, rather than through field access on the option struct in the `Session`. Adds a new lint which triggers on those options that should be accessed through a wrapper function so that this is prohibited. Options are annotated with a new attribute `rustc_lint_opt_deny_field_access` which can specify the error message (i.e. "use this other function instead") to be emitted. A simpler alternative would be to simply rename the options in the option type so that it is clear they should not be used, however this doesn't prevent uses, just discourages them. Another alternative would be to make the option fields private, and adding accessor functions on the option types, however the wrapper functions sometimes rely on additional state from `Session` or `TyCtxt` which wouldn't be available in an function on the option type, so the accessor would simply make the field available and its use would be discouraged too. Signed-off-by: David Wood <david.wood@huawei.com>
2022-07-25passes: port more of `check_attr` moduleDavid Wood-1/+266
Signed-off-by: David Wood <david.wood@huawei.com>
2022-07-17rustdoc: extend `#[doc(tuple_variadic)]` to fn pointersMichael Howell-2/+2
The attribute is also renamed `fake_variadic`.
2022-07-15passes: migrate half of `check_attr`David Wood-0/+362
Migrate half of the `rustc_passes::check_attr` diagnostics to using diagnostic derives and being translatable.