profile
viewpoint

llogiq/bytecount 138

Counting occurrences of a given byte or UTF-8 characters in a slice of memory – fast

llogiq/compact_arena 69

A crate with indexed arenas with small memory footprint

Geal/mutant 12

Mutation testing for Rust

llogiq/awesome-rust 9

A curated list of awesome Rust code and resources.

Aleph-Alpha/aleph-alpha-tokenizer 4

A rustic language tokenizer library inspired by huggingface's tokenizers

llogiq/arraymap 4

Adds a trait to map functions over arrays

llogiq/bsdiff-rs 4

A Rust BSDiff port

llogiq/arraymapbench 2

A benchmark of various map methods

Aleph-Alpha/pdf-extract 0

A rust library for extracting content from pdfs

llogiq/abomonation 0

A mortifying serialization library for Rust

pull request commentrust-lang/rust-clippy

Check when `from_utf8` is called from sliced byte array from string

Sure thing. I'll see if I can find the time to catch up over the weekend.

patrickelectric

comment created time in 5 hours

delete branch storyscript/typescript-definitions

delete branch : comment-newlines

delete time in 13 hours

push eventstoryscript/typescript-definitions

Andre Bogus

commit sha 3d1b4065b8408b330be73492c3edc2939179e3f1

fix newlines around typescript comments

view details

llogiq

commit sha 48ff45ea21cab82f7d670c1dadb5bd89494dd265

Merge pull request #7 from storyscript/comment-newlines fix newlines around typescript comments

view details

push time in 13 hours

PR merged storyscript/typescript-definitions

fix newlines around typescript comments

This should hopefully clear up the remaining problem with the typescript comments in the definitions.

+7 -8

1 comment

2 changed files

llogiq

pr closed time in 13 hours

issue commentrust-lang/rust-clippy

Needless / unnecessary Result

Let's only lint this on non-exported fns, as public items are part of the API and we don't want to have clippy suggest breaking changes.

emilk

comment created time in 2 days

PullRequestReviewEvent

Pull request review commentrust-lang/rust-clippy

New lint: `uninformative_asserts`

+use crate::utils::span_lint_and_help;+use if_chain::if_chain;+use rustc_ast::ast::{Item, MacArgs, MacCall};+use rustc_ast::token;+use rustc_ast::tokenstream::TokenTree;+use rustc_lint::{EarlyContext, EarlyLintPass};+use rustc_session::{declare_tool_lint, impl_lint_pass};++declare_clippy_lint! {+    /// **What it does:**+    /// Lint {debug_}assert{_eq,_ne}! without a custom panic message.+    ///+    /// **Why is this bad?**+    /// If the assertion fails, a custom message may make it easier to debug what went wrong.+    ///+    /// **Known problems:** None.+    ///+    /// **Example:**+    ///+    /// ```rust+    /// # fn some_condition(_x: u8) -> bool { true }+    /// # fn bar(x: u8) -> u8 { x }+    /// # let foo = 0u8;+    /// # let a = 0u8;+    /// # let b = 0u8;+    /// assert!(some_condition(foo));

I think this test should have a ///# #![allow(clippy::uninformative_assert)] line pretended. Otherwise clippy-checking the doctests would fail.

HMPerson1

comment created time in 2 days

Pull request review commentrust-lang/rust-clippy

New lint: `uninformative_asserts`

+use crate::utils::span_lint_and_help;+use if_chain::if_chain;+use rustc_ast::ast::{Item, MacArgs, MacCall};+use rustc_ast::token;+use rustc_ast::tokenstream::TokenTree;+use rustc_lint::{EarlyContext, EarlyLintPass};+use rustc_session::{declare_tool_lint, impl_lint_pass};++declare_clippy_lint! {+    /// **What it does:**+    /// Lint {debug_}assert{_eq,_ne}! without a custom panic message.+    ///+    /// **Why is this bad?**+    /// If the assertion fails, a custom message may make it easier to debug what went wrong.+    ///+    /// **Known problems:** None.+    ///+    /// **Example:**+    ///+    /// ```rust+    /// # fn some_condition(_x: u8) -> bool { true }+    /// # fn bar(x: u8) -> u8 { x }+    /// # let foo = 0u8;+    /// # let a = 0u8;+    /// # let b = 0u8;+    /// assert!(some_condition(foo));+    /// debug_assert_eq(a, bar(b));+    /// ```+    /// Use instead:+    /// ```rust+    /// # fn some_condition(_x: u8) -> bool { true }+    /// # fn bar(x: u8) -> u8 { x }+    /// # let foo = 0u8;+    /// # let a = 0u8;+    /// # let b = 0u8;+    /// assert!(some_condition(foo), "foo failed some condition: foo = {}", foo);+    /// debug_assert_eq!(a, bar(b), "failed to find inverse of bar at {}", a);+    /// ```+    pub UNINFORMATIVE_ASSERTS,+    pedantic,+    "using `assert!` without custom panic message"+}++#[derive(Default)]+pub struct UninformativeAsserts {+    test_fns_deep: u32,+}++impl_lint_pass!(UninformativeAsserts => [UNINFORMATIVE_ASSERTS]);++const ONE_ARG_ASSERT: [&str; 2] = ["assert", "debug_assert"];+const TWO_ARG_ASSERT: [&str; 4] = ["assert_eq", "assert_ne", "debug_assert_eq", "debug_assert_ne"];++impl EarlyLintPass for UninformativeAsserts {+    fn check_mac(&mut self, cx: &EarlyContext<'_>, mac: &MacCall) {+        if self.test_fns_deep > 0 {+            return;+        }+        if let MacArgs::Delimited(_, _, ts) = &*mac.args {+            let args_tts = ts.trees().collect::<Vec<_>>();+            if let [seg] = &*mac.path.segments {+                let mac_name = seg.ident.name.as_str();+                let msg_arg_idx = if ONE_ARG_ASSERT.contains(&&*mac_name) {+                    1+                } else if TWO_ARG_ASSERT.contains(&&*mac_name) {+                    2+                } else {+                    return;+                };+                // this is a call to an `assert!`-family macro+                // check if it has a custom panic message argument+                let opt_msg = args_tts.split(is_comma).nth(msg_arg_idx);+                if let None | Some([]) = opt_msg {+                    span_lint_and_help(+                        cx,+                        UNINFORMATIVE_ASSERTS,+                        mac.span(),+                        "`assert!` called without custom panic message",+                        None,+                        "consider adding a custom panic message",+                    );+                }+            }+        }+    }++    fn check_item(&mut self, _: &EarlyContext<'_>, item: &Item) {+        if item.attrs.iter().any(|attr| attr.has_name(sym!(test))) {+            self.test_fns_deep = self.test_fns_deep.saturating_add(1);+        }+    }++    fn check_item_post(&mut self, _: &EarlyContext<'_>, item: &Item) {+        if item.attrs.iter().any(|attr| attr.has_name(sym!(test))) {

Since this check is duplicated here, it should really be a helper.

HMPerson1

comment created time in 2 days

Pull request review commentrust-lang/rust-clippy

New lint: `uninformative_asserts`

+use crate::utils::span_lint_and_help;+use if_chain::if_chain;+use rustc_ast::ast::{Item, MacArgs, MacCall};+use rustc_ast::token;+use rustc_ast::tokenstream::TokenTree;+use rustc_lint::{EarlyContext, EarlyLintPass};+use rustc_session::{declare_tool_lint, impl_lint_pass};++declare_clippy_lint! {+    /// **What it does:**+    /// Lint {debug_}assert{_eq,_ne}! without a custom panic message.+    ///+    /// **Why is this bad?**+    /// If the assertion fails, a custom message may make it easier to debug what went wrong.+    ///+    /// **Known problems:** None.+    ///+    /// **Example:**+    ///+    /// ```rust+    /// # fn some_condition(_x: u8) -> bool { true }+    /// # fn bar(x: u8) -> u8 { x }+    /// # let foo = 0u8;+    /// # let a = 0u8;+    /// # let b = 0u8;+    /// assert!(some_condition(foo));+    /// debug_assert_eq(a, bar(b));+    /// ```+    /// Use instead:+    /// ```rust+    /// # fn some_condition(_x: u8) -> bool { true }+    /// # fn bar(x: u8) -> u8 { x }+    /// # let foo = 0u8;+    /// # let a = 0u8;+    /// # let b = 0u8;+    /// assert!(some_condition(foo), "foo failed some condition: foo = {}", foo);+    /// debug_assert_eq!(a, bar(b), "failed to find inverse of bar at {}", a);+    /// ```+    pub UNINFORMATIVE_ASSERTS,+    pedantic,+    "using `assert!` without custom panic message"+}++#[derive(Default)]+pub struct UninformativeAsserts {+    test_fns_deep: u32,+}++impl_lint_pass!(UninformativeAsserts => [UNINFORMATIVE_ASSERTS]);++const ONE_ARG_ASSERT: [&str; 2] = ["assert", "debug_assert"];+const TWO_ARG_ASSERT: [&str; 4] = ["assert_eq", "assert_ne", "debug_assert_eq", "debug_assert_ne"];++impl EarlyLintPass for UninformativeAsserts {+    fn check_mac(&mut self, cx: &EarlyContext<'_>, mac: &MacCall) {+        if self.test_fns_deep > 0 {+            return;+        }+        if let MacArgs::Delimited(_, _, ts) = &*mac.args {+            let args_tts = ts.trees().collect::<Vec<_>>();+            if let [seg] = &*mac.path.segments {+                let mac_name = seg.ident.name.as_str();+                let msg_arg_idx = if ONE_ARG_ASSERT.contains(&&*mac_name) {+                    1+                } else if TWO_ARG_ASSERT.contains(&&*mac_name) {+                    2+                } else {+                    return;+                };+                // this is a call to an `assert!`-family macro+                // check if it has a custom panic message argument+                let opt_msg = args_tts.split(is_comma).nth(msg_arg_idx);+                if let None | Some([]) = opt_msg {+                    span_lint_and_help(+                        cx,+                        UNINFORMATIVE_ASSERTS,+                        mac.span(),+                        "`assert!` called without custom panic message",+                        None,+                        "consider adding a custom panic message",+                    );+                }+            }+        }+    }++    fn check_item(&mut self, _: &EarlyContext<'_>, item: &Item) {+        if item.attrs.iter().any(|attr| attr.has_name(sym!(test))) {

What about #[cfg(test)]? I think we may want to check for that, too.

Perhaps that could be a fn is_test_related(&[Attribute]) -> bool helper function.

HMPerson1

comment created time in 2 days

Pull request review commentrust-lang/rust-clippy

New lint: `uninformative_asserts`

+use crate::utils::span_lint_and_help;+use if_chain::if_chain;+use rustc_ast::ast::{Item, MacArgs, MacCall};+use rustc_ast::token;+use rustc_ast::tokenstream::TokenTree;+use rustc_lint::{EarlyContext, EarlyLintPass};+use rustc_session::{declare_tool_lint, impl_lint_pass};++declare_clippy_lint! {+    /// **What it does:**+    /// Lint {debug_}assert{_eq,_ne}! without a custom panic message.+    ///+    /// **Why is this bad?**+    /// If the assertion fails, a custom message may make it easier to debug what went wrong.+    ///+    /// **Known problems:** None.+    ///+    /// **Example:**+    ///+    /// ```rust+    /// # fn some_condition(_x: u8) -> bool { true }+    /// # fn bar(x: u8) -> u8 { x }+    /// # let foo = 0u8;+    /// # let a = 0u8;+    /// # let b = 0u8;+    /// assert!(some_condition(foo));+    /// debug_assert_eq(a, bar(b));+    /// ```+    /// Use instead:+    /// ```rust+    /// # fn some_condition(_x: u8) -> bool { true }+    /// # fn bar(x: u8) -> u8 { x }+    /// # let foo = 0u8;+    /// # let a = 0u8;+    /// # let b = 0u8;+    /// assert!(some_condition(foo), "foo failed some condition: foo = {}", foo);+    /// debug_assert_eq!(a, bar(b), "failed to find inverse of bar at {}", a);+    /// ```+    pub UNINFORMATIVE_ASSERTS,+    pedantic,+    "using `assert!` without custom panic message"+}++#[derive(Default)]+pub struct UninformativeAsserts {+    test_fns_deep: u32,+}++impl_lint_pass!(UninformativeAsserts => [UNINFORMATIVE_ASSERTS]);++const ONE_ARG_ASSERT: [&str; 2] = ["assert", "debug_assert"];+const TWO_ARG_ASSERT: [&str; 4] = ["assert_eq", "assert_ne", "debug_assert_eq", "debug_assert_ne"];++impl EarlyLintPass for UninformativeAsserts {+    fn check_mac(&mut self, cx: &EarlyContext<'_>, mac: &MacCall) {+        if self.test_fns_deep > 0 {+            return;+        }+        if let MacArgs::Delimited(_, _, ts) = &*mac.args {+            let args_tts = ts.trees().collect::<Vec<_>>();+            if let [seg] = &*mac.path.segments {+                let mac_name = seg.ident.name.as_str();+                let msg_arg_idx = if ONE_ARG_ASSERT.contains(&&*mac_name) {+                    1+                } else if TWO_ARG_ASSERT.contains(&&*mac_name) {+                    2+                } else {+                    return;+                };+                // this is a call to an `assert!`-family macro+                // check if it has a custom panic message argument+                let opt_msg = args_tts.split(is_comma).nth(msg_arg_idx);+                if let None | Some([]) = opt_msg {+                    span_lint_and_help(+                        cx,+                        UNINFORMATIVE_ASSERTS,+                        mac.span(),+                        "`assert!` called without custom panic message",+                        None,+                        "consider adding a custom panic message",+                    );

We may even want a suggestion like {macro}({args}, "<your panic message here>") (with suitable snippets for macro and args). This would help people if they haven't added a message before.

HMPerson1

comment created time in 2 days

PullRequestReviewEvent

pull request commentstoryscript/typescript-definitions

Add git hook

chore #175479540

llogiq

comment created time in 2 days

PR opened storyscript/typescript-definitions

fix newlines around typescript comments

This should hopefully clear up the remaining problem with the typescript comments in the definitions.

+7 -8

0 comment

2 changed files

pr created time in 2 days

create barnchstoryscript/typescript-definitions

branch : comment-newlines

created branch time in 2 days

delete branch storyscript/typescript-definitions

delete branch : git-hook

delete time in 2 days

push eventstoryscript/typescript-definitions

Andre Bogus

commit sha c6fc82a3f8a1a4206458db793f5bffd5b76b3e4f

Add git hook

view details

llogiq

commit sha 3d18e3ab48c2a1a620815f2bbb8e6b0517cdc05d

Merge pull request #6 from storyscript/git-hook Add git hook

view details

push time in 2 days

PR merged storyscript/typescript-definitions

Add git hook

This uses rusty-hook to manage the git hooks. To enable it, please run cargo test in the main directory once. This will give you a test + fmt check + clippy before pushing and also thank you for your commit + push (because I like my tools courteous :smile:)

+8 -1

2 comments

2 changed files

llogiq

pr closed time in 2 days

pull request commentstoryscript/typescript-definitions

Add git hook

doesn't cargo test clear the cached state of clippy?

llogiq

comment created time in 2 days

pull request commentrust-lang/rust-clippy

New lint: `uninformative_asserts`

Test error appears to be unrelated, we may have to wait for a rustup & rebase. I'll have time to look at the code this evening.

HMPerson1

comment created time in 3 days

PR opened storyscript/typescript-definitions

Reviewers
Add git hook

This uses rusty-hook to manage the git hooks. To enable it, please run cargo test in the main directory once. This will give you a test + fmt check + clippy before pushing and also thank you for your commit + push (because I like my tools courteous :smile:)

+8 -1

0 comment

2 changed files

pr created time in 3 days

push eventstoryscript/typescript-definitions

Andre Bogus

commit sha c6fc82a3f8a1a4206458db793f5bffd5b76b3e4f

Add git hook

view details

push time in 3 days

create barnchstoryscript/typescript-definitions

branch : git-hook

created branch time in 3 days

issue closedrust-lang/rust-clippy

map_entry is incorrectly suggested when map is used between contains_key and insert

Related issue: https://github.com/rust-lang/rust-clippy/issues/5696

Reproducing code:

use std::collections::HashMap;

// don't want to call this if contains_key==true
fn really_expensive_function(_map: &HashMap<u32, u32>) {}

fn main() {
    let mut map = HashMap::new();
    let key = 5;
    if !map.contains_key(&key) {
        really_expensive_function(&map);
        map.insert(key, 10);
    }
    // This doesn't compile:
    /*
    use std::collections::hash_map::Entry;
    match map.entry(key) {
        Entry::Vacant(entry) => {
            really_expensive_function(&map);
            entry.insert(10);
        }
        _ => (),
    }
    */
}

produces

warning: usage of `contains_key` followed by `insert` on a `HashMap`
  --> src/main.rs:9:5
   |
9  | /     if !map.contains_key(&key) {
10 | |         really_expensive_function(&map);
11 | |         map.insert(key, 10);
12 | |     }
   | |_____^ consider using `map.entry(key)`

However, the commented-out code (which is what I believe clippy is suggesting) fails to compile with

error[E0502]: cannot borrow `map` as immutable because it is also borrowed as mutable
  --> src/main.rs:17:39
   |
15 |     match map.entry(key) {
   |           --- mutable borrow occurs here
16 |         Entry::Vacant(entry) => {
17 |             really_expensive_function(&map);
   |                                       ^^^^ immutable borrow occurs here
18 |             entry.insert(10);
   |             ----- mutable borrow later used here

I believe the correct behavior here is to not emit a suggestion at all.

Meta

  • cargo clippy -V: clippy 0.0.212 (18bf6b4 2020-10-07)
  • rustc -Vv:
    rustc 1.47.0 (18bf6b4f0 2020-10-07)
    binary: rustc
    commit-hash: 18bf6b4f01a6feaf7259ba7cdae58031af1b7b39
    commit-date: 2020-10-07
    host: x86_64-unknown-linux-gnu
    release: 1.47.0
    LLVM version: 11.0
    

closed time in 3 days

khyperia

push eventllogiq/mutagen

Benjamin Sago

commit sha c7abc956a10e8a3e2cc71f21279ea0a42f7b7c10

Pass through --package and --workspace arguments (#172) This commit adds the --package and --workspace arguments to cargo-mutagen. They're implemented in the same way as the --features and --all-features arguments, getting passed through to the `cargo test` invocation.

view details

push time in 3 days

PR merged llogiq/mutagen

Pass through --package and --workspace arguments

I have a project with multiple crates in a workspace, with only the "inner" one needing mutation testing. The data in target/mutagen was generated when I ran cargo test --workspace, but cargo-mutagen didn't detect it unless I also passed --workspace to the cargo test that cargo-mutagen runs, so I made this patch to add the argument.


Commits:

  • This commit adds the --package and --workspace arguments to cargo-mutagen. They're implemented in the same way as the --features and --all-features arguments, getting passed through to the cargo test invocation.
+14 -0

1 comment

1 changed file

ogham

pr closed time in 3 days

pull request commentllogiq/mutagen

Pass through --package and --workspace arguments

this looks good to me, I just have one question, but that shouldn't block merging. I'd like to see some documentation on how to use this, but that may well be a follow-up.

ogham

comment created time in 3 days

delete branch llogiq/this-week-in-rust

delete branch : twir-361

delete time in 3 days

PR opened rust-lang/this-week-in-rust

C/QotW + notable changes

This time I self-selected the quote for lack of suggestions.

+30 -20

0 comment

1 changed file

pr created time in 3 days

create barnchllogiq/this-week-in-rust

branch : twir-362

created branch time in 3 days

push eventllogiq/flamer

dependabot-preview[bot]

commit sha 387ac7b77520f619a9f094f8fab486de186a7649

Bump syn from 1.0.46 to 1.0.48 Bumps [syn](https://github.com/dtolnay/syn) from 1.0.46 to 1.0.48. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/1.0.46...1.0.48) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

view details

llogiq

commit sha 62f4dc0017a425bc898366f96009a774d50b4c43

Merge pull request #99 from llogiq/dependabot/cargo/syn-1.0.48 Bump syn from 1.0.46 to 1.0.48

view details

push time in 5 days

PR merged llogiq/flamer

Bump syn from 1.0.46 to 1.0.48 dependencies

Bumps syn from 1.0.46 to 1.0.48. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/dtolnay/syn/commit/1c8ec7953893310c0ff10cbe27567846a0541187"><code>1c8ec79</code></a> Release 1.0.48</li> <li><a href="https://github.com/dtolnay/syn/commit/b7953dfafcf13705282c9741efacdd9f9eeaa3ee"><code>b7953df</code></a> Release 1.0.47</li> <li><a href="https://github.com/dtolnay/syn/commit/301a74eae7267807956ea3b0b9bdf9a7986b7be0"><code>301a74e</code></a> Unpin crossbeam-utils since they released fix</li> <li><a href="https://github.com/dtolnay/syn/commit/8f0dbd5050a99d166cf13e4c0d6a8274df484bd8"><code>8f0dbd5</code></a> Update syn-internal-codegen deps</li> <li><a href="https://github.com/dtolnay/syn/commit/45acd3ad3a5381fb41de2a026c96cba3de994ca0"><code>45acd3a</code></a> Set html_root_url for syn-codegen crate</li> <li><a href="https://github.com/dtolnay/syn/commit/39ee8cc18812397826a947e6a0300154a5530395"><code>39ee8cc</code></a> Release syn-codegen 0.2.0</li> <li><a href="https://github.com/dtolnay/syn/commit/ab2c642edd1f6d272ba26d86517e9ef1ddde3070"><code>ab2c642</code></a> Update syn-codegen to semver 0.11</li> <li><a href="https://github.com/dtolnay/syn/commit/f1f86306dc15c1319bdc03d5b5c832a1d4ec9aff"><code>f1f8630</code></a> Expand wildcard import</li> <li><a href="https://github.com/dtolnay/syn/commit/ce86fcecf3825fa6e1c7fddd1b7005678889ca89"><code>ce86fce</code></a> Format syn-internal-codegen with rustfmt 1.4.22-nightly</li> <li><a href="https://github.com/dtolnay/syn/commit/2804a84e0f3b31c8fab9f5174d83ce15028c957f"><code>2804a84</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dtolnay/syn/issues/912">#912</a> from dtolnay/tokendoc</li> <li>Additional commits viewable in <a href="https://github.com/dtolnay/syn/compare/1.0.46...1.0.48">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

</details>

+4 -4

0 comment

2 changed files

dependabot-preview[bot]

pr closed time in 5 days

delete branch rust-lang/rust-clippy

delete branch : manual-range-contains

delete time in 5 days

pull request commentrust-lang/rust-clippy

New lint: manual-range-contains

Since @flip1995 is currently busy, r? @ebroto

llogiq

comment created time in 6 days

delete branch llogiq/highfive

delete branch : join-clippy

delete time in 6 days

pull request commentrust-lang/rust-clippy

No lint in macro for `toplevel_ref_arg`

using in_external_macro here will lint macro expansions where the macro is defined in the same crate, which likely makes sense, as the user is in a position to fix the problem.

ThibsG

comment created time in 6 days

push eventrust-lang/rust-clippy

varkor

commit sha fcde7683fe7ca10c83e5bc17f0969d2284affcd2

Fix clippy tests

view details

Eduardo Broto

commit sha d17edaa152f3663739b7ca5139a2e214ab23316d

Merge remote-tracking branch 'upstream/master' into rustup

view details

bors

commit sha bf1c6f9871f430e284b17aa44059e0d0395e28a6

Auto merge of #6206 - ebroto:rustup, r=ebroto Rustup changelog: none r? `@ghost`

view details

Andre Bogus

commit sha 006b846387c73602fa1c850800ea2d402a619b43

allow match in consts

view details

push time in 6 days

pull request commentrust-lang/rust-clippy

allow match in consts

Errors seem unrelated, and I cannot reproduce them.

llogiq

comment created time in 6 days

PR opened rust-lang/rust-clippy

allow match in consts

This extends our const handling to allow for match. Unsure how we'd test it, though, and we may want to extend it so we can add bindings to expressions in matches. Even so, I consider it a win.

r? @ebroto

Please keep the line below changelog: none

+91 -1

0 comment

1 changed file

pr created time in 6 days

create barnchrust-lang/rust-clippy

branch : const-match

created branch time in 6 days

issue commentrust-lang/rust-clippy

eq_op false positive with sub and div

I think that this is a pretty niche thing to do, so using #[allow(clippy::eq_op)] should suffice, especially if the lint triggers only on a few isolated functions.

pgimalac

comment created time in 7 days

issue commentrust-lang/rust-clippy

Lint for iterator.chain(None)

But sometimes folks might want to have types line up, and have multiple code paths where one path chains a Some(value) at the end. So the correct way to create a value off the same type without appended value would be .chain(None).

enterprisey

comment created time in 7 days

push eventllogiq/serdebench

David Renshaw

commit sha f5c72031f58efc81b682044e96ab7a566560e7f5

[capnproto] update for simpler buffer reuse enabled by capnp-v0.13.6

view details

llogiq

commit sha 2e443cf6e8cdc8953121c96d07c9a654fca72973

Merge pull request #6 from dwrensha/capnp-scratch-space-easier [capnproto] update for simpler buffer reuse enabled by capnp-v0.13.6

view details

push time in 8 days

PR merged llogiq/serdebench

[capnproto] update for simpler buffer reuse enabled by capnp-v0.13.6

After implementing #5, I realized that some simplifications were possible in capnproto-rust's API. I implemented those simplifications in https://github.com/capnproto/capnproto-rust/commit/8257850c8ba5eace0d208316f8515a92895ff30f and released a new crate version.

This pull request updates the benchmark to take advantage of the new simpler API. In particular, the allocator can just be borrowed by the message builder -- no need to move it around.

+7 -13

1 comment

3 changed files

dwrensha

pr closed time in 8 days

pull request commentllogiq/serdebench

[capnproto] update for simpler buffer reuse enabled by capnp-v0.13.6

Thanks, and great to hear that our benchmark led to API improvements. I will update the results accordingly over the weekend.

dwrensha

comment created time in 8 days

Pull request review commentrust-lang/rust-clippy

[WIP] Add new lint for xor-ing when `pow` was probably intended

+// run-rustfix+#![warn(clippy::xor_used_as_pow)]++// Should not be linted+#[allow(dead_code)]+enum E {+    First = 1 ^ 8,+    Second = 2 ^ 8,+    Third = 3 ^ 8,+    Tenth = 10 ^ 8,+}++fn main() {+    // These should succeed:+    let _ = 9 ^ 3; // lhs other than 2 or 10+    let _ = 0x02 ^ 6; // lhs not decimal+    let _ = 2 ^ 0x10; // rhs hexadecimal+    let _ = 10 ^ 0b0101; // rhs binary+    let _ = 2 ^ 0o1; // rhs octal+    let _ = 10 ^ -18; // negative rhs++    // These should fail+    let _ = 2 ^ 3;+    let _ = 10 ^ 4;+    let _ = 2 ^ 32;+    let _ = 2 ^ 0;+    let _ = 10 ^ 0;

Then the test can work around this by #![allow(clippy::identity_op)].

cgm616

comment created time in 8 days

PullRequestReviewEvent

pull request commentrust-lang/rust-clippy

New lint: manual-range-contains

Huh? There was some strange interaction (presumably with const stability) in the or_fun_call test. It's fixed now. r? @flip1995

llogiq

comment created time in 9 days

push eventrust-lang/rust-clippy

Andre Bogus

commit sha c693de350aff4a3930e66bccf65caf79b390dca2

New lint: manual-range-contains

view details

push time in 9 days

push eventllogiq/flamer

dependabot-preview[bot]

commit sha e49c744d64d36db96820479b5a179db210e0a68c

Bump syn from 1.0.45 to 1.0.46 Bumps [syn](https://github.com/dtolnay/syn) from 1.0.45 to 1.0.46. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/1.0.45...1.0.46) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

view details

llogiq

commit sha e2db4aea6bcd229daf1be0190a2134f648a31690

Merge pull request #98 from llogiq/dependabot/cargo/syn-1.0.46 Bump syn from 1.0.45 to 1.0.46

view details

push time in 9 days

PR merged llogiq/flamer

Bump syn from 1.0.45 to 1.0.46 dependencies

Bumps syn from 1.0.45 to 1.0.46. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/dtolnay/syn/releases">syn's releases</a>.</em></p> <blockquote> <h2>1.0.46</h2> <ul> <li>Fix parsing structured attributes that contain nested absolute paths, such as <code>#[derive(::serde::Serialize)]</code> (<a href="https://github-redirect.dependabot.com/dtolnay/syn/issues/909">#909</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/dtolnay/syn/commit/cb2c26838b37012aef3791ff4213570a48d0b1ba"><code>cb2c268</code></a> Release 1.0.46</li> <li><a href="https://github.com/dtolnay/syn/commit/e393b44677e5a23870156ee01fb99aa34a2b5f26"><code>e393b44</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dtolnay/syn/issues/910">#910</a> from dtolnay/absmeta</li> <li><a href="https://github.com/dtolnay/syn/commit/9a568a8d03ffae2c643f8799b42316eefcfce326"><code>9a568a8</code></a> Fix parsing an absolute nested meta path</li> <li><a href="https://github.com/dtolnay/syn/commit/bf0d06b6e1f4fa02171be0657f819215891f0165"><code>bf0d06b</code></a> Add test of parsing absolute path as Meta</li> <li><a href="https://github.com/dtolnay/syn/commit/8c8121906d48d6677430126b4893e73f63c928d8"><code>8c81219</code></a> Update test suite to nightly-2020-10-18</li> <li>See full diff in <a href="https://github.com/dtolnay/syn/compare/1.0.45...1.0.46">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

</details>

+4 -4

0 comment

2 changed files

dependabot-preview[bot]

pr closed time in 9 days

pull request commentllogiq/serdebench

use capnp::message::ScratchSpaceHeapAllocator to amortize allocation costs

Cool! Thank you once more, and of course I will update the results when I get around to it.

dwrensha

comment created time in 9 days

push eventllogiq/serdebench

David Renshaw

commit sha 9ffc2a9daef6318b01d60d8375f4007d7468baad

use capnp::message::ScratchSpaceHeapAllocator to amortize allocation costs

view details

llogiq

commit sha d5abce528811a306abd66f7182c3f579cb82c49b

Merge pull request #5 from dwrensha/scratch-space-allocator use capnp::message::ScratchSpaceHeapAllocator to amortize allocation costs

view details

push time in 9 days

PR merged llogiq/serdebench

use capnp::message::ScratchSpaceHeapAllocator to amortize allocation costs

This speeds things up a bit more and avoids the need to specify first_segment_words.

+14 -11

0 comment

1 changed file

dwrensha

pr closed time in 9 days

push eventrust-lang/rust-clippy

ThibsG

commit sha 32fdb8fb0c15ddc202eed70b82babca8d529e39b

Lint on identical variable used as args in `assert_eq!` macro call

view details

Chris Ayoup

commit sha 8c28ba39b573c0d9be2ce7aa3cfc60757f3c81e6

suggest a compatible shell for running setup-toolchain.sh setup-toolchain.sh uses "[[" which is a bash builtin, but the guide suggests running it with sh. On Ubuntu, /bin/sh points to dash and running the script as described fails.

view details

ThibsG

commit sha a3e0446afe0ebd7a420f65cd6aec1c56687f0ef5

Extend to the `assert` macro family

view details

ThibsG

commit sha 121a047645270d5e9ac965d57c324301ea1f21c0

Move linting of `assert` macros from early to late pass

view details

ThibsG

commit sha 71c29b5be8526562c3de8d3b7dc94611647ee120

Add iterator test case for `eq_op` lint

view details

ThibsG

commit sha 5a13217ea9c07121e7d3cdcfb0ddd2aa52b90f12

Assert macro args extractor as a common function in higher

view details

Jacob Hughes

commit sha 29392a1728df1b334b48115ad24cc592f04ca15e

Appease the almightly lord clippy, hallowed be thy name

view details

Yuki Okushi

commit sha 82f775d2c4fd25615d7db2a5340aae0ee9f9901b

Rollup merge of #77851 - exrook:split-btreemap, r=dtolnay BTreeMap: refactor Entry out of map.rs into its own file btree/map.rs is approaching the 3000 line mark, splitting out the entry code buys about 500 lines of headroom. I've created this PR because the changes I've made in #77438 will push `map.rs` over the 3000 line limit and cause tidy to complain. I picked `Entry` to factor out because it feels less tightly coupled to the rest of `BTreeMap` than the various iterator implementations. Related: #60302

view details

Ryan Wiedemann

commit sha 67bc11bd0480b5657c8c8db233e55f9b16ed664a

Add more infomation about LintStore registration Backstory: I somehow missed the fact that I needed to register a lint pass in order for it to run, and I spent some time confused until I figured it out. So I wanted to make it clear that a missing `register_(early|late)_pass` call is a likely cause of a lint not running.

view details

Takayuki Nakata

commit sha be136b27126cfb614eff3c0b032dcd2b3837db26

Merge remote-tracking branch 'upstream/master' into sync-from-rust

view details

bors

commit sha 3d3507230c62e94dcef2cea8c25c90d1d171e329

Auto merge of #6195 - giraffate:sync-from-rust, r=ebroto Rustup I followed these steps: <https://github.com/rust-lang/rust-clippy/blob/master/CONTRIBUTING.md#fixing-build-failures-caused-by-rust>. changelog: none

view details

bors

commit sha 74530adcba45edbd99bb5a96b45fe2c8e12a31aa

Auto merge of #6166 - achris:master, r=flip1995 Suggest a compatible shell for setup-toolchain.sh setup-toolchain.sh uses "[[" which is a bash builtin, but the guide suggests running it with sh. On Ubuntu, /bin/sh points to dash and running the script fails. --- *Please keep the line below* changelog: none

view details

ThibsG

commit sha 16b5f37b5a23f475d0d94efea764c57e4572f63f

Split `eq_op` ui tests to avoid file limit error in CI

view details

bors

commit sha eaffd0e41837dd952d0854a2f2aea35cccbb6319

Auto merge of #6167 - ThibsG:IdenticalArgumentsAssertEq3574, r=ebroto Identical arguments on assert macro family Lint when identical args are used on `assert_eq!`, `debug_assert_eq!`, `assert_ne!` and `debug_assert_ne!` macros. Added to the lint `eq_op`. Common functions added to `utils/higher.rs` Fixes: #3574 Fixes: #4694 changelog: Lint on identical args when calling `assert_eq!`, `debug_assert_eq!`, `assert_ne!` and `debug_assert_ne!` macros

view details

bors

commit sha 85959be60667ec158da0a1824506ebba47791317

Auto merge of #6193 - Ryan1729:add-more-LintStore-documentation, r=phansch Add more infomation about LintStore registration Backstory: I somehow missed the fact that I needed to register a lint pass in order for it to run, and I spent some time confused until I figured it out. So I wanted to make it clear that a missing `register_(early|late)_pass` call is a likely cause of a lint not running. changelog: none

view details

Andre Bogus

commit sha 533d767b6239ba2d9f09e01b7c746f5cb8ed965f

New lint: manual-range-contains

view details

push time in 9 days

PR opened rust-lang/this-week-in-rust

C/QotW + notable changes
+18 -15

0 comment

1 changed file

pr created time in 10 days

delete branch llogiq/this-week-in-rust

delete branch : twir-360

delete time in 10 days

create barnchllogiq/this-week-in-rust

branch : twir-361

created branch time in 10 days

delete branch llogiq/patterns

delete branch : ootb-dyn-dispatch

delete time in 10 days

push eventllogiq/serdebench

David Renshaw

commit sha 1444c49feab7550142d74e7e6d4be87a5b6dbbe2

Optimize the capnproto benchmarks. - Move opt_bool into a union, rather than a separate struct. - Tell `HeapAllocator` how many words to expect per message. - Use read_message_from_flat_slice() to avoid unnecessary copies.

view details

llogiq

commit sha 830fdbd358e7526b3253b74f9f28a7b957db9e84

Merge pull request #4 from dwrensha/capnp-optimize-2 Optimize the capnproto benchmarks.

view details

push time in 11 days

PR merged llogiq/serdebench

Optimize the capnproto benchmarks.
  • Move opt_bool into a union, rather than a separate struct.
  • Tell HeapAllocator how many words to expect per message.
  • Use read_message_from_flat_slice() to avoid unnecessary copies.
  • Fix build breakage from #3.
+249 -223

1 comment

3 changed files

dwrensha

pr closed time in 11 days

pull request commentllogiq/serdebench

Optimize the capnproto benchmarks.

Thank you! I was wondering what we were doing wrong, but the nagging feeling persisted. Will rerun the benchmark and update the results in the post.

dwrensha

comment created time in 11 days

push eventllogiq/mutagen

dependabot-preview[bot]

commit sha a33213be69f3df987c057d2667d0a3399bc7f625

Update console requirement from 0.11.2 to 0.13.0 (#171) Updates the requirements on [console](https://github.com/mitsuhiko/console) to permit the latest version. - [Release notes](https://github.com/mitsuhiko/console/releases) - [Changelog](https://github.com/mitsuhiko/console/blob/master/CHANGELOG.md) - [Commits](https://github.com/mitsuhiko/console/compare/0.11.2...v0.13.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

view details

push time in 11 days

PR merged llogiq/mutagen

Update console requirement from 0.11.2 to 0.13.0 dependencies

Updates the requirements on console to permit the latest version. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/mitsuhiko/console/blob/master/CHANGELOG.md">console's changelog</a>.</em></p> <blockquote> <h2>0.13.0</h2> <h3>Enhancements</h3> <ul> <li>Added <code>user_attended_stderr</code> for checking if stderr is a terminal</li> <li>Removed <code>termios</code> dependency</li> </ul> <h3>Bug Fixes</h3> <ul> <li>Better handling of key recognition on unix</li> <li><code>Term::terminal_size()</code> on stderr terms correctly returns stderr term info</li> </ul> <h3>Deprecated</h3> <ul> <li>Deprecate <code>Term::is_term()</code> in favor of <code>Term::features().is_attended()</code></li> </ul> <h3>BREAKING</h3> <ul> <li>Remove <code>Term::want_emoji()</code> in favor of <code>Term::features().wants_emoji()</code></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/mitsuhiko/console/commit/903e94a4eb352c635ee195275ec818ec228c2dbd"><code>903e94a</code></a> Release 0.13.0</li> <li><a href="https://github.com/mitsuhiko/console/commit/f19b1d37d22e464c40dcd06d2330c3ab1f01fd57"><code>f19b1d3</code></a> Fix wasm warning</li> <li><a href="https://github.com/mitsuhiko/console/commit/f41acb0e8e7d925665676d46a35c695acaa0eeda"><code>f41acb0</code></a> Fixes <a href="https://github-redirect.dependabot.com/mitsuhiko/console/issues/2">#2</a>, gets the terminal_size for the term target only</li> <li><a href="https://github.com/mitsuhiko/console/commit/0cf5eef88cdb10c9197533119d2e839dfdcf1c6d"><code>0cf5eef</code></a> Deprecate Term::is_term</li> <li><a href="https://github.com/mitsuhiko/console/commit/6f61a0f50b5f7d770139419347d36e7965053624"><code>6f61a0f</code></a> Added <code>user_attended_stderr</code></li> <li><a href="https://github.com/mitsuhiko/console/commit/c1656892b8b656f339805e256dfb88c7a5d8d0c7"><code>c165689</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/mitsuhiko/console/issues/74">#74</a> from atanunq/read-escape-key</li> <li><a href="https://github.com/mitsuhiko/console/commit/fe3a578a2747b708e893ad2cb23d26860da5597d"><code>fe3a578</code></a> Address comments</li> <li><a href="https://github.com/mitsuhiko/console/commit/034de30e420f25fabfca75c974d81f2d3ebb7ddd"><code>034de30</code></a> Fix clippy warning</li> <li><a href="https://github.com/mitsuhiko/console/commit/2073afdab27f66dd2fb72e830607fdd752cbc25d"><code>2073afd</code></a> Remove unnecessary variable</li> <li><a href="https://github.com/mitsuhiko/console/commit/bf45aff26ad9c74cd6b8c00a2f5c89832f7d03ee"><code>bf45aff</code></a> Set buf[0] during declaration</li> <li>Additional commits viewable in <a href="https://github.com/mitsuhiko/console/compare/0.11.2...v0.13.0">compare view</a></li> </ul> </details> <br />

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

</details>

+1 -1

0 comment

1 changed file

dependabot-preview[bot]

pr closed time in 11 days

push eventllogiq/flamer

dependabot-preview[bot]

commit sha 048ebd9c01dd9edf5608ed7a0040f61cc255945a

Bump syn from 1.0.44 to 1.0.45 Bumps [syn](https://github.com/dtolnay/syn) from 1.0.44 to 1.0.45. - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/1.0.44...1.0.45) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

view details

llogiq

commit sha 4ef95a976326902477fe720285ce7e185d94b1c4

Merge pull request #97 from llogiq/dependabot/cargo/syn-1.0.45 Bump syn from 1.0.44 to 1.0.45

view details

push time in 11 days

PR merged llogiq/flamer

Bump syn from 1.0.44 to 1.0.45 dependencies

Bumps syn from 1.0.44 to 1.0.45. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/dtolnay/syn/releases">syn's releases</a>.</em></p> <blockquote> <h2>1.0.45</h2> <ul> <li>Provide more detailed error messages when parsing specific literal kind (<a href="https://github-redirect.dependabot.com/dtolnay/syn/issues/908">#908</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/dtolnay/syn/commit/41622dafbebbe2d724e073a22fd0795844c68d18"><code>41622da</code></a> Release 1.0.45</li> <li><a href="https://github.com/dtolnay/syn/commit/0db160e42efecfc261b89df4e3cd5ad41a7cfc74"><code>0db160e</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dtolnay/syn/issues/908">#908</a> from dtolnay/expectliteral</li> <li><a href="https://github.com/dtolnay/syn/commit/18ccb5b7756ea973d548f64866aeba0bd3d73755"><code>18ccb5b</code></a> Provide more detailed error when parsing specific literal kind</li> <li><a href="https://github.com/dtolnay/syn/commit/1e4e050bb0a73adb1edc632af43ea4353c9fc402"><code>1e4e050</code></a> Add test of Lit parsing error message</li> <li>See full diff in <a href="https://github.com/dtolnay/syn/compare/1.0.44...1.0.45">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

</details>

+52 -54

0 comment

2 changed files

dependabot-preview[bot]

pr closed time in 11 days

PR opened rust-lang/highfive

Join clippy reviewers

I'm back! :smile:

+1 -1

0 comment

1 changed file

pr created time in 11 days

create barnchllogiq/highfive

branch : join-clippy

created branch time in 11 days

fork llogiq/highfive

Github hooks to provide an encouraging atmosphere for new contributors

fork in 11 days

pull request commentrust-lang/rust-clippy

New lint: manual-range-contains

@flip1995 r?

llogiq

comment created time in 11 days

pull request commentllogiq/serdebench

Cleanup

Thank you! I totally forgot to update the benchmark repo when my abomonation PR was merged.

pickfire

comment created time in 13 days

push eventllogiq/serdebench

Ivan Tham

commit sha 16074fc1f17cef8ed74df59a88efb794e2022a16

Bump dependencies

view details

Ivan Tham

commit sha 625ae08330e01eb6ae9814447a5d136f6b3574b6

Cleanup with rustfmt

view details

llogiq

commit sha c50cd007664dbf3f9eb977c25968526bab9237f6

Merge pull request #3 from pickfire/cleanup Cleanup

view details

push time in 13 days

PR merged llogiq/serdebench

Cleanup

Fix old dependency that does not exist.

+1354 -1070

0 comment

5 changed files

pickfire

pr closed time in 13 days

issue commentllogiq/serdebench

Add capn' proto

Me too, but I looked at the code and found no obvious error.

pickfire

comment created time in 13 days

push eventllogiq/compact_arena

Anna Bogus

commit sha 8b9e93156d56909fd0d9d0de0f7834c5b9e069c1

refactor and increment minor version

view details

llogiq

commit sha b66f8a2f000cd91ce18f67f4c9f9974fe6e19ded

Merge pull request #32 from 4tm4j33tk4ur/refactor refactor and increment minor version

view details

push time in 13 days

PR merged llogiq/compact_arena

refactor and increment minor version

I think this should probably be published on crates.io.

+58 -78

1 comment

2 changed files

4tm4j33tk4ur

pr closed time in 13 days

pull request commentllogiq/compact_arena

refactor and increment minor version

Thank you. Will publish soon.

4tm4j33tk4ur

comment created time in 13 days

pull request commentrust-lang/rust-clippy

New lint: manual-range-contains

Nevermind, I fixed it en passant. Seems to relate to String::new() now being const fn.

llogiq

comment created time in 13 days

push eventrust-lang/rust-clippy

Andre Bogus

commit sha b9953fa8f9c57d68ed90d4462ebcbfbd4625ba9d

New lint: manual-range-contains

view details

push time in 13 days

pull request commentrust-lang/rust-clippy

New lint: manual-range-contains

Cool. Now there seems to be yet another unrelated error!?

llogiq

comment created time in 13 days

push eventrust-lang/rust-clippy

Andre Bogus

commit sha 370c8cc99102f755f72ed3e19002a8c81e9248a7

New lint: manual-range-contains

view details

push time in 13 days

push eventrust-lang/rust-clippy

Santiago Pastorino

commit sha 0af467ebf2da4994aee56b2b70c59028170a88ba

Handle ExprKind::ConstBlock on clippy

view details

Eduardo Broto

commit sha bc438628206b642fc5a72633431dfcc6cd48949a

Merge remote-tracking branch 'upstream/master' into rustup

view details

bors

commit sha 01dd31fa60d2decef6322b94b65bd25a1194537e

Auto merge of #6189 - ebroto:rustup, r=ebroto Rustup changelog: none r? `@ghost`

view details

Andre Bogus

commit sha 084ef72b684fa5bf4f2d67cb1d5c0988c550d40d

New lint: manual-range-contains

view details

push time in 13 days

pull request commentrust-lang/rust-clippy

New lint: manual-range-contains

@flip1995 Done....and...we need yet another rustup.

llogiq

comment created time in 13 days

Pull request review commentrust-lang/rust-clippy

New lint: manual-range-contains

 impl<'tcx> LateLintPass<'tcx> for Ranges {     } } +fn check_possible_range_contains(cx: &LateContext<'_>, op: BinOpKind, l: &Expr<'_>, r: &Expr<'_>, span: Span) {+    let combine_and = match op {+        BinOpKind::And | BinOpKind::BitAnd => true,+        BinOpKind::Or | BinOpKind::BitOr => false,+        _ => return,+    };+    // value, name, order (higher/lower), inclusiveness+    if let (Some((lval, lname, name_span, lval_span, lord, linc)), Some((rval, rname, _, rval_span, rord, rinc))) =+        (check_range_bounds(cx, l), check_range_bounds(cx, r))+    {+        // we only lint comparisons on the same name and with different+        // direction+        if lname != rname || lord == rord {+            return;+        }+        let ord = Constant::partial_cmp(cx.tcx, cx.typeck_results().expr_ty(l), &lval, &rval);+        if combine_and && ord == Some(rord) {+            // order lower bound and upper bound+            let (l_span, u_span, l_inc, u_inc) = if rord == Ordering::Less {+                (lval_span, rval_span, linc, rinc)+            } else {+                (rval_span, lval_span, rinc, linc)+            };+            // we only lint inclusive lower bounds+            if !l_inc {+                return;+            }+            let (range_type, range_op) = if u_inc {+                ("RangeInclusive", "..=")+            } else {+                ("Range", "..")+            };+            span_lint_and_then(+                cx,+                MANUAL_RANGE_CONTAINS,+                span,+                &format!("manual `{}::contains` implementation", range_type),+                |diag| {+                    let mut applicability = Applicability::MachineApplicable;+                    let name = snippet_with_applicability(cx, name_span, "_", &mut applicability);+                    let lo = snippet_with_applicability(cx, l_span, "_", &mut applicability);+                    let hi = snippet_with_applicability(cx, u_span, "_", &mut applicability);+                    diag.span_suggestion(+                        span,+                        "use",+                        format!("({}{}{}).contains({})", lo, range_op, hi, name),+                        applicability,+                    );+                },+            );+        } else if !combine_and && ord == Some(lord) {+            // `!_.contains(_)`+            // order lower bound and upper bound+            let (l_span, u_span, l_inc, u_inc) = if lord == Ordering::Less {+                (lval_span, rval_span, linc, rinc)+            } else {+                (rval_span, lval_span, rinc, linc)+            };+            if l_inc {+                return;+            }+            let (range_type, range_op) = if u_inc {+                ("Range", "..")+            } else {+                ("RangeInclusive", "..=")+            };+            span_lint_and_then(+                cx,+                MANUAL_RANGE_CONTAINS,+                span,+                &format!("manual `!{}::contains` implementation", range_type),+                |diag| {+                    let mut applicability = Applicability::MachineApplicable;+                    let name = snippet_with_applicability(cx, name_span, "_", &mut applicability);+                    let lo = snippet_with_applicability(cx, l_span, "_", &mut applicability);+                    let hi = snippet_with_applicability(cx, u_span, "_", &mut applicability);+                    diag.span_suggestion(+                        span,+                        "use",+                        format!("!({}{}{}).contains({})", lo, range_op, hi, name),+                        applicability,+                    );+                },+            );+        }+    }+}++fn check_range_bounds(cx: &LateContext<'_>, ex: &Expr<'_>) -> Option<(Constant, Ident, Span, Span, Ordering, bool)> {+    if let ExprKind::Binary(ref op, ref l, ref r) = ex.kind {+        let (inclusive, ordering) = match op.node {+            BinOpKind::Gt => (false, Ordering::Greater),+            BinOpKind::Ge => (true, Ordering::Greater),+            BinOpKind::Lt => (false, Ordering::Less),+            BinOpKind::Le => (true, Ordering::Less),+            _ => return None,+        };+        if let Some(id) = match_ident(l) {+            if let Some((c, _)) = constant(cx, cx.typeck_results(), r) {+                return Some((c, id, l.span, r.span, ordering, inclusive));+            }+        } else if let Some(id) = match_ident(r) {+            if let Some((c, _)) = constant(cx, cx.typeck_results(), l) {+                return Some((c, id, r.span, l.span, ordering.reverse(), inclusive));+            }+        }+    }+    None+}++fn match_ident(e: &Expr<'_>) -> Option<Ident> {+    if let ExprKind::Path(ref qpath) = e.kind {+        if let Some(seg) = single_segment_path(qpath) {+            if seg.args.is_none() {+                return Some(seg.ident);+            }+        }+    }+    None+}++fn check_range_zip_with_len(cx: &LateContext<'_>, path: &PathSegment<'_>, args: &[Expr<'_>], span: Span) {+    let name = path.ident.as_str();+    if name == "zip" && args.len() == 2 {+        let iter = &args[0].kind;+        let zip_arg = &args[1];+        if_chain! {+            // `.iter()` call+            if let ExprKind::MethodCall(ref iter_path, _, ref iter_args, _) = *iter;+            if iter_path.ident.name == sym!(iter);+            // range expression in `.zip()` call: `0..x.len()`+            if let Some(higher::Range { start: Some(start), end: Some(end), .. }) = higher::range(zip_arg);+            if is_integer_const(cx, start, 0);+            // `.len()` call+            if let ExprKind::MethodCall(ref len_path, _, ref len_args, _) = end.kind;+            if len_path.ident.name == sym!(len) && len_args.len() == 1;+            // `.iter()` and `.len()` called on same `Path`+            if let ExprKind::Path(QPath::Resolved(_, ref iter_path)) = iter_args[0].kind;+            if let ExprKind::Path(QPath::Resolved(_, ref len_path)) = len_args[0].kind;+            if SpanlessEq::new(cx).eq_path_segments(&iter_path.segments, &len_path.segments);+            then {+                span_lint(cx,+                RANGE_ZIP_WITH_LEN,+                span,+                &format!("it is more idiomatic to use `{}.iter().enumerate()`",+                    snippet(cx, iter_args[0].span, "_")));

Somehow cargo dev fmt did this. Fixed.

llogiq

comment created time in 13 days

PullRequestReviewEvent

Pull request review commentrust-lang/rust-clippy

New lint: manual-range-contains

 impl<'tcx> LateLintPass<'tcx> for Ranges {     } } +fn check_possible_range_contains(cx: &LateContext<'_>, op: BinOpKind, l: &Expr<'_>, r: &Expr<'_>, span: Span) {+    let combine_and = match op {+        BinOpKind::And | BinOpKind::BitAnd => true,+        BinOpKind::Or | BinOpKind::BitOr => false,+        _ => return,+    };+    // value, name, order (higher/lower), inclusiveness+    if let (Some((lval, lname, name_span, lval_span, lord, linc)), Some((rval, rname, _, rval_span, rord, rinc))) =+        (check_range_bounds(cx, l), check_range_bounds(cx, r))+    {+        // we only lint comparisons on the same name and with different+        // direction+        if lname != rname || lord == rord {+            return;+        }+        let ord = Constant::partial_cmp(cx.tcx, cx.typeck_results().expr_ty(l), &lval, &rval);+        if combine_and && ord == Some(rord) {+            // order lower bound and upper bound+            let (l_span, u_span, l_inc, u_inc) = if rord == Ordering::Less {+                (lval_span, rval_span, linc, rinc)+            } else {+                (rval_span, lval_span, rinc, linc)+            };+            // we only lint inclusive lower bounds+            if !l_inc {+                return;+            }+            let (range_type, range_op) = if u_inc {+                ("RangeInclusive", "..=")+            } else {+                ("Range", "..")+            };+            span_lint_and_then(+                cx,+                MANUAL_RANGE_CONTAINS,+                span,+                &format!("manual `{}::contains` implementation", range_type),+                |diag| {+                    let mut applicability = Applicability::MachineApplicable;+                    let name = snippet_with_applicability(cx, name_span, "_", &mut applicability);+                    let lo = snippet_with_applicability(cx, l_span, "_", &mut applicability);+                    let hi = snippet_with_applicability(cx, u_span, "_", &mut applicability);+                    diag.span_suggestion(+                        span,+                        "use",+                        format!("({}{}{}).contains({})", lo, range_op, hi, name),+                        applicability,+                    );+                },+            );+        } else if !combine_and && ord == Some(lord) {+            // `!_.contains(_)`+            // order lower bound and upper bound+            let (l_span, u_span, l_inc, u_inc) = if lord == Ordering::Less {+                (lval_span, rval_span, linc, rinc)+            } else {+                (rval_span, lval_span, rinc, linc)+            };+            if l_inc {+                return;+            }+            let (range_type, range_op) = if u_inc {+                ("Range", "..")+            } else {+                ("RangeInclusive", "..=")+            };+            span_lint_and_then(

Done, thanks!

llogiq

comment created time in 13 days

PullRequestReviewEvent

Pull request review commentrust-lang/rust-clippy

New lint: manual-range-contains

 fn no_panic_with_fake_range_types() {      let _ = Range { foo: 0 }; }++#[warn(clippy::manual_range_contains)]

Sure thing!

llogiq

comment created time in 13 days

PullRequestReviewEvent

push eventrust-lang/rust-clippy

Andre Bogus

commit sha 122ccbc6d49c4f29ce453d726a844a7ae199bb31

New lint: manual-range-contains

view details

push time in 13 days

delete branch rust-lang/rust-clippy

delete branch : cow

delete time in 13 days

delete branch rust-lang/rust-clippy

delete branch : ptr_arg_calls

delete time in 13 days

delete branch rust-lang/rust-clippy

delete branch : needless-doc-main-syn

delete time in 13 days

delete branch rust-lang/rust-clippy

delete branch : fix-5593

delete time in 13 days

pull request commentrust-lang/rust-clippy

New lint: manual-range-contains

I don't think I'll need them anymore. Will delete them once I get to my PC.

llogiq

comment created time in 13 days

issue commentrust-lang/rust-clippy

Minimum supported version of Rust (MSVR) config and support

Just a heads up: manual_range_contains should have a msrv of 1.35.0.

mikerite

comment created time in 13 days

push eventllogiq/compact_arena

Anna Bogus

commit sha 0a0188afb879054c1ec14300a99fa9dc5af3a5ef

fmt and extended docs

view details

llogiq

commit sha 6a64b0e76ab849fa80d1b7ffca42f95d9fe0e348

Merge pull request #31 from 4tm4j33tk4ur/recycle-doc fmt and extended docs

view details

push time in 13 days

PR merged llogiq/compact_arena

fmt and extended docs

Looking into the recycle implementation for TinyArena and NanoArena, I found that since they store the elements inline, recycling gets no benefit compared to just re-creating the arenas. So I at least documented that fact and ran cargo fmt on the code.

+67 -34

1 comment

6 changed files

4tm4j33tk4ur

pr closed time in 13 days

pull request commentllogiq/compact_arena

fmt and extended docs

Thank you!

4tm4j33tk4ur

comment created time in 13 days

more