about summary refs log tree commit diff
path: root/src/tools/clippy/clippy_lints
AgeCommit message (Collapse)AuthorLines
2020-07-31Rename HAIR to THIR (Typed HIR).Valentin Lazureanu-1/+1
2020-07-27clippyBastian Kauschke-5/+5
2020-07-27introduce PredicateAtomBastian Kauschke-5/+5
2020-07-27this might be unqualified, but at least it's now quantifiedBastian Kauschke-3/+3
2020-07-27clippyBastian Kauschke-22/+22
2020-07-26Merge commit 'da5a6fb1b65ec6581a67e942a3850f6bc15a552c' into clippyupflip1995-140/+404
2020-07-20trait_sel: only test predicates w/ no substsDavid Wood-1/+1
This commit modifies the `substitute_normalize_and_test_predicates` query, renaming it to `impossible_predicates` and only checking predicates which do not require substs. By making this change, polymorphization doesn't have to explicitly support vtables. Signed-off-by: David Wood <david@davidtw.co>
2020-07-17Rename TypeckTables to TypeckResults.Valentin Lazureanu-416/+463
2020-07-17Avoid storing `SymbolStr` in a struct.Nicholas Nethercote-8/+9
It's intended only for very temporary use.
2020-07-15WithOptConstParam::dummy -> WithOptConstParam::unknownBastian Kauschke-1/+1
2020-07-15improve namingBastian Kauschke-1/+1
2020-07-15const_eval_resolveBastian Kauschke-1/+1
2020-07-15Remove lots of `Symbol::as_str()` calls.Nicholas Nethercote-1/+5
In various ways, such as changing functions to take a `Symbol` instead of a `&str`.
2020-07-14Merge commit '2ca58e7dda4a9eb142599638c59dc04d15961175' into clippyupflip1995-876/+1948
2020-07-10Avoid "whitelist"Tamir Duberstein-18/+18
Other terms are more inclusive and precise.
2020-07-07Auto merge of #74117 - Manishearth:rollup-ds7z0kx, r=Manishearthbors-1/+1
Rollup of 14 pull requests Successful merges: - #70563 ([rustdoc] Page hash handling) - #73856 (Edit librustc_lexer top-level docs) - #73870 (typeck: adding type information to projection) - #73953 (Audit hidden/short code suggestions) - #73962 (libstd/net/tcp.rs: #![deny(unsafe_op_in_unsafe_fn)]) - #73969 (mir: mark mir construction temporaries as internal) - #73974 (Move A|Rc::as_ptr from feature(weak_into_raw) to feature(rc_as_ptr)) - #74067 (rustdoc: Restore underline text decoration on hover for FQN in header) - #74074 (Fix the return type of Windows' `OpenOptionsExt::security_qos_flags`.) - #74078 (Always resolve type@primitive as a primitive, not a module) - #74089 (Add rust-analyzer to the build manifest) - #74090 (Remove unused RUSTC_DEBUG_ASSERTIONS) - #74102 (Fix const prop ICE) - #74112 (Expand abbreviation in core::ffi description) Failed merges: r? @ghost
2020-07-06Rollup merge of #73870 - sexxi-goose:projection-ty, r=nikomatsakisManish Goregaokar-1/+1
typeck: adding type information to projection This commit modifies the Place as follow: * remove 'ty' from ProjectionKind * add type information into to Projection * replace 'ty' in Place with 'base_ty' * introduce 'ty()' in `Place` to return the final type of the `Place` * introduce `ty_before_projection()` in `Place` to return the type of a `Place` before i'th projection is applied Closes https://github.com/rust-lang/project-rfc-2229/issues/5
2020-07-06Auto merge of #73978 - Mark-Simulacrum:shrink-paramenv, r=nnethercotebors-1/+1
Shrink ParamEnv to 16 bytes r? @nnethercote x.py check passes but I haven't tried running perf or tests
2020-07-05Shrink ParamEnv to 16 bytesMark Rousskov-1/+1
2020-07-03Use 'tcx for references to AccessLevels wherever possible.Eduard-Mihai Burtescu-1029/+954
2020-07-02rustc_lint: avoid using TypeckTables::empty for LateContext.Eduard-Mihai Burtescu-69/+70
2020-06-29typeck: adding type information to projectionAzhng-1/+1
This commit modifies the Place as follow: * remove 'ty' from ProjectionKind * add type information into to Projection * replace 'ty' in Place with 'base_ty' * introduce 'ty()' in `Place` to return the final type of the `Place` * introduce `ty_before_projection()` in `Place` to return the type of a `Place` before i'th projection is applied Closes https://github.com/rust-lang/project-rfc-2229/issues/5
2020-06-26Auto merge of #73756 - Manishearth:rollup-aehswb2, r=Manishearthbors-1/+1
Rollup of 13 pull requests Successful merges: - #72620 (Omit DW_AT_linkage_name when it is the same as DW_AT_name) - #72967 (Don't move cursor in search box when using arrows to navigate results) - #73102 (proc_macro: Stop flattening groups with dummy spans) - #73297 (Support configurable deny-warnings for all in-tree crates.) - #73507 (Cleanup MinGW LLVM linkage workaround) - #73588 (Fix handling of reserved registers for ARM inline asm) - #73597 (Record span of `const` kw in GenericParamKind) - #73629 (Make AssocOp Copy) - #73681 (Update Chalk to 0.14) - #73707 (Fix links in `SliceIndex` documentation) - #73719 (emitter: column width defaults to 140) - #73729 (disable collectionbenches for android) - #73748 (Add code block to code in documentation of `List::rebase_onto`) Failed merges: r? @ghost
2020-06-26Rollup merge of #73597 - ayazhafiz:i/const-span, r=ecstatic-morseManish Goregaokar-1/+1
Record span of `const` kw in GenericParamKind Context: this is needed for a fix of https://github.com/rust-lang/rustfmt/issues/4263, which currently records the span of a const generic param incorrectly because the location of the `const` kw is not known. I am not sure how to add tests for this; any guidance in how to do so would be appreciated :slightly_smiling_face:
2020-06-26rustc_lint: only query `typeck_tables_of` when a lint needs it.Eduard-Mihai Burtescu-358/+353
2020-06-23Record span of `const` kw in GenericParamKindAyaz Hafiz-1/+1
Context: this is needed to fix https://github.com/rust-lang/rustfmt/issues/4263, which currently records the span of a const generic param incorrectly because the location of the `const` kw is not known. I am not sure how to add tests for this; any guidance in how to do so would be appreciated :slightly_smiling_face:
2020-06-23Merge commit 'c2c07fa9d095931eb5684a42942a7b573a0c5238' into clippyupflip1995-179/+374
2020-06-21Make is_freeze and is_copy_modulo_regions take TyCtxtAtRalf Jung-7/+6
2020-06-18Refactor hir::PlaceAman Arora-36/+38
For the following code ```rust let c = || bar(foo.x, foo.x) ``` We generate two different `hir::Place`s for both `foo.x`. Handling this adds overhead for analysis we need to do for RFC 2229. We also want to store type information at each Projection to support analysis as part of the RFC. This resembles what we have for `mir::Place` This commit modifies the Place as follows: - Rename to `PlaceWithHirId`, where there `hir_id` is that of the expressioin. - Move any other information that describes the access out to another struct now called `Place`. - Removed `Span`, it can be accessed using the [hir API](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/hir/map/struct.Map.html#method.span) - Modify `Projection` to be a strucutre of its own, that currently only contains the `ProjectionKind`. Adding type information to projections wil be completed as part of https://github.com/rust-lang/project-rfc-2229/issues/5 Closes https://github.com/rust-lang/project-rfc-2229/issues/3 Co-authored-by: Aman Arora <me@aman-arora.com> Co-authored-by: Roxane Fruytier <roxane.fruytier@hotmail.com>
2020-06-15Rollup merge of #72938 - lzutao:stabilize_option_zip, r=dtolnayRalf Jung-10/+5
Stabilize Option::zip This PR stabilizes the following API: ```rust impl<T> Option<T> { pub fn zip<U>(self, other: Option<U>) -> Option<(T, U)>; } ``` This API has real world usage as seen in <https://grep.app/search?q=-%3E%20Option%3C%5C%28T%2C%5Cs%3FU%5C%29%3E&regexp=true&filter[lang][0]=Rust>. The `zip_with` method is left unstably as this API is kinda niche and it hasn't received much usage in Rust repositories on GitHub. cc #70086
2020-06-15Auto merge of #72080 - matthewjasper:uniform-impl-trait, r=nikomatsakisbors-6/+4
Clean up type alias impl trait implementation - Removes special case for top-level impl trait - Removes associated opaque types - Forbid lifetime elision in let position impl trait. This is consistent with the behavior for inferred types. - Handle lifetimes in type alias impl trait more uniformly with other parameters cc #69323 cc #63063 Closes #57188 Closes #62988 Closes #69136 Closes #73061
2020-06-13Stabilize Option::zipLzu Tao-10/+5
2020-06-12Rollup merge of #72906 - lzutao:migrate-numeric-assoc-consts, r=dtolnayDylan DPC-32/+32
Migrate to numeric associated consts The deprecation PR is #72885 cc #68490 cc rust-lang/rfcs#2700
2020-06-11Remove ImplItemKind::OpaqueTy from clippyMatthew Jasper-3/+1
2020-06-11Remove associated opaque typesMatthew Jasper-3/+3
They're unused now.
2020-06-10Clippy fixesAaron Hill-5/+5
2020-06-10Update Clippy for MethodCall changesAaron Hill-89/+89
2020-06-10Migrate to numeric associated constsLzu Tao-32/+32
2020-06-09Merge commit 'ff0993c5e9162ddaea78e83d0f0161e68bd4ea73' into clippyLzu Tao-445/+2255
2020-06-06Rollup merge of #72508 - ecstatic-morse:poly-self-ty, r=nikomatsakisRalf Jung-1/+1
Make `PolyTraitRef::self_ty` return `Binder<Ty>` This came up during review of #71618. The current implementation is the same as a call to `skip_binder` but harder to audit. Make it preserve binding levels and add a call to `skip_binder` at all use sites so they can be audited as part of #72507.
2020-06-06Auto merge of #72927 - petrochenkov:rustc, r=Mark-Simulacrumbors-3/+3
Rename all remaining compiler crates to use the `rustc_foo` pattern libarena -> librustc_arena libfmt_macros -> librustc_parse_format libgraphviz -> librustc_graphviz libserialize -> librustc_serialize Closes https://github.com/rust-lang/rust/issues/71177 in particular.
2020-06-03Bump to 1.46Mark Rousskov-4/+4
2020-06-03Update fulldeps tests and clippyVadim Petrochenkov-2/+2
2020-06-02Rename the crates in source codeVadim Petrochenkov-1/+1
2020-06-01Call `skip_binder` or `no_bound_vars` before `self_ty`Dylan MacKenzie-1/+1
2020-05-30Return early to avoid ICEYuki Okushi-0/+5
2020-05-28Merge commit '7ea7cd165ad6705603852771bf82cc2fd6560db5' into clippyup2flip1995-208/+351
2020-05-23iterate List by valueBastian Kauschke-2/+1
2020-05-22Use `OnceCell` instead of `Once`Dylan MacKenzie-1/+1
2020-05-20introduce newtype'd `Predicate<'tcx>`Bastian Kauschke-6/+6