Philipp Krones
0ae4a048c6
Merge commit '9725c4a162502a02c1c67fdca6b797fe09b2b73c' into clippy-subtree-update
2024-04-04 19:52:55 +02:00
Philipp Krones
c9a43b18f1
Merge commit 'f0cdee4a3f094416189261481eae374b76792af1' into clippy-subtree-sync
2023-12-01 18:21:58 +01:00
Nicholas Nethercote
684c4bfef1
Rework ast::BinOpKind::to_string
and ast::UnOp::to_string
.
...
- Rename them both `as_str`, which is the typical name for a function
that returns a `&str`. (`to_string` is appropriate for functions
returning `String` or maybe `Cow<'a, str>`.)
- Change `UnOp::as_str` from an associated function (weird!) to a
method.
- Avoid needless `self` dereferences.
2023-11-28 09:42:07 +11:00
Philipp Krones
6246f0446a
Merge commit 'edb720b199083f4107b858a8761648065bf38d86' into clippyup
2023-11-16 19:13:24 +01:00
bors
2d9af160af
Auto merge of #117507 - nnethercote:rustc_span, r=Nilstrieb
...
`rustc_span` cleanups
Just some things I found while looking over this crate.
r? `@oli-obk`
2023-11-03 14:57:40 +00:00
Philipp Krones
77c1e3aaa1
Merge commit '09ac14c901abc43bd0d617ae4a44e8a4fed98d9c' into clippyup
2023-11-02 17:35:56 +01:00
Nicholas Nethercote
e1ec2d5cc9
Minimize pub
usage in source_map.rs
.
...
Most notably, this commit changes the `pub use crate::*;` in that file
to `use crate::*;`. This requires a lot of `use` items in other crates
to be adjusted, because everything defined within `rustc_span::*` was
also available via `rustc_span::source_map::*`, which is bizarre.
The commit also removes `SourceMap::span_to_relative_line_string`, which
is unused.
2023-11-02 19:35:00 +11:00
Arthur Lafrance
9ee26d078d
fix lint failures in clippy
2023-10-16 19:50:31 -07:00
Philipp Krones
cb3ecf7b79
Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup
2023-07-02 14:59:02 +02:00
Philipp Krones
a1b75c5108
Merge commit 'a3ed905928a03b6e433d0b429190bf3a847128b3' into clippyup
2023-04-23 13:28:56 +02:00
Philipp Krones
d75b25faab
Merge commit 'ac0e10aa68325235069a842f47499852b2dee79e' into clippyup
2022-10-06 09:44:38 +02:00
Philipp Krones
dc29cfb8d5
Merge commit '2b2190cb5667cdd276a24ef8b9f3692209c54a89' into clippyup
2022-08-11 19:42:16 +02:00
Philipp Krones
f067783461
Merge commit 'd9ddce8a223cb9916389c039777b6966ea448dc8' into clippyup
2022-06-04 13:34:07 +02:00
flip1995
611d039814
Merge commit '57b3c4b90f4346b3990c1be387c3b3ca7b78412c' into clippyup
2022-02-10 18:40:06 +01:00
Vadim Petrochenkov
aee89cdff1
Update clippy
2022-01-23 19:31:32 +08:00
flip1995
8fea1d94f3
Merge commit 'a5d597637dcb78dc73f93561ce474f23d4177c35' into clippyup
2021-12-06 12:33:31 +01:00
flip1995
23d5457e6d
Merge commit 'cb7915b00c235e9b5861564f3be78dba330980ee' into clippyup
2021-09-28 18:03:12 +01:00
Frank Steffahn
21da42ce29
Fix more “a”/“an” typos
2021-08-22 17:27:18 +02:00
flip1995
2b20f49841
Merge commit '0cce3f643bfcbb92d5a1bb71858c9cbaff749d6b' into clippyup
2021-07-29 12:16:06 +02:00
flip1995
ebe52869a3
Merge commit '61eb38aeda6cb54b93b872bf503d70084c4d621c' into clippyup
2021-07-01 18:17:38 +02:00
flip1995
02bf692169
Merge commit '98e2b9f25b6db4b2680a3d388456d9f95cb28344' into clippyup
2021-04-22 11:31:13 +02:00
flip1995
f6d1f368db
Merge commit 'b40ea209e7f14c8193ddfc98143967b6a2f4f5c9' into clippyup
2021-04-08 17:50:13 +02:00
flip1995
9f6b5de7de
Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyup
2021-03-25 19:29:11 +01:00
flip1995
6f25adbd5a
Merge commit '2ca58e7dda4a9eb142599638c59dc04d15961175' into clippyup
2020-07-14 14:59:59 +02:00
Lzu Tao
8db24840f7
Merge commit 'ff0993c5e9162ddaea78e83d0f0161e68bd4ea73' into clippy
2020-06-09 14:36:01 +00:00
xiongmao86
d7f1a1ed2b
Change note_span argument for span_lint_and_note.
2020-04-18 18:29:36 +08:00
xiongmao86
cf4e35339b
Add an Option<Span> argument to span_lint_and_help.
2020-04-18 18:28:29 +08:00
Matthias Krüger
aff57e0f43
rustup https://github.com/rust-lang/rust/pull/70536
2020-03-30 11:17:58 +02:00
Yuki Okushi
4253aa7137
Rustup to rust-lang/rust#69592
2020-03-01 12:23:33 +09:00
flip1995
8472ecda0f
Fix fallout
2020-02-21 11:14:18 +01:00
Yuki Okushi
f5e86d6894
Rename span_note_and_lint
to span_lint_and_note
2020-01-27 11:26:42 +09:00
Yuki Okushi
f60f12f71f
Rename span_help_and_lint
to span_lint_and_help
2020-01-27 11:17:58 +09:00
Mikhail Babenko
a234aef084
dont fire possible_missing_comma if intendation is present
2020-01-25 20:16:05 +03:00
Yuki Okushi
ce1c6b285d
Rustup to rust-lang/rust#68045
2020-01-13 21:55:57 +09:00
Yuki Okushi
39947992b5
Rustup to rust-lang/rust#67806
2020-01-11 21:50:00 +09:00
Lzu Tao
652666b288
rustup "Add span information to ExprKind::Assign
"
2019-12-24 11:25:24 +07:00
Matthias Krüger
98e433d70d
Rustup to rust-lang/rust#66878
2019-12-04 01:34:01 +01:00
Andre Bogus
cc622608db
new lints around #[must_use]
fns
...
`must_use_unit` lints unit-returning functions with a `#[must_use]`
attribute, suggesting to remove it.
`double_must_use` lints functions with a plain `#[must_use]`
attribute, but which return a type which is already `#[must_use]`,
so the attribute has no benefit.
`must_use_candidate` is a pedantic lint that lints functions and
methods that return some non-unit type that is not already
`#[must_use]` and suggests to add the annotation.
2019-10-14 12:09:04 +02:00
Nikos Filippakis
5143fe1a78
New lint: suspicious_unary_op_formatting
...
Lints when, on the RHS of a BinOp, there is a UnOp without a space
before the operator but with a space after (e.g. foo >- 1).
Signed-off-by: Nikos Filippakis <nikolaos.filippakis@cern.ch>
2019-10-09 16:22:00 +02:00
flip1995
4bbd10a585
Rustup to rust-lang/rust#64813
2019-09-27 17:21:20 +02:00
KRAAI, MATTHEW [VISUS]
204b2f3658
Remove in_macro_or_desugar
2019-08-19 09:30:32 -07:00
flip1995
662037bcf2
Simplify unsugar_if to just an if expr check
2019-06-24 09:51:53 +02:00
flip1995
c192c07930
Remove ast:: prefix from types
2019-06-24 09:40:11 +02:00
Mazdak Farrokhzad
46a0e54361
Put 'if let' back into comment.
2019-06-24 07:20:52 +02:00
Mazdak Farrokhzad
b918594369
Fix fallout from rust-lang/rust PR 60861.
2019-06-23 17:24:45 +02:00
Manish Goregaokar
7eb8018554
Rename in_macro to in_macro_or_desugar
2019-05-11 21:39:02 -07:00
Matthew Kraai
753c39672e
Use lint pass macros
...
Fixes #3917 .
2019-04-17 09:35:22 -07:00
Philipp Hansch
289a9af801
cargo fmt
2019-04-14 15:07:15 +02:00
Philipp Hansch
ad27e3ff9b
Refactor suspicious_else_formatting using if_chain
2019-04-14 11:12:51 +02:00
Philipp Hansch
96c34e85c4
Remove except
in suspicious_else_formatting
...
This was causing two different ICEs in #3741 .
The first was fixed in #3925 .
The second one is fixed with this commit: We just don't `expect`
anymore. If the snippet doesn't contain an `else`, we stop emitting the
lint because it's not a suspiciously formatted else anyway.
2019-04-14 11:04:41 +02:00