about summary refs log tree commit diff
path: root/compiler/rustc_lint/src
AgeCommit message (Collapse)AuthorLines
2023-01-20fix overlapping spans for `explicit_outlives_requirements` in macrosLukas Markeffsky-7/+30
also delete trailing comma if necessary
2023-01-17Stop using `BREAK` & `CONTINUE` in compilerScott McMurray-1/+1
Switching them to `Break(())` and `Continue(())` instead. libs-api would like to remove these constants, so stop using them in compiler to make the removal PR later smaller.
2023-01-17Rollup merge of #104505 - WaffleLapkin:no-double-spaces-in-comments, r=jackh726Matthias Krüger-3/+3
Remove double spaces after dots in comments Most of the comments do not have double spaces, so I assume these are typos.
2023-01-17Rollup merge of #106148 - chenyukang:yukang/fix-105061-unused, r=lcnrDylan DPC-24/+61
Fix unused_parens issue for higher ranked function pointers fixes #105061 r? `@lcnr`
2023-01-17Remove double spaces after dots in commentsMaybe Waffle-3/+3
2023-01-16comments feedbackyukang-24/+28
2023-01-16fix #104440Takayuki Maeda-21/+26
2023-01-15Rollup merge of #106906 - matthiaskrgr:clone, r=NilstriebMatthias Krüger-3/+3
remove redundant clones
2023-01-15remove redundant clonesMatthias Krüger-3/+3
2023-01-15Fix regression in `unused_braces` with macrosclubby789-4/+8
2023-01-14Fix `unused_braces` on generic const expr macro callclubby789-0/+1
2023-01-14fix issues in unused lintyukang-18/+46
2023-01-14fix #105061, Fix unused_parens issue for higher ranked function pointersyukang-1/+6
2023-01-13Check ADT fields for copy implementations considering regionsMichael Goulet-8/+10
2023-01-13Auto merge of #106776 - oli-obk:om_nom_nom_nom_nom, r=cjgillotbors-1/+1
Feed a bunch of queries instead of tracking fields on TyCtxt r? `@cjgillot` pulled out of https://github.com/rust-lang/rust/pull/105462
2023-01-13Auto merge of #101138 - Rejyr:diagnostic-migration-rustc-lint-pt2, r=davidtwcobors-1372/+2236
Migrate `rustc_lint` lint diagnostics Part 2 of [Migrate `rustc_lint` errors to `SessionDiagnostic`](https://github.com/rust-lang/rust/pull/100776) r? `@davidtwco` # TODO - [x] Refactor some lints manually implementing `DecorateLint` to use `Option<Subdiagnostic>`. - [x] Add `#[rustc_lint_diagnostics]` to lint functions in `context.rs`. - [x] Migrate `hidden_unicode_codepoints.rs`. - [x] Migrate `UnsafeCode` in `builtin.rs`. - [x] Migrate the rest of `builtin.rs`.
2023-01-12Feed the `features_query` instead of grabbing it from the session lazilyOli Scherer-1/+1
2023-01-12Mark ZST as FFI-safe if all its fields are PhantomDataArthur Carcano-23/+23
Modify the linting behavior and add the corresponding regression test
2023-01-11Auto merge of #105919 - uweigand:s390x-stack-overflow, r=Nilstriebbors-1/+2
Fix stack overflow in recursive AST walk in early lint The src/test/ui/issues/issue-74564-if-expr-stack-overflow.rs test case added to verify https://github.com/rust-lang/rust/issues/74564 still crashes with a stack overflow on s390x-ibm-linux. Symptom is a very deep recursion in compiler/rustc_lint/src/early.rs: fn visit_expr(&mut self, e: &'a ast::Expr) { self.with_lint_attrs(e.id, &e.attrs, |cx| { lint_callback!(cx, check_expr, e); ast_visit::walk_expr(cx, e); }) } (where walk_expr recursively calls back into visit_expr). The crash happens at a nesting depth of over 17000 stack frames when using the default 8 MB stack size on s390x. This patch fixes the problem by adding a ensure_sufficient_stack call to the with_lint_attrs routine (which also should take care of all the other mutually recursive visitors here). Fixes part of https://github.com/rust-lang/rust/issues/105383.
2023-01-09refactor: cleanupRejyr-49/+3
2023-01-09migrate: `deref_into_dyn_supertrait.rs`Rejyr-18/+30
2023-01-09add: allow lints in `lints.rs`Rejyr-0/+2
2023-01-09migrate: rest of `builtin.rs` without `builtin_asm_labels`Rejyr-183/+353
2023-01-09migrate: `UnsafeCode` in `builtin.rs`Rejyr-83/+63
2023-01-09migrate: `hidden_unicode_codepoints.rs`Rejyr-50/+107
2023-01-09add: `#[rustc_lint_diagnostics]` for more `context.rs` functions.Rejyr-0/+5
2023-01-09refactor: refactor to derive for some lints.Rejyr-139/+96
2023-01-09migrate: `for_loops_over_fallibles.rs`Rejyr-46/+78
2023-01-09migrate: `expect.rs`Rejyr-30/+41
2023-01-09migrate(wip): `builtin.rs`Rejyr-229/+376
2023-01-09migrate: `internal.rs`Rejyr-76/+97
2023-01-09migrate: `ImproperCTypes`Rejyr-29/+55
2023-01-09migrate: `let_underscore.rs`Rejyr-33/+62
fix: NonBindingLetSub
2023-01-09migrate: `levels.rs`Rejyr-107/+116
2023-01-09add: `emit{,_spanned}_lint` for `LintLevelsBuilder`Rejyr-19/+39
add: `emit_spanned_lint` and `emit_lint` for `LintLevelsBuilder` migrate: `DeprecatedLintName`
2023-01-09refactor: comment about lint locationRejyr-0/+13
2023-01-09fix: merge conflictRejyr-29/+55
2023-01-09update: `lints.rs` for renamed traitsRejyr-11/+23
update: `lints.rs` for renamed `SessionSubdiagnostic` and `AddSubdiagnostic` fix: NonSnakeCaseDiagSub fix: OverflowingBinHexSign
2023-01-09add: `lints` for `errors.rs`Rejyr-1/+3
2023-01-09migrate: `early.rs` and `enum_intrinsics_non_enums.rs`Rejyr-8/+30
2023-01-09migrate: `array_into_iter.rs`Rejyr-39/+45
2023-01-09migrate: `methods.rs`Rejyr-9/+15
2023-01-09migrate: `non_ascii_idents.rs`Rejyr-35/+49
2023-01-09migrate: `non_fmt_panic.rs`Rejyr-33/+53
2023-01-09migrate: `nonstandard_style.rs`Rejyr-81/+156
2023-01-09migrate: `noop_method_call.rs`Rejyr-7/+19
2023-01-09migrate: `pass_by_value.rs`Rejyr-13/+14
2023-01-09migrate: `redundant_semicolon.rs`Rejyr-12/+13
2023-01-09migrate: `traits.rs`Rejyr-16/+41
2023-01-09migrate: `unused.rs`Rejyr-103/+201