Skip to content

Box<T> where T is small #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pythonesque opened this issue Nov 19, 2014 · 0 comments
Open

Box<T> where T is small #7

pythonesque opened this issue Nov 19, 2014 · 0 comments
Labels
A-lint Area: New lints E-medium Call for participation: Medium difficulty level problem and requires some initial experience. L-perf Lint: Belongs in the perf lint group T-middle Type: Probably requires verifiying types

Comments

@pythonesque
Copy link
Contributor

Where:

  • Small means "three words or fewer" (a la Vec)
  • Box is not required for monomorphization
  • T is not actually a generic (that is, your code doesn't have to work with potentially differently sized Ts).

Note that HashMap is five words by default, so it actually shouldn't qualify for this lint (IMO) but it would subsume the Vec lint.

@Manishearth Manishearth added E-medium Call for participation: Medium difficulty level problem and requires some initial experience. T-middle Type: Probably requires verifiying types A-lint Area: New lints labels Aug 11, 2015
@mcarton mcarton added the L-perf Lint: Belongs in the perf lint group label Jun 28, 2016
yaahc pushed a commit to yaahc/rust-clippy that referenced this issue Mar 14, 2019
surechen added a commit to surechen/rust-clippy that referenced this issue Jun 26, 2023
commit 3a413b7
Merge: d5a1eff 4d8af6f
Author: surechen <chenshuo17@huawei.com>
Date:   Mon Jun 26 11:32:14 2023 +0800

    Merge pull request rust-lang#5 from mojave2/lint_loop_exit

    new_lint loop_without_break_or_return

commit 4d8af6f
Author: mojave2 <0109chenchen@gmail.com>
Date:   Sun Jun 25 19:21:11 2023 +0800

    new_line loop_without_break_or_return

    Signed-off-by: mojave2 <0109chenchen@gmail.com>

commit d5a1eff
Merge: af6c9d4 9cd4b13
Author: surechen <chenshuo17@huawei.com>
Date:   Mon Jun 26 11:23:44 2023 +0800

    Merge pull request rust-lang#2 from mojave2/dev_stable

    new_lint non_reentrant_functions

commit 9cd4b13
Author: mojave2 <0109chenchen@gmail.com>
Date:   Wed Jun 21 17:44:12 2023 +0800

    update_lint non_reentrant_functions

    Signed-off-by: mojave2 <0109chenchen@gmail.com>

commit c900d4a
Author: mojave2 <0109chenchen@gmail.com>
Date:   Mon Jun 19 18:37:16 2023 +0800

    update_lint non_reentrant_functions

    Signed-off-by: mojave2 <0109chenchen@gmail.com>

commit 9845b3a
Author: mojave2 <0109chenchen@gmail.com>
Date:   Sat Jun 17 16:32:10 2023 +0800

    improve implementation by dogfood

    Signed-off-by: mojave2 <0109chenchen@gmail.com>

commit a3a1415
Author: mojave2 <0109chenchen@gmail.com>
Date:   Sat Jun 17 15:29:11 2023 +0800

    doc-comment non_reentrant_functions

    Signed-off-by: mojave2 <0109chenchen@gmail.com>

commit eb80bb0
Author: mojave2 <0109chenchen@gmail.com>
Date:   Sat Jun 17 15:14:34 2023 +0800

    new_lint non_reentrant_functions

    Signed-off-by: mojave2 <0109chenchen@gmail.com>

commit af6c9d4
Merge: 38ab3a3 33ddd19
Author: surechen <chenshuo17@huawei.com>
Date:   Mon Jun 26 10:54:08 2023 +0800

    Merge pull request rust-lang#7 from J-ZhengLi/dev_stable

    fix test fail after dev fmt of [`implicit_abi`]

commit 33ddd19
Author: J-ZhengLi <lizheng135@huawei.com>
Date:   Mon Jun 26 10:15:26 2023 +0800

    fix test fail after dev fmt of [`implicit_abi`]

    Signed-off-by: J-ZhengLi <lizheng135@huawei.com>

commit 38ab3a3
Merge: 83e42a2 5ce5313
Author: surechen <chenshuo17@huawei.com>
Date:   Mon Jun 26 09:47:22 2023 +0800

    Merge pull request rust-lang#1 from J-ZhengLi/dev_stable

    add new lints: [`mem_unsafe_functions`], [`unsafe_block_in_proc_macro`] and [`implicit_abi`]

commit 5ce5313
Author: J-ZhengLi <lizheng135@huawei.com>
Date:   Wed Jun 21 11:24:29 2023 +0800

    add new lint [`implicit_abi`]
    that detects external block without explicit label "C"

    Signed-off-by: J-ZhengLi <lizheng135@huawei.com>

commit cc5ab4a
Author: J-ZhengLi <lizheng135@huawei.com>
Date:   Tue Jun 20 12:44:02 2023 +0800

    add new lint [`unsafe_block_in_proc_macro`]
    that detects unsafe block in `quote!`

    Signed-off-by: J-ZhengLi <lizheng135@huawei.com>

commit c091b77
Author: J-ZhengLi <lizheng135@huawei.com>
Date:   Sat Jun 17 15:59:56 2023 +0800

    add configuration for lint [`mem_unsafe_functions`];
    finish implement lint [`mem_unsafe_functions`];
    add simple description for unimplemented lints;

    Signed-off-by: J-ZhengLi <lizheng135@huawei.com>

commit a50f308
Author: J-ZhengLi <lizheng135@huawei.com>
Date:   Fri Jun 16 17:45:56 2023 +0800

    init following new lints:

    [`passing_string_to_c_functions`]
    [`untrusted_lib_loading`]
    [`falliable_memory_allocation`]

    Signed-off-by: J-ZhengLi <lizheng135@huawei.com>

commit da3cc15
Author: J-ZhengLi <lizheng135@huawei.com>
Date:   Fri Jun 16 14:11:59 2023 +0800

    add `guidelines` type and barebone for [`mem_unsafe_functions`] lint

    Signed-off-by: J-ZhengLi <lizheng135@huawei.com>

# Conflicts:
#	clippy_lints/src/lib.rs
surechen added a commit to surechen/rust-clippy that referenced this issue Jun 26, 2023
fix test fail after dev fmt of [`implicit_abi`]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: New lints E-medium Call for participation: Medium difficulty level problem and requires some initial experience. L-perf Lint: Belongs in the perf lint group T-middle Type: Probably requires verifiying types
Projects
None yet
Development

No branches or pull requests

3 participants