Skip to content
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

Clippy subtree update #137317

Open
wants to merge 194 commits into
base: master
Choose a base branch
from
Open

Conversation

flip1995
Copy link
Member

r? @Manishearth

Cargo.lock change because of Clippy version bump and rustc_tool_utils new release.

smoelius and others added 30 commits November 15, 2024 17:33
Proposing to replace

```rust
let mut x = PathBuf::from("/foo");
x.push("/bar");
```

by

```rust
let mut x = PathBuf::from("/foo");
x.push("bar");
```

changes the content of `x` (`/bar` ⇒ `/foo/bar`).
By assuming that a recursive type is normalizable within the deeper
calls to `is_normalizable_helper()`, more cases can be handled by this
function.

In order to fix stack overflows, a recursion limit has also been added
for recursive generic type instantiations.
`manual_ok_or` covers the same case that were covered by
`option_map_or_err_ok` which is not deprecated. The latter was in the
"style" category. Also, the lint is machine applicable, and leads to
shorter and more readable code, so "style" is appropriate.

The only difference is that the η-expanded form of `Result::Ok()` was
not covered by `option_map_or_err_ok` while it is by `manual_ok_or`, so
the category change may expose some new occurrences.
Removing the `.as_ref()` or `.as_mut()` as the top-level expression in a
closure may change the type of the result. In this case, it may be
better not to lint rather than proposing a fix that would not work.
Labeled blocks cannot be used as-is in the "then" or "else" part of an
`if` expression. They must be enclosed in an anonymous block.
This is the lint described at
rust-lang#136308 (comment)
that recommends using HTML to nest links inside code.
- `reindent_multiline()` always returns the result of
  `reindent_multiline_inner()` which returns a `String`. Make
  `reindent_multiline()` return a `String` as well, instead of a
  systematically owned `Cow<'_, str>`.
- There is no reason for `reindent_multiline()` to force a caller to
  build a `Cow<'_, str>` instead of passing a `&str` directly,
  especially considering that a `String` will always be returned.

Also, both the input parameter and return value (of type `Cow<'_, str>`)
shared the same (elided) lifetime for no reason: this worked only because
the result was always the `Cow::Owned` variant which is compatible with
any lifetime.

As a consequence, the signature changes from:

```rust
fn reindent_multiline(s: Cow<'_, str>, …) -> Cow<'_, str> { … }
```

to

```rust
fn reindent_multiline(s: &str, …) -> String { … }
```
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Feb 20, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 20, 2025
This test only makes sense to run in the Clippy repo

In the Rust repo the name of the host_compiler is dev, not nightly
@flip1995 flip1995 force-pushed the clippy-subtree-update branch from 69b1330 to 600901d Compare February 20, 2025 20:24
@flip1995
Copy link
Member Author

It was an easy stderr/--bless update. I also had to deactivate an integration test, that shouldn't run in the Rust repo.

@Manishearth
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Feb 20, 2025

📌 Commit 600901d has been approved by Manishearth

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 20, 2025
@bors
Copy link
Contributor

bors commented Feb 20, 2025

⌛ Testing commit 600901d with merge b231c902a489fc8db03d395c911bfac470483038...

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 20, 2025
…nishearth

Clippy subtree update

r? `@Manishearth`

`Cargo.lock` change because of Clippy version bump and `rustc_tool_utils` new release.
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Feb 21, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 21, 2025
@flip1995
Copy link
Member Author

@bors r=Manishearth

Let's hope 826e87f was the last fix required.

@bors
Copy link
Contributor

bors commented Feb 21, 2025

📌 Commit 826e87f has been approved by Manishearth

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 21, 2025
@bors
Copy link
Contributor

bors commented Feb 21, 2025

⌛ Testing commit 826e87f with merge fec7265...

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 21, 2025
…nishearth

Clippy subtree update

r? `@Manishearth`

`Cargo.lock` change because of Clippy version bump and `rustc_tool_utils` new release.
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-fuchsia failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
    |
164 |     ) -> Result<Self, (Self, MirrorConfigError)> {
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 192 bytes
    |
    = help: try reducing the size of `(repo::MirrorConfigBuilder, errors::MirrorConfigError)`, for example by boxing large elements or replacing it with `Box<(repo::MirrorConfigBuilder, errors::MirrorConfigError)>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
    = note: `-D clippy::result-large-err` implied by `-D warnings`


warning: the `Err`-variant returned from this function is very large
##[warning]   --> ../../src/sys/lib/fidl-fuchsia-pkg-ext/src/repo.rs:175:10
##[warning]   --> ../../src/sys/lib/fidl-fuchsia-pkg-ext/src/repo.rs:175:10
    |
175 |     ) -> Result<Self, (Self, MirrorConfigError)> {
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 192 bytes
    |
    = help: try reducing the size of `(repo::MirrorConfigBuilder, errors::MirrorConfigError)`, for example by boxing large elements or replacing it with `Box<(repo::MirrorConfigBuilder, errors::MirrorConfigError)>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: 2 warnings emitted


---
warning: large size difference between variants
##[warning]  --> ../../src/developer/ffx/config/macro/proc_macro/src/lib.rs:61:1
   |
61 | / enum ConfigArgs {
62 | |     Str(syn::LitStr),
   | |     ---------------- the second-largest variant contains at least 8 bytes
63 | |     MetaNameValue(syn::MetaNameValue),
64 | | }
   | |_^ the entire enum is at least 312 bytes
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
   = note: `-D clippy::large-enum-variant` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::large_enum_variant)]`
help: consider boxing the large fields to reduce the total size of the enum
   |
63 -     MetaNameValue(syn::MetaNameValue),
63 +     MetaNameValue(Box<syn::MetaNameValue>),


warning: 1 warning emitted

---
[3428/21694] RUST host_x64/obj/third_party/rust_crates/libarrayvec-1608a91a4e3a890.rlib host_x64/obj/third_party/rust_crates/libarrayvec-1608a91a4e3a890.rmeta
[3429/21694] RUST host_x64/obj/third_party/rust_crates/libbytecount-b4fade0a2dc4ee4a.rlib host_x64/obj/third_party/rust_crates/libbytecount-b4fade0a2dc4ee4a.rmeta
[3430/21694] ACTION //third_party/rust_crates:heck-v0_3_1.license(//build/toolchain:host_x64)
[3431/21694] CLIPPY //build/sdk/meta:rust.actual.clippy(//build/toolchain:host_x64)
FAILED: host_x64/gen/build/sdk/meta/rust.actual.clippy 
../../build/rust/clippy_wrapper.sh --output host_x64/gen/build/sdk/meta/rust.actual.clippy --jq ../../prebuilt/third_party/jq/linux-x64/bin/jq --deps host_x64/gen/build/sdk/meta/rust.aux.deps.rmeta --transdeps host_x64/gen/build/sdk/meta/rust.aux.transdeps --fail -- env  ../../../install/bin/clippy-driver ../../build/sdk/meta/src/lib.rs --sysroot=../../../install --crate-type=rlib -Aclippy::all -Cmetadata=clippy --cfg=__rust_toolchain=\"9665d318c2175d6cff25e30ce7ee293adbc0549f\" -Clinker=../../prebuilt/third_party/clang/linux-x64/bin/clang++ -Cdefault-linker-libraries -Clink-arg=--sysroot=../../prebuilt/third_party/sysroot/linux -Clink-arg=--target=x86_64-unknown-linux-gnu -Clink-arg=-stdlib=libc++ -Clink-arg=--start-no-unused-arguments -Clink-arg=-unwindlib=libunwind -Clink-arg=-rtlib=compiler-rt -Clink-arg=--end-no-unused-arguments -Clink-arg=-fuse-ld=lld -Clink-arg=-Wl,--build-id -Zremap-cwd-prefix=. -Copt-level=0 -Cdebuginfo=0 -Clink-arg=-gz=zstd -Cdebug-assertions=yes -Zallow-features= --target x86_64-unknown-linux-gnu --cap-lints=warn -Wrust-2018-idioms -Dderef-nullptr -Dinvalid-value -Dunused-must-use -Aunknown_lints -Anon_local_definitions -Aelided_named_lifetimes -Dwarnings -Clinker=../../prebuilt/third_party/clang/linux-x64/bin/clang++ -Cdefault-linker-libraries -Clink-arg=--sysroot=../../prebuilt/third_party/sysroot/linux -Clink-arg=--target=x86_64-unknown-linux-gnu -Clink-arg=-stdlib=libc++ -Clink-arg=--start-no-unused-arguments -Clink-arg=-unwindlib=libunwind -Clink-arg=-rtlib=compiler-rt -Clink-arg=--end-no-unused-arguments -Clink-arg=-fuse-ld=lld -Clink-arg=-Wl,--build-id -Clink-arg=-static-libstdc++ -Clink-arg=-Wl,-rpath=\$ORIGIN/ -Wunused_crate_dependencies -Dunused_results -Aunused_results --edition=2021 -Wclippy::correctness -Wclippy::expect_fun_call -Wclippy::large_enum_variant -Wclippy::large_futures -Wclippy::missing_safety_doc -Wclippy::unnecessary_mut_passed -Wclippy::clear_with_drain -Wclippy::collection_is_never_read -Wclippy::needless_collect -Wclippy::or_fun_call -Wclippy::perf -Wclippy::redundant_clone -Wclippy::set_contains_or_insert -Wclippy::unnecessary_lazy_evaluation -Cmetadata=host_x64/obj/build/sdk/meta\ rust @rust_api_level_cfg_flags.txt
jq: parse error: Invalid literal at line 2, column 7
[3433/21694] ACTION //third_party/rust_crates:nom_locate-v4_2_0.license(//build/toolchain:host_x64)
[3434/21694] ACTION //third_party/rust_crates:num-derive-v0_4_2.license(//build/toolchain:host_x64)
[3435/21694] ACTION //third_party/rust_crates:strsim-v0_8_0.license(//build/toolchain:host_x64)
[3436/21694] RUST host_x64/obj/third_party/rust_crates/libasync_fs-d08414b37762da39.rlib host_x64/obj/third_party/rust_crates/libasync_fs-d08414b37762da39.rmeta
---
[4363/21694] RUST obj/src/storage/lib/vfs/rust/libvfs.rlib obj/src/storage/lib/vfs/rust/libvfs.rmeta
[4364/21694] ACTION //third_party/golibs:golang.org/x/exp(//build/toolchain:host_x64)
[4365/21694] CXX host_x64/obj/sdk/lib/fit-promise/libfit-promise.single_threaded_executor.cc.o
[4366/21694] CLIPPY //src/storage/lib/vfs/rust:vfs.actual.clippy(//build/toolchain/fuchsia:x64)
warning: using `contains()` instead of `iter().any()` is more efficient
    |
    |
270 |         if name.iter().any(|c| *c == 0) {
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `name.contains(&0)`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains
    = note: `-D clippy::manual-contains` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::manual_contains)]`



warning: using `contains()` instead of `iter().any()` is more efficient
    |
    |
996 |         if name.iter().any(|c| *c == 0) {
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `name.contains(&0)`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains



warning: using `contains()` instead of `iter().any()` is more efficient
    |
    |
297 |         if name.iter().any(|c| *c == 0) {
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `name.contains(&0)`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains


warning: 3 warnings emitted
---
[7706/21694] CLIPPY //src/sys/lib/routing:routing.actual.clippy(//build/toolchain:host_x64)
warning: large size difference between variants
##[warning]   --> ../../src/sys/lib/routing/src/legacy_router.rs:758:1
    |
758 | / enum RegistrationResult<C: ComponentInstanceInterface + 'static, O: Clone + fmt::Debug> {
759 | |     /// The source of the Registration was found (Framework, AboveRoot, etc.).
760 | |     Source(CapabilitySource),
761 | |     /// The Registration led to a parent Offer declaration.
...   |
...   |
764 | |     FromChild(RouteBundle<ExposeDecl>, Arc<C>),
765 | | }
    | |_^ the entire enum is at least 320 bytes
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
    = note: `-D clippy::large-enum-variant` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::large_enum_variant)]`
help: consider boxing the large fields to reduce the total size of the enum
    |
760 -     Source(CapabilitySource),
760 +     Source(Box<CapabilitySource>),


warning: large size difference between variants
##[warning]    --> ../../src/sys/lib/routing/src/legacy_router.rs:1180:1
##[warning]    --> ../../src/sys/lib/routing/src/legacy_router.rs:1180:1
     |
1180 | / enum ExposeResult<C: ComponentInstanceInterface + 'static> {
1181 | |     /// The source of the Expose was found (Framework, Component, etc.).
1182 | |     Source(CapabilitySource),
1183 | |     /// The source of the Expose comes from an aggregation of collections and/or static children
1183 | |     /// The source of the Expose comes from an aggregation of collections and/or static children
1184 | |     ExposeFromAnonymizedAggregate(RouteBundle<ExposeDecl>, Arc<C>),
1185 | | }
     | |_^ the entire enum is at least 320 bytes
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
help: consider boxing the large fields to reduce the total size of the enum
     |
1182 -     Source(CapabilitySource),
1182 +     Source(Box<CapabilitySource>),


warning: large size difference between variants
##[warning]    --> ../../src/sys/lib/routing/src/legacy_router.rs:1344:1
##[warning]    --> ../../src/sys/lib/routing/src/legacy_router.rs:1344:1
     |
1344 | / enum ExposeSegment<C: ComponentInstanceInterface + 'static> {
1345 | |     Done(ExposeResult<C>),
     | |     --------------------- the largest variant contains at least 320 bytes
1346 | |     Next(RouteBundle<ExposeDecl>, Arc<C>),
1347 | | }
     | |_^ the entire enum is at least 320 bytes
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
help: consider boxing the large fields to reduce the total size of the enum
     |
1345 -     Done(ExposeResult<C>),
1345 +     Done(Box<ExposeResult<C>>),


warning: 3 warnings emitted

---
    |
146 | / enum FieldAttrArg {
147 | |     Ident(syn::Ident),
    | |     ----------------- the second-largest variant contains at least 32 bytes
148 | |     NameValue(syn::MetaNameValue),
149 | | }
    | |_^ the entire enum is at least 312 bytes
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
    = note: `-D clippy::large-enum-variant` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::large_enum_variant)]`
help: consider boxing the large fields to reduce the total size of the enum
    |
148 -     NameValue(syn::MetaNameValue),
148 +     NameValue(Box<syn::MetaNameValue>),


warning: 1 warning emitted

---
80 | |          _underscore: Token![_],
81 | |      },
82 | |      SingleName(Alias),
   | |      ----------------- the largest variant contains at least 432 bytes
83 | |/     Union {
84 | ||         _union_keyword: Token![union],
85 | ||         _brace: token::Brace,
86 | ||         aliases: Punctuated<Alias, Token![,]>,
   | ||_____- the second-largest variant contains at least 56 bytes
88 | |  }
   | |__^ the entire enum is at least 432 bytes
   |
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
   = note: `-D clippy::large-enum-variant` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::large_enum_variant)]`
help: consider boxing the large fields to reduce the total size of the enum
   |
82 -     SingleName(Alias),
82 +     SingleName(Box<Alias>),


warning: 1 warning emitted

---
    |
164 |     ) -> Result<Self, (Self, MirrorConfigError)> {
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 192 bytes
    |
    = help: try reducing the size of `(repo::MirrorConfigBuilder, errors::MirrorConfigError)`, for example by boxing large elements or replacing it with `Box<(repo::MirrorConfigBuilder, errors::MirrorConfigError)>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
    = note: `-D clippy::result-large-err` implied by `-D warnings`


warning: the `Err`-variant returned from this function is very large
##[warning]   --> ../../src/sys/lib/fidl-fuchsia-pkg-ext/src/repo.rs:175:10
##[warning]   --> ../../src/sys/lib/fidl-fuchsia-pkg-ext/src/repo.rs:175:10
    |
175 |     ) -> Result<Self, (Self, MirrorConfigError)> {
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 192 bytes
    |
    = help: try reducing the size of `(repo::MirrorConfigBuilder, errors::MirrorConfigError)`, for example by boxing large elements or replacing it with `Box<(repo::MirrorConfigBuilder, errors::MirrorConfigError)>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: 2 warnings emitted


---
[9610/21694] RUST obj/src/connectivity/wlan/lib/common/rust/libwlan_common.rlib obj/src/connectivity/wlan/lib/common/rust/libwlan_common.rmeta
[9611/21694] CXX obj/BUILD_DIR/fidling/gen/src/devices/bin/driver_manager/driver_manager_config_fidl_internal/cpp/fidl/cf.sc.internal/cpp/driver_manager_config_fidl_internal_cpp.natural_ostream.cc.o
[9612/21694] CXX obj/BUILD_DIR/fidling/gen/src/devices/bin/driver_manager/driver_manager_config_fidl_internal/cpp/fidl/cf.sc.internal/cpp/driver_manager_config_fidl_internal_cpp.natural_types.cc.o
[9613/21694] CLIPPY //src/connectivity/wlan/lib/common/rust:wlan-common.actual.clippy(//build/toolchain/fuchsia:x64)
warning: using `contains()` instead of `iter().any()` is more efficient
##[warning]  --> ../../src/connectivity/wlan/lib/common/rust/src/ie/rsn/suite_filter.rs:41:16
   |
41 |             && self.known_group_data_ciphers.iter().any(|s| group_data_cipher.suite_type == *s);
   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.known_group_data_ciphers.contains(&group_data_cipher.suite_type)`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains
   = note: `-D clippy::manual-contains` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::manual_contains)]`



warning: using `contains()` instead of `iter().any()` is more efficient
##[warning]  --> ../../src/connectivity/wlan/lib/common/rust/src/ie/rsn/suite_filter.rs:46:49
   |
46 |             .any(|a| a.has_known_algorithm() && self.known_akms.iter().any(|s| a.suite_type == *s));
   |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.known_akms.contains(&a.suite_type)`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains



warning: using `contains()` instead of `iter().any()` is more efficient
##[warning]  --> ../../src/connectivity/wlan/lib/common/rust/src/ie/rsn/suite_filter.rs:54:36
   |
54 |             c.has_known_usage() && self.known_pairwise_ciphers.iter().any(|s| c.suite_type == *s)
   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.known_pairwise_ciphers.contains(&c.suite_type)`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains


warning: 3 warnings emitted
---
   |
19 |       let manifest = url
   |  ____________________^
20 | |         .resource()
21 | |         .split('/')
   | |__________-----^
   |            |
   |            help: try: `next_back()`
   |
---
[11642/21694] CLIPPY //src/lib/fuchsia-component-test:fuchsia-component-test-lib.actual.clippy(//build/toolchain/fuchsia:x64)
warning: the `Err`-variant returned from this function is very large
##[warning]   --> ../../src/lib/fuchsia-component-test/src/lib.rs:110:57
    |
110 |     fn check_scope(&self, realm_scope: &Vec<String>) -> Result<(), Error> {
    |
   ::: ../../src/lib/fuchsia-component-test/src/error.rs:45:5
    |
    |
45  |     FromDictionaryNotSupported(ftest::Capability),
    |
    = help: try reducing the size of `error::Error`, for example by boxing large elements or replacing it with `Box<error::Error>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
    = note: `-D clippy::result-large-err` implied by `-D warnings`
    = note: `-D clippy::result-large-err` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::result_large_err)]`


warning: the `Err`-variant returned from this function is very large
##[warning]   --> ../../src/lib/fuchsia-component-test/src/lib.rs:208:57
    |
208 |     fn check_scope(&self, realm_scope: &Vec<String>) -> Result<(), Error> {
    |
   ::: ../../src/lib/fuchsia-component-test/src/error.rs:45:5
    |
    |
45  |     FromDictionaryNotSupported(ftest::Capability),
    |
    = help: try reducing the size of `error::Error`, for example by boxing large elements or replacing it with `Box<error::Error>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

---
     |          ^^^^^^^^^^^^^^^^^^^
     |
    ::: ../../src/lib/fuchsia-component-test/src/error.rs:45:5
     |
45   |     FromDictionaryNotSupported(ftest::Capability),
     |
     = help: try reducing the size of `error::Error`, for example by boxing large elements or replacing it with `Box<error::Error>`
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

---
[12597/21694] CLIPPY //src/sys/lib/routing:routing.actual.clippy(//build/toolchain/fuchsia:x64)
warning: large size difference between variants
##[warning]   --> ../../src/sys/lib/routing/src/legacy_router.rs:758:1
    |
758 | / enum RegistrationResult<C: ComponentInstanceInterface + 'static, O: Clone + fmt::Debug> {
759 | |     /// The source of the Registration was found (Framework, AboveRoot, etc.).
760 | |     Source(CapabilitySource),
761 | |     /// The Registration led to a parent Offer declaration.
...   |
...   |
764 | |     FromChild(RouteBundle<ExposeDecl>, Arc<C>),
765 | | }
    | |_^ the entire enum is at least 320 bytes
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
    = note: `-D clippy::large-enum-variant` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::large_enum_variant)]`
help: consider boxing the large fields to reduce the total size of the enum
    |
760 -     Source(CapabilitySource),
760 +     Source(Box<CapabilitySource>),


warning: large size difference between variants
##[warning]    --> ../../src/sys/lib/routing/src/legacy_router.rs:1180:1
##[warning]    --> ../../src/sys/lib/routing/src/legacy_router.rs:1180:1
     |
1180 | / enum ExposeResult<C: ComponentInstanceInterface + 'static> {
1181 | |     /// The source of the Expose was found (Framework, Component, etc.).
1182 | |     Source(CapabilitySource),
1183 | |     /// The source of the Expose comes from an aggregation of collections and/or static children
1183 | |     /// The source of the Expose comes from an aggregation of collections and/or static children
1184 | |     ExposeFromAnonymizedAggregate(RouteBundle<ExposeDecl>, Arc<C>),
1185 | | }
     | |_^ the entire enum is at least 320 bytes
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
help: consider boxing the large fields to reduce the total size of the enum
     |
1182 -     Source(CapabilitySource),
1182 +     Source(Box<CapabilitySource>),


warning: large size difference between variants
##[warning]    --> ../../src/sys/lib/routing/src/legacy_router.rs:1344:1
##[warning]    --> ../../src/sys/lib/routing/src/legacy_router.rs:1344:1
     |
1344 | / enum ExposeSegment<C: ComponentInstanceInterface + 'static> {
1345 | |     Done(ExposeResult<C>),
     | |     --------------------- the largest variant contains at least 320 bytes
1346 | |     Next(RouteBundle<ExposeDecl>, Arc<C>),
1347 | | }
     | |_^ the entire enum is at least 320 bytes
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
help: consider boxing the large fields to reduce the total size of the enum
     |
1345 -     Done(ExposeResult<C>),
1345 +     Done(Box<ExposeResult<C>>),


warning: 3 warnings emitted

---
[13764/21694] CLIPPY //src/connectivity/wlan/lib/sme:wlan-sme.actual.clippy(//build/toolchain/fuchsia:x64)
warning: the `Err`-variant returned from this function is very large
##[warning]  --> ../../src/connectivity/wlan/lib/sme/src/ap/authenticator.rs:13:61
   |
13 |     fn initiate(&mut self, update_sink: &mut UpdateSink) -> Result<(), Error>;
   |                                                             ^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 176 bytes
   |
   = help: try reducing the size of `wlan_rsn::Error`, for example by boxing large elements or replacing it with `Box<wlan_rsn::Error>`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
   = note: `-D clippy::result-large-err` implied by `-D warnings`


warning: the `Err`-variant returned from this function is very large
##[warning]  --> ../../src/connectivity/wlan/lib/sme/src/ap/authenticator.rs:18:10
##[warning]  --> ../../src/connectivity/wlan/lib/sme/src/ap/authenticator.rs:18:10
   |
18 |     ) -> Result<(), Error>;
   |          ^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 176 bytes
   |
   = help: try reducing the size of `wlan_rsn::Error`, for example by boxing large elements or replacing it with `Box<wlan_rsn::Error>`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: the `Err`-variant returned from this function is very large
##[warning]  --> ../../src/connectivity/wlan/lib/sme/src/ap/authenticator.rs:23:10
   |
   |
23 |     ) -> Result<(), Error>;
   |          ^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 176 bytes
   |
   = help: try reducing the size of `wlan_rsn::Error`, for example by boxing large elements or replacing it with `Box<wlan_rsn::Error>`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: large size difference between variants
##[warning]  --> ../../src/connectivity/wlan/lib/sme/src/ap/mod.rs:51:1
   |
   |
51 | /   enum State {
52 | |       Idle {
53 | |           ctx: Context,
54 | |       },
55 | | /     Starting {
56 | | |         ctx: Context,
57 | | |         ssid: Ssid,
58 | | |         rsn_cfg: Option<RsnCfg>,
...  | |
64 | | |         op_radio_cfg: OpRadioConfig,
65 | | |     },
   | | |_____- the second-largest variant contains at least 278 bytes
72 | | /     Started {
72 | | /     Started {
73 | | |         bss: InfraBss,
74 | | |     },
   | | |_____- the largest variant contains at least 544 bytes
75 | |   }
   | |___^ the entire enum is at least 544 bytes
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
   = note: `-D clippy::large-enum-variant` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::large_enum_variant)]`
help: consider boxing the large fields to reduce the total size of the enum
help: consider boxing the large fields to reduce the total size of the enum
   |
73 -         bss: InfraBss,
73 +         bss: Box<InfraBss>,


warning: the `Err`-variant returned from this function is very large
##[warning]  --> ../../src/connectivity/wlan/lib/sme/src/client/rsn.rs:25:58
##[warning]  --> ../../src/connectivity/wlan/lib/sme/src/client/rsn.rs:25:58
   |
25 |     fn start(&mut self, update_sink: &mut UpdateSink) -> Result<(), Error>;
   |                                                          ^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 176 bytes
   |
   = help: try reducing the size of `wlan_rsn::Error`, for example by boxing large elements or replacing it with `Box<wlan_rsn::Error>`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: the `Err`-variant returned from this function is very large
##[warning]  --> ../../src/connectivity/wlan/lib/sme/src/client/rsn.rs:38:10
   |
   |
38 |     ) -> Result<(), Error>;
   |          ^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 176 bytes
   |
   = help: try reducing the size of `wlan_rsn::Error`, for example by boxing large elements or replacing it with `Box<wlan_rsn::Error>`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: the `Err`-variant returned from this function is very large
##[warning]  --> ../../src/connectivity/wlan/lib/sme/src/client/rsn.rs:43:10
   |
   |
43 |     ) -> Result<(), Error>;
   |          ^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 176 bytes
   |
   = help: try reducing the size of `wlan_rsn::Error`, for example by boxing large elements or replacing it with `Box<wlan_rsn::Error>`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: the `Err`-variant returned from this function is very large
##[warning]  --> ../../src/connectivity/wlan/lib/sme/src/client/rsn.rs:45:12
   |
   |
45 |         -> Result<(), Error>;
   |            ^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 176 bytes
   |
   = help: try reducing the size of `wlan_rsn::Error`, for example by boxing large elements or replacing it with `Box<wlan_rsn::Error>`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: the `Err`-variant returned from this function is very large
##[warning]  --> ../../src/connectivity/wlan/lib/sme/src/client/rsn.rs:55:10
   |
   |
55 |     ) -> Result<(), Error>;
   |          ^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 176 bytes
   |
   = help: try reducing the size of `wlan_rsn::Error`, for example by boxing large elements or replacing it with `Box<wlan_rsn::Error>`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: the `Err`-variant returned from this function is very large
##[warning]  --> ../../src/connectivity/wlan/lib/sme/src/client/rsn.rs:56:73
   |
   |
56 |     fn on_sae_handshake_ind(&mut self, update_sink: &mut UpdateSink) -> Result<(), Error>;
   |                                                                         ^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 176 bytes
   |
   = help: try reducing the size of `wlan_rsn::Error`, for example by boxing large elements or replacing it with `Box<wlan_rsn::Error>`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: the `Err`-variant returned from this function is very large
##[warning]  --> ../../src/connectivity/wlan/lib/sme/src/client/rsn.rs:61:10
   |
   |
61 |     ) -> Result<(), Error>;
   |          ^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 176 bytes
   |
   = help: try reducing the size of `wlan_rsn::Error`, for example by boxing large elements or replacing it with `Box<wlan_rsn::Error>`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: the `Err`-variant returned from this function is very large
##[warning]  --> ../../src/connectivity/wlan/lib/sme/src/client/rsn.rs:62:82
   |
   |
62 |     fn on_sae_timeout(&mut self, update_sink: &mut UpdateSink, event_id: u64) -> Result<(), Error>;
   |                                                                                  ^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 176 bytes
   |
   = help: try reducing the size of `wlan_rsn::Error`, for example by boxing large elements or replacing it with `Box<wlan_rsn::Error>`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: the `Err`-variant returned from this function is very large
##[warning]   --> ../../src/connectivity/wlan/lib/sme/src/client/state/link_state.rs:124:10
    |
    |
124 |     ) -> Result<Self, EstablishRsnaFailureReason> {
    |
   ::: ../../src/connectivity/wlan/lib/sme/src/client/mod.rs:514:5
    |
    |
514 |     RsnaResponseTimeout(wlan_rsn::Error),
    |     ------------------------------------ the largest variant contains at least 176 bytes
515 |     RsnaCompletionTimeout(wlan_rsn::Error),
    |     -------------------------------------- the variant `RsnaCompletionTimeout` contains at least 176 bytes
    |
    = help: try reducing the size of `client::EstablishRsnaFailureReason`, for example by boxing large elements or replacing it with `Box<client::EstablishRsnaFailureReason>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: the `Err`-variant returned from this function is very large
##[warning]   --> ../../src/connectivity/wlan/lib/sme/src/client/state/link_state.rs:139:10
    |
    |
139 |     ) -> Result<Self, EstablishRsnaFailureReason> {
    |
   ::: ../../src/connectivity/wlan/lib/sme/src/client/mod.rs:514:5
    |
    |
514 |     RsnaResponseTimeout(wlan_rsn::Error),
    |     ------------------------------------ the largest variant contains at least 176 bytes
515 |     RsnaCompletionTimeout(wlan_rsn::Error),
    |     -------------------------------------- the variant `RsnaCompletionTimeout` contains at least 176 bytes
    |
    = help: try reducing the size of `client::EstablishRsnaFailureReason`, for example by boxing large elements or replacing it with `Box<client::EstablishRsnaFailureReason>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: the `Err`-variant returned from this function is very large
##[warning]   --> ../../src/connectivity/wlan/lib/sme/src/client/state/link_state.rs:156:10
    |
    |
156 |     ) -> Result<Self, EstablishRsnaFailureReason> {
    |
   ::: ../../src/connectivity/wlan/lib/sme/src/client/mod.rs:514:5
    |
    |
514 |     RsnaResponseTimeout(wlan_rsn::Error),
    |     ------------------------------------ the largest variant contains at least 176 bytes
515 |     RsnaCompletionTimeout(wlan_rsn::Error),
    |     -------------------------------------- the variant `RsnaCompletionTimeout` contains at least 176 bytes
    |
    = help: try reducing the size of `client::EstablishRsnaFailureReason`, for example by boxing large elements or replacing it with `Box<client::EstablishRsnaFailureReason>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: struct pattern is not needed for a unit variant
##[warning]   --> ../../src/connectivity/wlan/lib/sme/src/client/state/link_state.rs:182:42
    |
---

warning: the `Err`-variant returned from this function is very large
##[warning]   --> ../../src/connectivity/wlan/lib/sme/src/client/state/link_state.rs:228:10
    |
228 |     ) -> Result<Self, EstablishRsnaFailureReason>
    |
   ::: ../../src/connectivity/wlan/lib/sme/src/client/mod.rs:514:5
    |
    |
514 |     RsnaResponseTimeout(wlan_rsn::Error),
    |     ------------------------------------ the largest variant contains at least 176 bytes
515 |     RsnaCompletionTimeout(wlan_rsn::Error),
    |     -------------------------------------- the variant `RsnaCompletionTimeout` contains at least 176 bytes
    |
    = help: try reducing the size of `client::EstablishRsnaFailureReason`, for example by boxing large elements or replacing it with `Box<client::EstablishRsnaFailureReason>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: the `Err`-variant returned from this function is very large
##[warning]   --> ../../src/connectivity/wlan/lib/sme/src/client/state/link_state.rs:302:10
    |
    |
302 |     ) -> Result<Self, EstablishRsnaFailureReason> {
    |
   ::: ../../src/connectivity/wlan/lib/sme/src/client/mod.rs:514:5
    |
    |
514 |     RsnaResponseTimeout(wlan_rsn::Error),
    |     ------------------------------------ the largest variant contains at least 176 bytes
515 |     RsnaCompletionTimeout(wlan_rsn::Error),
    |     -------------------------------------- the variant `RsnaCompletionTimeout` contains at least 176 bytes
    |
    = help: try reducing the size of `client::EstablishRsnaFailureReason`, for example by boxing large elements or replacing it with `Box<client::EstablishRsnaFailureReason>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: the `Err`-variant returned from this function is very large
##[warning]   --> ../../src/connectivity/wlan/lib/sme/src/client/state/link_state.rs:312:10
    |
    |
312 |     ) -> Result<Self, EstablishRsnaFailureReason> {
    |
   ::: ../../src/connectivity/wlan/lib/sme/src/client/mod.rs:514:5
    |
    |
514 |     RsnaResponseTimeout(wlan_rsn::Error),
    |     ------------------------------------ the largest variant contains at least 176 bytes
515 |     RsnaCompletionTimeout(wlan_rsn::Error),
    |     -------------------------------------- the variant `RsnaCompletionTimeout` contains at least 176 bytes
    |
    = help: try reducing the size of `client::EstablishRsnaFailureReason`, for example by boxing large elements or replacing it with `Box<client::EstablishRsnaFailureReason>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: the `Err`-variant returned from this function is very large
##[warning]   --> ../../src/connectivity/wlan/lib/sme/src/client/state/link_state.rs:322:10
    |
    |
322 |     ) -> Result<Self, EstablishRsnaFailureReason> {
    |
   ::: ../../src/connectivity/wlan/lib/sme/src/client/mod.rs:514:5
    |
    |
514 |     RsnaResponseTimeout(wlan_rsn::Error),
    |     ------------------------------------ the largest variant contains at least 176 bytes
515 |     RsnaCompletionTimeout(wlan_rsn::Error),
    |     -------------------------------------- the variant `RsnaCompletionTimeout` contains at least 176 bytes
    |
    = help: try reducing the size of `client::EstablishRsnaFailureReason`, for example by boxing large elements or replacing it with `Box<client::EstablishRsnaFailureReason>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: the `Err`-variant returned from this function is very large
##[warning]   --> ../../src/connectivity/wlan/lib/sme/src/client/state/link_state.rs:356:10
    |
    |
356 |     ) -> Result<Self, EstablishRsnaFailureReason> {
    |
   ::: ../../src/connectivity/wlan/lib/sme/src/client/mod.rs:514:5
    |
    |
514 |     RsnaResponseTimeout(wlan_rsn::Error),
    |     ------------------------------------ the largest variant contains at least 176 bytes
515 |     RsnaCompletionTimeout(wlan_rsn::Error),
    |     -------------------------------------- the variant `RsnaCompletionTimeout` contains at least 176 bytes
    |
    = help: try reducing the size of `client::EstablishRsnaFailureReason`, for example by boxing large elements or replacing it with `Box<client::EstablishRsnaFailureReason>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: large size difference between variants
##[warning]   --> ../../src/connectivity/wlan/lib/sme/src/client/state/mod.rs:129:1
    |
    |
129 | / enum PostDisconnectAction {
130 | |     ReportConnectFinished { sink: ConnectTransactionSink, result: ConnectResult },
    | |     ----------------------------------------------------------------------------- the second-largest variant contains at least 208 bytes
131 | |     RespondDisconnect { responder: fidl_sme::ClientSmeDisconnectResponder },
132 | |     BeginConnect { cmd: ConnectCommand },
133 | |     ReportRoamFinished { sink: ConnectTransactionSink, result: RoamResult },
134 | |     None,
135 | | }
    | |_^ the entire enum is at least 536 bytes
    |
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
help: consider boxing the large fields to reduce the total size of the enum
    |
133 -     ReportRoamFinished { sink: ConnectTransactionSink, result: RoamResult },
133 +     ReportRoamFinished { sink: ConnectTransactionSink, result: Box<RoamResult> },


warning: the `Err`-variant returned from this function is very large
##[warning]   --> ../../src/connectivity/wlan/lib/sme/src/client/state/mod.rs:311:10
##[warning]   --> ../../src/connectivity/wlan/lib/sme/src/client/state/mod.rs:311:10
    |
311 |     ) -> Result<Associated, Disconnecting> {
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 552 bytes
    |
    = help: try reducing the size of `client::state::Disconnecting`, for example by boxing large elements or replacing it with `Box<client::state::Disconnecting>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: the `Err`-variant returned from this function is very large
##[warning]   --> ../../src/connectivity/wlan/lib/sme/src/client/state/mod.rs:461:10
    |
    |
461 |     ) -> Result<Self, Disconnecting> {
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 552 bytes
    |
    = help: try reducing the size of `client::state::Disconnecting`, for example by boxing large elements or replacing it with `Box<client::state::Disconnecting>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: the `Err`-variant returned from this function is very large
##[warning]   --> ../../src/connectivity/wlan/lib/sme/src/client/state/mod.rs:504:10
    |
    |
504 |     ) -> Result<Connecting, Disconnecting> {
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 552 bytes
    |
    = help: try reducing the size of `client::state::Disconnecting`, for example by boxing large elements or replacing it with `Box<client::state::Disconnecting>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: the `Err`-variant returned from this function is very large
##[warning]   --> ../../src/connectivity/wlan/lib/sme/src/client/state/mod.rs:618:10
    |
    |
618 |     ) -> Result<Self, Disconnecting>
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 552 bytes
    |
    = help: try reducing the size of `client::state::Disconnecting`, for example by boxing large elements or replacing it with `Box<client::state::Disconnecting>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: the `Err`-variant returned from this function is very large
##[warning]   --> ../../src/connectivity/wlan/lib/sme/src/client/state/mod.rs:672:10
    |
    |
672 |     ) -> Result<Self, Disconnecting> {
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 552 bytes
    |
    = help: try reducing the size of `client::state::Disconnecting`, for example by boxing large elements or replacing it with `Box<client::state::Disconnecting>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: the `Err`-variant returned from this function is very large
##[warning]   --> ../../src/connectivity/wlan/lib/sme/src/client/state/mod.rs:698:10
    |
    |
698 |     ) -> Result<Self, Disconnecting> {
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 552 bytes
    |
    = help: try reducing the size of `client::state::Disconnecting`, for example by boxing large elements or replacing it with `Box<client::state::Disconnecting>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: the `Err`-variant returned from this function is very large
##[warning]   --> ../../src/connectivity/wlan/lib/sme/src/client/state/mod.rs:707:10
    |
    |
707 |     ) -> Result<Self, Disconnecting> {
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 552 bytes
    |
    = help: try reducing the size of `client::state::Disconnecting`, for example by boxing large elements or replacing it with `Box<client::state::Disconnecting>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: the `Err`-variant returned from this function is very large
##[warning]   --> ../../src/connectivity/wlan/lib/sme/src/client/state/mod.rs:740:10
    |
    |
740 |     ) -> Result<Self, Disconnecting> {
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 552 bytes
    |
    = help: try reducing the size of `client::state::Disconnecting`, for example by boxing large elements or replacing it with `Box<client::state::Disconnecting>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: large size difference between variants
##[warning]   --> ../../src/connectivity/wlan/lib/sme/src/client/state/mod.rs:765:1
    |
    |
765 | / enum AfterRoamFailureState {
766 | |     Idle(Idle),
767 | |     Disconnecting(Disconnecting),
    | |     ---------------------------- the largest variant contains at least 552 bytes
768 | | }
    | |_^ the entire enum is at least 552 bytes
    | |_^ the entire enum is at least 552 bytes
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
help: consider boxing the large fields to reduce the total size of the enum
    |
767 -     Disconnecting(Disconnecting),
767 +     Disconnecting(Box<Disconnecting>),


warning: the `Err`-variant returned from this function is very large
##[warning]   --> ../../src/connectivity/wlan/lib/sme/src/client/state/mod.rs:787:10
##[warning]   --> ../../src/connectivity/wlan/lib/sme/src/client/state/mod.rs:787:10
    |
787 |     ) -> Result<Roaming, Disconnecting> {
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 552 bytes
    |
    = help: try reducing the size of `client::state::Disconnecting`, for example by boxing large elements or replacing it with `Box<client::state::Disconnecting>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: the `Err`-variant returned from this function is very large
##[warning]   --> ../../src/connectivity/wlan/lib/sme/src/client/state/mod.rs:961:10
    |
    |
139 |     Connecting(Connecting),
    |     ---------------------- the largest variant contains at least 128 bytes
...
961 |     ) -> Result<Self, AfterDisconnectState> {
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: try reducing the size of `client::state::AfterDisconnectState`, for example by boxing large elements or replacing it with `Box<client::state::AfterDisconnectState>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: the `Err`-variant returned from this function is very large
##[warning]    --> ../../src/connectivity/wlan/lib/sme/src/client/state/mod.rs:1507:6
     |
     |
1507 | ) -> Result<Roaming, Disconnecting> {
     |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 552 bytes
     |
     = help: try reducing the size of `client::state::Disconnecting`, for example by boxing large elements or replacing it with `Box<client::state::Disconnecting>`
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: the `Err`-variant returned from this function is very large
##[warning]    --> ../../src/connectivity/wlan/lib/sme/src/client/state/mod.rs:1644:6
     |
     |
767  |     Disconnecting(Disconnecting),
     |     ---------------------------- the largest variant contains at least 552 bytes
...
1644 | ) -> Result<Associated, AfterRoamFailureState> {
     |
     |
     = help: try reducing the size of `client::state::AfterRoamFailureState`, for example by boxing large elements or replacing it with `Box<client::state::AfterRoamFailureState>`
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

warning: large size difference between variants
##[warning]   --> ../../src/connectivity/wlan/lib/sme/src/client/mod.rs:221:1
    |
    |
221 | / pub enum RoamResult {
222 | |     Success(Box<BssDescription>),
    | |     ---------------------------- the second-largest variant contains at least 8 bytes
223 | |     Failed(RoamFailure),
224 | | }
    | |_^ the entire enum is at least 520 bytes
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
help: consider boxing the large fields to reduce the total size of the enum
    |
223 -     Failed(RoamFailure),
223 +     Failed(Box<RoamFailure>),


warning: large size difference between variants
##[warning]   --> ../../src/connectivity/wlan/lib/sme/src/client/mod.rs:272:1
##[warning]   --> ../../src/connectivity/wlan/lib/sme/src/client/mod.rs:272:1
    |
272 | / pub enum ConnectTransactionEvent {
273 | |     OnConnectResult { result: ConnectResult, is_reconnect: bool },
    | |     ------------------------------------------------------------- the second-largest variant contains at least 193 bytes
274 | |     OnRoamResult { result: RoamResult },
    | |     ----------------------------------- the largest variant contains at least 520 bytes
275 | |     OnDisconnect { info: fidl_sme::DisconnectInfo },
276 | |     OnSignalReport { ind: fidl_internal::SignalReportIndication },
277 | |     OnChannelSwitched { info: fidl_internal::ChannelSwitchInfo },
    | |_^ the entire enum is at least 520 bytes
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
help: consider boxing the large fields to reduce the total size of the enum
help: consider boxing the large fields to reduce the total size of the enum
    |
274 -     OnRoamResult { result: RoamResult },
274 +     OnRoamResult { result: Box<RoamResult> },


warning: 37 warnings emitted

---
##[warning]   --> ../../src/lib/windowed-stats/src/experimental/event/reactor.rs:429:9
    |
429 | /         self.0
430 | |              .0
431 | |             .iter_mut()
432 | |             .map(|reactor| reactor.react(event.clone()))
    | |______________-----^
    |                |
    |                help: try: `next_back()`
    |
---
   = note: `-D clippy::large-enum-variant` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::large_enum_variant)]`
help: consider boxing the large fields to reduce the total size of the enum
   |
37 -     Current(FilterState),
37 +     Current(Box<FilterState>),


warning: 1 warning emitted

---
[15591/21694] RUST obj/src/sys/pkg/lib/fuchsia-pkg-testing/libfuchsia_pkg_testing.rlib obj/src/sys/pkg/lib/fuchsia-pkg-testing/libfuchsia_pkg_testing.rmeta
[15592/21694] RUST obj/src/virtualization/lib/virtio-device/libvirtio_device.rlib obj/src/virtualization/lib/virtio-device/libvirtio_device.rmeta
[15593/21694] ACTION //src/zircon/bin/role_manager:role_manager_cmc_validate_references_fini(//build/toolchain/fuchsia:x64)
[15594/21694] CLIPPY //src/virtualization/lib/virtio-device:virtio-device.actual.clippy(//build/toolchain/fuchsia:x64)
FAILED: gen/src/virtualization/lib/virtio-device/virtio-device.actual.clippy 
../../build/rust/clippy_wrapper.sh --output gen/src/virtualization/lib/virtio-device/virtio-device.actual.clippy --jq ../../prebuilt/third_party/jq/linux-x64/bin/jq --deps gen/src/virtualization/lib/virtio-device/virtio-device.aux.deps.rmeta --transdeps gen/src/virtualization/lib/virtio-device/virtio-device.aux.transdeps --fail -- env  ../../../install/bin/clippy-driver ../../src/virtualization/lib/virtio-device/src/lib.rs --sysroot=../../../install --crate-type=rlib -Aclippy::all -Cmetadata=clippy --cfg=__rust_toolchain=\"9665d318c2175d6cff25e30ce7ee293adbc0549f\" -L gen/zircon/public/sysroot/cpp/lib -Clinker=../../prebuilt/third_party/clang/linux-x64/bin/lld -Clink-arg=--sysroot=gen/zircon/public/sysroot/cpp -Clink-arg=-L../../prebuilt/third_party/clang/linux-x64/lib/x86_64-unknown-fuchsia/noexcept -Clink-arg=-L../../prebuilt/third_party/clang/linux-x64/lib/clang/20/lib/x86_64-unknown-fuchsia -Clink-arg=--pack-dyn-relocs=relr -Clink-arg=-dynamic-linker=ld.so.1 -Clink-arg=--icf=all -Clink-arg=-zrel -Zremap-cwd-prefix=. -Cforce-frame-pointers -Copt-level=0 -Cdebuginfo=0 -Clink-arg=--compress-debug-sections=zstd -Cdebug-assertions=yes -Zallow-features= --target x86_64-unknown-fuchsia --cap-lints=warn -Wrust-2018-idioms -Dderef-nullptr -Dinvalid-value -Dunused-must-use -Aunknown_lints -Anon_local_definitions -Aelided_named_lifetimes -Dwarnings -Cprefer-dynamic -Clink-args=-zstack-size=0x200000 -Cpanic=abort -Cforce-unwind-tables=yes -Zpanic_abort_tests -Csymbol-mangling-version=v0 -Wunused_crate_dependencies -Dunused_results -Aunused_results --edition=2021 -Wclippy::correctness -Wclippy::expect_fun_call -Wclippy::large_enum_variant -Wclippy::large_futures -Wclippy::missing_safety_doc -Wclippy::unnecessary_mut_passed -Wclippy::clear_with_drain -Wclippy::collection_is_never_read -Wclippy::needless_collect -Wclippy::or_fun_call -Wclippy::perf -Wclippy::redundant_clone -Wclippy::set_contains_or_insert -Wclippy::unnecessary_lazy_evaluation -Cmetadata=obj/src/virtualization/lib/virtio-device\ virtio-device @rust_api_level_cfg_flags.txt
jq: parse error: Invalid literal at line 2, column 7
[15596/21694] AR obj/third_party/modp_b64/libmodp_b64.a
[15597/21694] RUST obj/third_party/rust_crates/libasync_ringbuf-1fe58b18451ee650.rlib obj/third_party/rust_crates/libasync_ringbuf-1fe58b18451ee650.rmeta
[15598/21694] RUST obj/third_party/rust_crates/libcfg_if-de3fee777d28505f.rlib obj/third_party/rust_crates/libcfg_if-de3fee777d28505f.rmeta
[15599/21694] ACTION //third_party/rust_crates:crc32fast-v1_2_0.license(//build/toolchain/fuchsia:x64)
---
140 | /  enum State {
141 | |      /// Autorepeat is not active.
142 | |      Dormant,
    | |      ------- the second-largest variant carries no data at all
143 | |      /// Autorepeat is armed, we are waiting for a timer event to expire, and when
144 | |      /// it does, we generate a repeat event.
145 | |/     Armed {
146 | ||         // The keyboard event that caused the state to become Armed.
147 | ||         armed_event: KeyboardEvent,
...   ||
153 | ||         _delay_timer: Rc<Task<()>>,
    | ||_____- the largest variant contains at least 256 bytes
155 | |  }
    | |__^ the entire enum is at least 256 bytes
    |
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
    = note: `-D clippy::large-enum-variant` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::large_enum_variant)]`
help: consider boxing the large fields to reduce the total size of the enum
    |
149 -         armed_descriptor: InputDeviceDescriptor,
149 +         armed_descriptor: Box<InputDeviceDescriptor>,


warning: large size difference between variants
##[warning]   --> ../../src/ui/lib/input_pipeline/src/dead_keys_handler.rs:264:1
##[warning]   --> ../../src/ui/lib/input_pipeline/src/dead_keys_handler.rs:264:1
    |
264 | / enum State {
265 | |     /// We have yet to see a key to act on.
266 | |     S0000,
...   |
272 | |     S0011 { dead_key_down: StoredEvent, dead_key_up: StoredEvent },
...   |
...   |
275 | |     S0111 { dead_key_down: StoredEvent, dead_key_up: StoredEvent, live_key_down: StoredEvent },
...   |
...   |
281 | |     S1101 { dead_key_down: StoredEvent },
    | |_^ the entire enum is at least 768 bytes
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
help: consider boxing the large fields to reduce the total size of the enum
help: consider boxing the large fields to reduce the total size of the enum
    |
275 -     S0111 { dead_key_down: StoredEvent, dead_key_up: StoredEvent, live_key_down: StoredEvent },
275 +     S0111 { dead_key_down: StoredEvent, dead_key_up: StoredEvent, live_key_down: Box<StoredEvent> },


warning: 2 warnings emitted

---
140 | /  enum State {
141 | |      /// Autorepeat is not active.
142 | |      Dormant,
    | |      ------- the second-largest variant carries no data at all
143 | |      /// Autorepeat is armed, we are waiting for a timer event to expire, and when
144 | |      /// it does, we generate a repeat event.
145 | |/     Armed {
146 | ||         // The keyboard event that caused the state to become Armed.
147 | ||         armed_event: KeyboardEvent,
...   ||
153 | ||         _delay_timer: Rc<Task<()>>,
    | ||_____- the largest variant contains at least 256 bytes
155 | |  }
    | |__^ the entire enum is at least 256 bytes
    |
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
    = note: `-D clippy::large-enum-variant` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::large_enum_variant)]`
help: consider boxing the large fields to reduce the total size of the enum
    |
149 -         armed_descriptor: InputDeviceDescriptor,
149 +         armed_descriptor: Box<InputDeviceDescriptor>,


warning: large size difference between variants
##[warning]   --> ../../src/ui/lib/input_pipeline/src/dead_keys_handler.rs:264:1
##[warning]   --> ../../src/ui/lib/input_pipeline/src/dead_keys_handler.rs:264:1
    |
264 | / enum State {
265 | |     /// We have yet to see a key to act on.
266 | |     S0000,
...   |
272 | |     S0011 { dead_key_down: StoredEvent, dead_key_up: StoredEvent },
...   |
...   |
275 | |     S0111 { dead_key_down: StoredEvent, dead_key_up: StoredEvent, live_key_down: StoredEvent },
...   |
...   |
281 | |     S1101 { dead_key_down: StoredEvent },
    | |_^ the entire enum is at least 768 bytes
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
help: consider boxing the large fields to reduce the total size of the enum
help: consider boxing the large fields to reduce the total size of the enum
    |
275 -     S0111 { dead_key_down: StoredEvent, dead_key_up: StoredEvent, live_key_down: StoredEvent },
275 +     S0111 { dead_key_down: StoredEvent, dead_key_up: StoredEvent, live_key_down: Box<StoredEvent> },


warning: 2 warnings emitted

---
140 | /  enum State {
141 | |      /// Autorepeat is not active.
142 | |      Dormant,
    | |      ------- the second-largest variant carries no data at all
143 | |      /// Autorepeat is armed, we are waiting for a timer event to expire, and when
144 | |      /// it does, we generate a repeat event.
145 | |/     Armed {
146 | ||         // The keyboard event that caused the state to become Armed.
147 | ||         armed_event: KeyboardEvent,
...   ||
153 | ||         _delay_timer: Rc<Task<()>>,
    | ||_____- the largest variant contains at least 256 bytes
155 | |  }
    | |__^ the entire enum is at least 256 bytes
    |
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
    = note: `-D clippy::large-enum-variant` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::large_enum_variant)]`
help: consider boxing the large fields to reduce the total size of the enum
    |
149 -         armed_descriptor: InputDeviceDescriptor,
149 +         armed_descriptor: Box<InputDeviceDescriptor>,


warning: large size difference between variants
##[warning]   --> ../../src/ui/lib/input_pipeline/src/dead_keys_handler.rs:264:1
##[warning]   --> ../../src/ui/lib/input_pipeline/src/dead_keys_handler.rs:264:1
    |
264 | / enum State {
265 | |     /// We have yet to see a key to act on.
266 | |     S0000,
...   |
272 | |     S0011 { dead_key_down: StoredEvent, dead_key_up: StoredEvent },
...   |
...   |
275 | |     S0111 { dead_key_down: StoredEvent, dead_key_up: StoredEvent, live_key_down: StoredEvent },
...   |
...   |
281 | |     S1101 { dead_key_down: StoredEvent },
    | |_^ the entire enum is at least 768 bytes
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
help: consider boxing the large fields to reduce the total size of the enum
help: consider boxing the large fields to reduce the total size of the enum
    |
275 -     S0111 { dead_key_down: StoredEvent, dead_key_up: StoredEvent, live_key_down: StoredEvent },
275 +     S0111 { dead_key_down: StoredEvent, dead_key_up: StoredEvent, live_key_down: Box<StoredEvent> },


warning: 2 warnings emitted

@bors
Copy link
Contributor

bors commented Feb 21, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.