summary refs log tree commit diff
path: root/src/test/ui/lint
AgeCommit message (Collapse)AuthorLines
2020-05-27expand unaligned_references testRalf Jung-11/+34
2020-05-25rename lintRalf Jung-40/+40
2020-05-25more test ref-to-packed testsRalf Jung-1/+19
2020-05-25remove some unused types from the testsRalf Jung-7/+2
2020-05-25add a lint against references to packed fieldsRalf Jung-0/+48
2020-05-15Fix {:#?} representation of proc_macro::LiteralDavid Tolnay-1/+1
Before: TokenStream [ Ident { ident: "name", span: #0 bytes(37..41), }, Punct { ch: '=', spacing: Alone, span: #0 bytes(42..43), }, Literal { lit: Lit { kind: Str, symbol: "SNPP", suffix: None }, span: Span { lo: BytePos(44), hi: BytePos(50), ctxt: #0 } }, Punct { ch: ',', spacing: Alone, span: #0 bytes(50..51), }, Ident { ident: "owner", span: #0 bytes(56..61), }, Punct { ch: '=', spacing: Alone, span: #0 bytes(62..63), }, Literal { lit: Lit { kind: Str, symbol: "Canary M Burns", suffix: None }, span: Span { lo: BytePos(64), hi: BytePos(80), ctxt: #0 } }, ] After: TokenStream [ Ident { ident: "name", span: #0 bytes(37..41), }, Punct { ch: '=', spacing: Alone, span: #0 bytes(42..43), }, Literal { kind: Str, symbol: "SNPP", suffix: None, span: #0 bytes(44..50), }, Punct { ch: ',', spacing: Alone, span: #0 bytes(50..51), }, Ident { ident: "owner", span: #0 bytes(56..61), }, Punct { ch: '=', spacing: Alone, span: #0 bytes(62..63), }, Literal { kind: Str, symbol: "Canary M Burns", suffix: None, span: #0 bytes(64..80), }, ]
2020-05-14Rollup merge of #71910 - mibac138:necessary-paren, r=cuviperDylan DPC-0/+23
Fix unused_parens false positive when using binary operations Fixes #71290 r? @cuviper who provided instructions
2020-05-09Rollup merge of #71947 - mibac138:dead-code, r=cramertjDylan DPC-2/+54
Dead-code pass highlights too much of impl functions Fixes #66627. Previous diagnostic: ``` error: method is never used: `unused_impl_fn_3` --> src/main.rs:28:5 | 28 | / fn unused_impl_fn_3( 29 | | var: i32, 30 | | ) { 31 | | println!("bar {}", var); 32 | | } | |_____^ ``` New diagnostic: ``` error: associated function is never used: `unused_impl_fn_3` --> $DIR/lint-dead-code-6.rs:13:8 | LL | fn unused_impl_fn_3( | ^^^^^^^^^^^^^^^^ ``` This makes associated functions in line with free-standing functions.
2020-05-08Fix some tests failing in `--pass check` modeVadim Petrochenkov-5/+5
2020-05-07reword "possible candidate" import suggestionAndy Russell-2/+2
2020-05-06Dead-code pass highlights too much of impl functionsmibac138-2/+54
2020-05-05Ignore SGX on a few ui testsMohsen Zohrevandi-53/+54
2020-05-06Fix unused_parens nested binary op false positivemibac138-0/+5
2020-05-05Update src/test/ui/lint/issue-71290-unused-paren-binop.rsMichael-0/+1
Co-authored-by: Bastian Kauschke <bastian_kauschke@hotmail.de>
2020-05-05Fix unused_parens false positive when using binary operationsmibac138-0/+17
2020-05-03Rollup merge of #71663 - jumbatm:caller-handles-validation-error, r=RalfJungDylan DPC-180/+197
Fix exceeding bitshifts not emitting for assoc. consts (properly this time, I swear!) Fixes #69021 and fixes #71353. As described in https://github.com/rust-lang/rust/issues/71353#issuecomment-617901923, this PR: - adds a variant of `try_validation!` called `try_validation_pat!` that allows specific failures to be turned into validation failures (but returns the rest, unchanged), and - allows `InvalidProgram` to be returned out of validation r? @RalfJung
2020-05-03Implement `confusable_idents` lint.Charles Lew-0/+26
2020-05-01Update stderrs.jumbatm-75/+75
2020-05-01Partially unrevert #70566.jumbatm-111/+128
This partially reverts commit 4b5b6cbe60a8dd1822cfa46c41cf1ad58c113e18, reversing some changes made to 62b362472dbf8bdf43b252ac5ea53b527a8dbee3.
2020-04-26Rollup merge of #70043 - mark-i-m:def-kind-more, r=eddybDylan DPC-8/+8
Add all remaining `DefKind`s. r? @eddyb or @Centril ~~I'm not sure if this is what you were thinking of. There are also a few places where I'm not sure what the correct choice is because I don't fully understand the meaning of some variants.~~ ~~In general, it feels a bit odd to add some of these as `DefKind`s (e.g. `Arm`) because they don't feel like definitions. Are there things that it makes sense not to add?~~
2020-04-24adjust testsRalf Jung-129/+111
2020-04-24Remove redundant `descr`/`descriptive_variant` methods from HIR.Eduard-Mihai Burtescu-8/+8
2020-04-19Rollup merge of #71324 - petrochenkov:passcheck2, r=RalfJungDylan DPC-1/+1
Fix some tests failing in `--pass check` mode r? @RalfJung
2020-04-19Fix some tests failing in `--pass check` modeVadim Petrochenkov-1/+1
2020-04-19test for false "never constructed" warnings for `Self::` variant pathsjakubadamw-1/+21
2020-04-15Update stderrs after rebase.jumbatm-0/+6
2020-04-15Amend exceeding-bitshifts test case for #69021.jumbatm-113/+125
- Change to warnings so that all lints are emitted - Expect build-pass - Change placeholder FIXME to WARN.
2020-04-12Rollup merge of #67766 - sapir:fix-unused-in-or-pattern-warning, r=matthewjasperDylan DPC-18/+172
Fix warning for unused variables in or pattern (issue #67691) Is this a good way to fix it? Also, the tests fail, the "fixed" code output says `{ i, j }` instead of `{ i, j: _ }`, how can I fix that?
2020-04-11rustc: Add a warning count upon completionRoccoDev-15/+51
2020-04-10Replace run-rustfix for issue 67691 test with a FIXMEsapir-93/+9
2020-04-10Replace non-shorthand variables with _, not _varsapir-6/+6
2020-04-10Try to fix warning for unused variables in or patterns, issue #67691sapir-23/+87
2020-04-10Add tests for issue #67691sapir-0/+174
2020-04-09Rollup merge of #70822 - jonas-schievink:curse-of-the-recursion, ↵Mazdak Farrokhzad-0/+18
r=ecstatic-morse Don't lint for self-recursion when the function can diverge Fixes https://github.com/rust-lang/rust/issues/54444
2020-04-07remove false positives of unused_bracesBastian Kauschke-22/+49
2020-04-06Don't lint for self-recursion when the function can divergeJonas Schievink-0/+18
2020-03-31update unused_braces wordingBastian Kauschke-9/+9
2020-03-31add tests for `unused_braces`Bastian Kauschke-0/+101
2020-03-24Rollup merge of #69740 - mark-i-m:describe-it-3, r=eddybMazdak Farrokhzad-8/+8
Replace some desc logic in librustc_lint with article_and_desc r? @eddyb @Centril @matthewjasper Followup to https://github.com/rust-lang/rust/pull/69674 Blocked on #69498
2020-03-23Reword unused variable warningAlex Tokarev-25/+25
2020-03-22the crate and testsmark-2/+2
2020-03-21convert a couple more errorsmark-6/+6
2020-03-18Rollup merge of #69838 - Centril:expand-module, r=petrochenkovMazdak Farrokhzad-0/+20
Expansion-driven outline module parsing After this PR, the parser will not do any conditional compilation or loading of external module files when `mod foo;` is encountered. Instead, the parser only leaves `mod foo;` in place in the AST, with no items filled in. Expansion later kicks in and will load the actual files and do the parsing. This entails that the following is now valid: ```rust #[cfg(FALSE)] mod foo { mod bar { mod baz; // `foo/bar/baz.rs` doesn't exist, but no error! } } ``` Fixes https://github.com/rust-lang/rust/issues/64197. r? @petrochenkov
2020-03-18fix pre-expansion linting infraMazdak Farrokhzad-0/+20
2020-03-17Update tests for erasing regions in typeckMatthew Jasper-8/+8
2020-03-17Rollup merge of #69881 - Centril:fix-69485, r=oli-obkMazdak Farrokhzad-0/+18
VariantSizeDifferences: bail on SizeOverflow Fixes #69485. r? @oli-obk
2020-03-16Rollup merge of #69995 - contrun:add-context-to-literal-overflow, ↵Dylan DPC-6/+60
r=ecstatic-morse Add more context to the literal overflow message related to issue https://github.com/rust-lang/rust/issues/63733
2020-03-15VariantSizeDifferences: bail on SizeOverflowMazdak Farrokhzad-0/+18
2020-03-15Add more context to the literal overflow messageYI-6/+60
2020-03-14Update ui testsGuillaume Gomez-1/+1