about summary refs log tree commit diff
path: root/src/librustc_lint
AgeCommit message (Collapse)AuthorLines
2020-05-04Rollup merge of #71773 - tshepang:links, r=davidtwcoDylan DPC-3/+3
doc: misc rustdoc things
2020-05-03Rollup merge of #71542 - crlf0710:confusable_idents, r=petrochenkovDylan DPC-3/+147
Implement `confusable_idents` lint. This collects all identifier symbols into `ParseSession` and examines them within the non-ascii-idents lint. The skeleton generation part needs to be added to `unicode-security` crate. Will update this PR when the crate is updated. r? @petrochenkov EDIT: also included the `concat_idents` part.
2020-05-03Add a fast code path to optimize `confusable_idents` lint for ASCII code base.Charles Lew-4/+49
2020-05-03Implement `confusable_idents` lint.Charles Lew-3/+102
2020-05-02fix rustdoc warningsTshepang Lekhonkhobe-2/+2
2020-05-01doc: misc rustdoc thingsTshepang Lekhonkhobe-3/+3
2020-04-28Use the query system to allocate.Camille GILLOT-2/+2
2020-04-27Accept `LocalDefId` as key for `lint_mod` querymarmeladema-7/+3
2020-04-24Quick and dirty fix of the unused_braces lintflip1995-1/+7
Adresses #70814
2020-04-23Address comments from reviewmarmeladema-7/+4
2020-04-23Modify `as_local_hir_id` to return a bare `HirId`marmeladema-8/+5
2020-04-23Modify `as_local_hir_id` to accept a `LocalDefId` instead of a `DefId`marmeladema-6/+17
2020-04-23librustc_middle: return LocalDefId instead of DefId in local_def_idmarmeladema-4/+5
2020-04-23Rollup merge of #71408 - GuillaumeGomez:check-code-blocks-tags, r=kinnisonDylan DPC-1/+3
Check code blocks tags Fixes #71347. Explanations here: I realized recently that it was a common issue to confuse/misspell tags on code blocks. This is actually quite a big issue since it generally ends up in a code blocks being ignored since it's not being considered as a rust one. With this new warning, users will at least be notified about it. PS: some improvements can be done on the error rendering but considering how big the PR already is, I think it's better to do it afterwards. r? @ollie27 cc @rust-lang/rustdoc
2020-04-23Create new rustdoc lint to check for code blocks tagsGuillaume Gomez-1/+3
2020-04-22Rollup merge of #71412 - dtolnay:uselessdoc, r=ManishearthDylan DPC-1/+1
Clarify unused_doc_comments note on macro invocations The previous error message used to say: <pre> /// doc ^^^^^^^ rustdoc does not generate documentation for <b>macros</b> </pre> Obviously we do generate documentation for macros, such as https://docs.rs/bitflags/1.2.1/bitflags/macro.bitflags.html. It's only macro invocations that don't get their own docs. This PR updates the message to say "rustdoc does not generate documentation for <b>macro invocations</b>". I observe that prior to #69084 this used to say "rustdoc does not generate documentation for **macro expansions**", as implemented originally in #57882. I don't have a preference between those but I made the commit before looking up the history. r? @Manishearth attn: @yaahc @euclio
2020-04-21Clarify unused_doc_comments note on macro invocationsDavid Tolnay-1/+1
2020-04-20Remove unused dependenciesShotaro Yamada-1/+0
2020-04-19Dogfood more or_patterns in the compilerJosh Stone-10/+11
2020-04-14cleanup `is_expr_delims_necessary`Bastian Kauschke-1/+1
2020-04-13Remove usage of `DUMMY_HIR_ID` in some visitorsmarmeladema-9/+9
2020-04-10librustc_middle: return LocalDefId instead of DefId in body_owner_def_idmarmeladema-1/+1
2020-04-07remove false positives of unused_bracesBastian Kauschke-3/+23
2020-04-06ty: switch `Ty::walk` from `Ty` to `GenericArg`.Eduard-Mihai Burtescu-5/+8
2020-04-05Stop importing int/float modules in librustc_*Linus Färnstrand-1/+0
2020-04-02nix rustc_target::abi::* reexport in ty::layoutMazdak Farrokhzad-6/+9
2020-04-01Rollup merge of #70081 - lcnr:issue68387, r=varkorDylan DPC-129/+371
add `unused_braces` lint Add the lint `unused_braces` which is warn by default. `unused_parens` is also extended and now checks anon consts. closes #68387 r? @varkor
2020-03-31update unused_braces wordingBastian Kauschke-12/+11
2020-03-30Use if let instead of match when only matching a single variant ↵Matthias Krüger-58/+41
(clippy::single_match) Makes code more compact and reduces nestig.
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-12/+12
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-37/+36
2020-03-30rustc -> rustc_middle part 1Mazdak Farrokhzad-2/+2
2020-03-27add `unused_braces`, lint anon_constBastian Kauschke-129/+366
2020-03-27add visit_anon_const to EarlyContextAndPassBastian Kauschke-0/+6
2020-03-27Rename TyLayout to TyAndLayout.Ana-Maria Mihalache-3/+3
2020-03-25Rename `def_span` to `guess_head_span`Esteban Küber-6/+10
2020-03-24Rollup merge of #69740 - mark-i-m:describe-it-3, r=eddybMazdak Farrokhzad-33/+37
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-22the crate and testsmark-1/+1
2020-03-21use static strsmark-14/+18
2020-03-21convert a couple more errorsmark-13/+6
2020-03-21replace some adhoc logic with article_and_descrMark Mansi-19/+26
2020-03-21{rustc::hir::map -> rustc_hir}::definitionsMazdak Farrokhzad-1/+1
2020-03-21add_elided_lifetime_in_path_suggestion -> rustc_sessionMazdak Farrokhzad-2/+1
2020-03-20remove redundant returns (clippy::needless_return)Matthias Krüger-2/+2
2020-03-20remove redundant import (clippy::single_component_path_imports)Matthias Krüger-2/+0
remove redundant format!() call (clippy::useless_format) don't use ok() before calling expect() (clippy::ok_expect)
2020-03-19rustc: use LocalDefId instead of DefIndex in HirId.Eduard-Mihai Burtescu-2/+2
2020-03-18Rollup merge of #69920 - Centril:hir-cleanup, r=ZoxcMazdak Farrokhzad-2/+1
Remove some imports to the rustc crate - When we have `NestedVisitorMap::None`, we use `type Map = dyn intravisit::Map<'v>;` instead of the actual map. This doesn't actually result in dynamic dispatch (in the future we may want to use an associated type default to simplify the code). - Use `rustc_session::` imports instead of `rustc::{session, lint}`. r? @Zoxc
2020-03-18fix pre-expansion linting infraMazdak Farrokhzad-13/+5
2020-03-17Rollup merge of #70049 - oli-obk:param_env_empty_considered_unimplemented, ↵Mazdak Farrokhzad-1/+6
r=eddyb Fiddle `ParamEnv` through to a place that used to use `ParamEnv::empty` in a buggy manner cc https://github.com/rust-lang/rust/pull/69981#discussion_r393048924 r? @eddyb
2020-03-17Rollup merge of #69881 - Centril:fix-69485, r=oli-obkMazdak Farrokhzad-4/+2
VariantSizeDifferences: bail on SizeOverflow Fixes #69485. r? @oli-obk