about summary refs log tree commit diff
path: root/clippy_lints/src/strings.rs
AgeCommit message (Collapse)AuthorLines
2020-01-13Rustup to rust-lang/rust#68045Yuki Okushi-1/+2
2020-01-11Rustup to rust-lang/rust#67806Yuki Okushi-3/+2
2020-01-07Rustup to rust-lang/rust#67886Yuki Okushi-1/+1
2020-01-04Rustup to https://github.com/rust-lang/rust/pull/67853Philipp Hansch-1/+1
Specifically caused by https://github.com/rust-lang/rust/pull/67786
2019-12-27Rustup to rust-lang/rust#66936Yuki Okushi-4/+4
2019-12-24rustup "Add span information to `ExprKind::Assign`"Lzu Tao-2/+2
2019-12-05Change to only detect in external macros.daxpedda-5/+3
2019-12-04Fix false positive in `string_add`.daxpedda-1/+7
2019-12-04Rustup to rust-lang/rust#66878Matthias Krüger-1/+2
2019-11-26trigger string_lit_as_bytes when literal has escapesAndy Russell-46/+41
2019-11-19use usize::fromlzutao-1/+1
Co-Authored-By: Mateusz Mikuła <mati865@users.noreply.github.com>
2019-11-19use more efficient code to generate repeated stringLzu Tao-1/+1
see https://rust.godbolt.org/z/z9vrFP for comparison
2019-09-27Rustup to rust-lang/rust#64813flip1995-6/+6
2019-08-19Remove in_macro_or_desugarKRAAI, MATTHEW [VISUS]-2/+2
2019-08-03Doctests: Enable running doc tests for restriction lintsPhilipp Hansch-1/+1
2019-07-08Extract semantic constantThiago Arrais-1/+4
2019-07-08Avoid reporting string_lit_as_bytes for long stringsJens Hausdorf-0/+1
Port of @jens1o code ([b76f939][jens1o_commit]) Fixes #1208 [jens1o_commit]: https://github.com/jens1o/rust-clippy/commit/b76f939ac2efcfe24900c286b3b7713d972d9088 Co-authored-by: Thiago Arrais <thiago.arrais@gmail.com>
2019-05-17Prevent symbocalypseOliver Scherer-3/+2
2019-05-14Rustfmt all the thingsOliver Scherer-1/+1
2019-05-14Use symbols instead of stringsOliver Scherer-2/+3
2019-05-11Rename in_macro to in_macro_or_desugarManish Goregaokar-2/+2
2019-04-17Use lint pass macrosMatthew Kraai-25/+3
Fixes #3917.
2019-03-10Various cosmetic improvements.Alexander Regueiro-4/+5
2019-03-05move lint documentation into macro invocationsAndy Russell-48/+48
2019-02-24HirIdify some lintsljedrz-1/+1
2019-01-27rustup https://github.com/rust-lang/rust/pull/57726Matthias Krüger-0/+8
2019-01-08Remove all copyright license headersPhilipp Hansch-9/+0
Discussion previously happened in https://github.com/rust-lang/rust/pull/43498
2018-12-29Remove crate:: prefixes from crate pathsKonrad Borowski-6/+6
This is somewhat misleading, as those are actually external crates, and don't need a crate:: prefix.
2018-11-27Add applicability level to (nearly) every span_lint_and_sugg functionflip1995-5/+13
2018-11-27Add Applicability::Unspecified to span_lint_and_sugg functionsflip1995-0/+3
2018-10-26fix: correctly reconstruct raw stringsJane Lusby-4/+8
2018-10-26fix: extra semicolon, only create callsite onceJane Lusby-1/+1
2018-10-26Fix string_lit_as_bytes lint for macrosJane Lusby-8/+31
Prior to this change, string_lit_as_bytes would trigger for constructs like `include_str!("filename").as_bytes()` and would recommend fixing it by rewriting as `binclude_str!("filename")`. This change updates the lint to act as an EarlyLintPass lint. It then differentiates between string literals and macros that have bytes yielding alternatives. Closes #3205
2018-10-06Add license header to Rust filesManish Goregaokar-0/+10
2018-09-15Reintroduce `extern crate` for non-Cargo dependencies.Eduard-Mihai Burtescu-5/+5
2018-09-01Merge pull request #2977 from flip1995/tool_lintsManish Goregaokar-1/+1
Implement tool_lints
2018-08-29Merge pull request #3076 from mbrubeck/patch-1Philipp Hansch-2/+1
Remove incorrect note from string_add_assign docs
2018-08-29Switch to declare_tool_lint macroflip1995-1/+1
2018-08-28Update imports and rustupOliver Schneider-1/+1
2018-08-23Remove incorrect note from string_add_assign docsMatt Brubeck-2/+1
The docs claim that `String::push_str` is better than `String::add` because `String::add` allocates a new string and drops the old one, but this is not true. In fact, `add` reuses the existing string and grows it only if its capacity is exceeded, exactly like `push_str`. Their performance is identical since `add` is just a wrapper for `push_str`: ``` fn add(mut self, other: &str) -> String { self.push_str(other); self } ``` https://github.com/rust-lang/rust/blob/35bf1ae25799a4e62131159f052e0a3cbd27c960/src/liballoc/string.rs#L1922-L1925
2018-08-19codemap -> source_mapManish Goregaokar-1/+1
https://github.com/rust-lang/rust/pull/52953
2018-07-23RustupOliver Schneider-2/+2
2018-07-19Remove import of rustcManish Goregaokar-0/+1
2018-07-16BinOpKindcsmoe-2/+2
2018-07-16ExprKindcsmoe-7/+7
2018-06-29RustupMateusz Mikuła-1/+1
2018-05-30Run rustfixMateusz Mikuła-3/+3
2018-05-17Rustup to 2018-05-16Mateusz Mikuła-1/+1
2018-03-28Categorize all the lints!Oliver Schneider-7/+8
2017-11-06Fix broken tests.laurent-1/+0