[pull] master from dtolnay:master - #10
Open
pull[bot] wants to merge 1493 commits into
Open
Conversation
Improve diagnostics about undeclared lifetimes in C++ member fn
Partition lifetimes of associated functions
Add ui test with incorrect lifetimes on self type
Improve diagnostic on undeclared lifetimes
warning: binding's name is too similar to existing binding
--> macro/src/expand.rs:615:13
|
615 | let self_gt_token;
| ^^^^^^^^^^^^^
|
note: existing binding defined here
--> macro/src/expand.rs:614:13
|
614 | let self_lt_token;
| ^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#similar_names
= note: `-W clippy::similar-names` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::similar_names)]`
warning: binding's name is too similar to existing binding
--> macro/src/expand.rs:647:17
|
647 | let impl_gt_token = efn.generics.gt_token;
| ^^^^^^^^^^^^^
|
note: existing binding defined here
--> macro/src/expand.rs:646:17
|
646 | let impl_lt_token = efn.generics.lt_token;
| ^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#similar_names
Group associated functions by self type
Simplify expansion of associated functions
error[E0277]: the type `UnsafeCell<MaybeUninit<[usize; 8]>>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
--> tests/cxx_string.rs:29:28
|
14 | async fn f() {
| - within this `impl Future<Output = ()>`
...
29 | assert_ref_unwind_safe(f());
| ^^^ `UnsafeCell<MaybeUninit<[usize; 8]>>` may contain interior mutability and a reference may not be safely transferable across a catch_unwind boundary
|
= help: within `impl Future<Output = ()>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<MaybeUninit<[usize; 8]>>`
note: future does not implement `RefUnwindSafe` as this value is used across an await
--> tests/cxx_string.rs:18:15
|
15 | let_cxx_string!(s = "...");
| -------------------------- has type `cxx::private::StackString` which does not implement `RefUnwindSafe`
...
18 | g(&s).await;
| ^^^^^ await occurs here, with `cxx_stack_string` maybe used later
note: required by a bound in `assert_ref_unwind_safe`
--> tests/cxx_string.rs:28:39
|
28 | fn assert_ref_unwind_safe(_: impl RefUnwindSafe) {}
| ^^^^^^^^^^^^^ required by this bound in `assert_ref_unwind_safe`
Restore RefUnwindSafe for let_cxx_string in async
Use link_deps in Cargo bazel metadata
Replace apt emscripten with emsdk
Update to syn 3
warning: this `if` statement can be collapsed
--> build.rs:34:5
|
34 | / if let Some(rustc) = rustc_version() {
35 | | if rustc.minor < 88 {
36 | | println!("cargo:warning=The cxx crate requires a rustc version 1.88.0 or newer.");
37 | | println!(
... |
42 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
= note: `-W clippy::collapsible-if` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::collapsible_if)]`
help: collapse nested if block
|
34 ~ if let Some(rustc) = rustc_version()
35 ~ && rustc.minor < 88 {
36 | println!("cargo:warning=The cxx crate requires a rustc version 1.88.0 or newer.");
...
40 | );
41 ~ }
|
warning: this `if` statement can be collapsed
--> bridge/build/src/out.rs:12:9
|
12 | / if let Ok(existing) = fs::read(path) {
13 | | if existing == content {
14 | | // Avoid bumping modified time with unchanged contents.
15 | | return Ok(());
16 | | }
17 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
12 ~ if let Ok(existing) = fs::read(path)
13 ~ && existing == content {
14 | // Avoid bumping modified time with unchanged contents.
15 | return Ok(());
16 ~ }
|
warning: this `if` statement can be collapsed
--> bridge/build/src/out.rs:169:5
|
169 | / if let Ok(original_canonical) = original.canonicalize() {
170 | | if let Ok(relative_canonical) = link.parent().unwrap().join(&relative_path).canonicalize() {
171 | | if original_canonical == relative_canonical {
172 | | return relative_path;
... |
175 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
169 ~ if let Ok(original_canonical) = original.canonicalize()
170 ~ && let Ok(relative_canonical) = link.parent().unwrap().join(&relative_path).canonicalize() {
171 | if original_canonical == relative_canonical {
172 | return relative_path;
173 | }
174 ~ }
|
warning: this `if` statement can be collapsed
--> bridge/build/src/out.rs:170:9
|
170 | / if let Ok(relative_canonical) = link.parent().unwrap().join(&relative_path).canonicalize() {
171 | | if original_canonical == relative_canonical {
172 | | return relative_path;
173 | | }
174 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
170 ~ if let Ok(relative_canonical) = link.parent().unwrap().join(&relative_path).canonicalize()
171 ~ && original_canonical == relative_canonical {
172 | return relative_path;
173 ~ }
|
warning: this `if` statement can be collapsed
--> bridge/build/src/target.rs:40:9
|
40 | / if also_try_canonical {
41 | | if let Ok(canonical_dir) = out_dir.canonicalize() {
42 | | dir = canonical_dir;
43 | | also_try_canonical = false;
... |
46 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
40 ~ if also_try_canonical
41 ~ && let Ok(canonical_dir) = out_dir.canonicalize() {
42 | dir = canonical_dir;
43 | also_try_canonical = false;
44 | continue;
45 ~ }
|
warning: this `if` statement can be collapsed
--> bridge/cmd/src/app.rs:143:17
|
143 | / if let Some(&prev) = bool_cfgs.get(&name) {
144 | | if prev != value {
145 | | return Err(format!("cannot have both {0}=false and {0}=true", name));
146 | | }
147 | | }
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
= note: `-W clippy::collapsible-if` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::collapsible_if)]`
help: collapse nested if block
|
143 ~ if let Some(&prev) = bool_cfgs.get(&name)
144 ~ && prev != value {
145 | return Err(format!("cannot have both {0}=false and {0}=true", name));
146 ~ }
|
warning: this `if` statement can be collapsed
--> bridge/src/write.rs:43:9
|
43 | / if let Api::Struct(strct) = api {
44 | | if !out.types.cxx.contains(&strct.name.rust) {
45 | | for field in &strct.fields {
46 | | needs_default_value |= primitive::kind(&field.ty).is_some();
... |
49 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
= note: `-W clippy::collapsible-if` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::collapsible_if)]`
help: collapse nested if block
|
43 ~ if let Api::Struct(strct) = api
44 ~ && !out.types.cxx.contains(&strct.name.rust) {
45 | for field in &strct.fields {
46 | needs_default_value |= primitive::kind(&field.ty).is_some();
47 | }
48 ~ }
|
warning: this `if` statement can be collapsed
--> bridge/src/write.rs:100:9
|
100 | / if let Api::CxxFunction(efn) | Api::RustFunction(efn) = api {
101 | | if let Some(self_type) = efn.self_type() {
102 | | methods_for_type
103 | | .entry(self_type)
... |
107 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
100 ~ if let Api::CxxFunction(efn) | Api::RustFunction(efn) = api
101 ~ && let Some(self_type) = efn.self_type() {
102 | methods_for_type
...
105 | .push(efn);
106 ~ }
|
warning: this `if` statement can be collapsed
--> bridge/src/write.rs:158:9
|
158 | / if let Api::TypeAlias(ety) = api {
159 | | if let Some(reasons) = out.types.required_trivial.get(&ety.name.rust) {
160 | | check_trivial_extern_type(out, ety, reasons);
161 | | }
162 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
158 ~ if let Api::TypeAlias(ety) = api
159 ~ && let Some(reasons) = out.types.required_trivial.get(&ety.name.rust) {
160 | check_trivial_extern_type(out, ety, reasons);
161 ~ }
|
warning: this `if` statement can be collapsed
--> bridge/src/write.rs:199:9
|
199 | / if let Api::Struct(strct) = api {
200 | | if derive::contains(&strct.derives, Trait::Hash) {
201 | | out.next_section();
202 | | out.include.cstddef = true;
... |
221 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
199 ~ if let Api::Struct(strct) = api
200 ~ && derive::contains(&strct.derives, Trait::Hash) {
201 | out.next_section();
...
219 | writeln!(out, "}};");
220 ~ }
|
warning: this `if` statement can be collapsed
--> bridge/src/write.rs:920:5
|
920 | / if let Some(receiver) = efn.receiver() {
921 | | if !receiver.mutable {
922 | | write!(out, " const");
923 | | }
924 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
920 ~ if let Some(receiver) = efn.receiver()
921 ~ && !receiver.mutable {
922 | write!(out, " const");
923 ~ }
|
warning: this `if` statement can be collapsed
--> bridge/src/write.rs:1173:5
|
1173 | / if let FnKind::Method(receiver) = &sig.kind {
1174 | | if !receiver.mutable {
1175 | | write!(out, " const");
1176 | | }
1177 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
1173 ~ if let FnKind::Method(receiver) = &sig.kind
1174 ~ && !receiver.mutable {
1175 | write!(out, " const");
1176 ~ }
|
warning: this `if` statement can be collapsed
--> bridge/src/write.rs:1302:5
|
1302 | / if !indirect_return {
1303 | | if let Some(Type::RustBox(_) | Type::UniquePtr(_) | Type::Str(_) | Type::SliceRef(_)) =
1304 | | &sig.ret
... |
1308 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
1302 ~ if !indirect_return
1303 ~ && let Some(Type::RustBox(_) | Type::UniquePtr(_) | Type::Str(_) | Type::SliceRef(_)) =
1304 | &sig.ret
1305 | {
1306 | write!(out, ")");
1307 ~ }
|
warning: this `if` statement can be collapsed
--> syntax/attrs.rs:216:13
|
216 | / if let Expr::Lit(expr) = &meta.value {
217 | | if let Lit::Str(lit) = &expr.lit {
218 | | return Ok(DocAttribute::Doc(lit.clone()));
219 | | }
220 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
= note: `-W clippy::collapsible-if` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::collapsible_if)]`
help: collapse nested if block
|
216 ~ if let Expr::Lit(expr) = &meta.value
217 ~ && let Lit::Str(lit) = &expr.lit {
218 | return Ok(DocAttribute::Doc(lit.clone()));
219 ~ }
|
warning: this `if` statement can be collapsed
--> syntax/attrs.rs:236:9
|
236 | / if let Some(ident) = path.get_ident() {
237 | | if let Some(derive) = Derive::from(ident) {
238 | | derives.push(derive);
239 | | continue;
240 | | }
241 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
236 ~ if let Some(ident) = path.get_ident()
237 ~ && let Some(derive) = Derive::from(ident) {
238 | derives.push(derive);
239 | continue;
240 ~ }
|
warning: this `if` statement can be collapsed
--> syntax/check.rs:235:5
|
235 | / if ty.mutable && !ty.pinned {
236 | | if let Some(requires_pin) = match &ty.inner {
237 | | Type::Ident(ident)
238 | | if ident.rust == CxxString
... |
257 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
235 ~ if ty.mutable && !ty.pinned
236 ~ && let Some(requires_pin) = match &ty.inner {
237 | Type::Ident(ident)
...
255 | );
256 ~ }
|
warning: this `if` statement can be collapsed
--> syntax/check.rs:296:9
|
296 | / if let Type::Ident(ident) = &ty.inner {
297 | | if cx.types.cxx.contains(&ident.rust)
298 | | && !cx.types.structs.contains_key(&ident.rust)
299 | | && !cx.types.enums.contains_key(&ident.rust)
... |
303 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
296 ~ if let Type::Ident(ident) = &ty.inner
297 ~ && cx.types.cxx.contains(&ident.rust)
298 | && !cx.types.structs.contains_key(&ident.rust)
...
301 | msg += ": opaque C++ type is not supported yet";
302 ~ }
|
warning: this `if` statement can be collapsed
--> syntax/check.rs:322:9
|
322 | / if let Type::Ptr(_) = arg.ty {
323 | | if ty.unsafety.is_none() {
324 | | cx.error(
325 | | arg,
... |
329 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
322 ~ if let Type::Ptr(_) = arg.ty
323 ~ && ty.unsafety.is_none() {
324 | cx.error(
...
327 | );
328 ~ }
|
warning: this `if` statement can be collapsed
--> syntax/check.rs:343:5
|
343 | / if cx.types.cxx.contains(&name.rust) {
344 | | if let Some(ety) = cx.types.untrusted.get(&name.rust) {
345 | | let msg = "extern shared struct must be declared in an `unsafe extern` block";
346 | | cx.error(ety, msg);
347 | | }
348 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
343 ~ if cx.types.cxx.contains(&name.rust)
344 ~ && let Some(ety) = cx.types.untrusted.get(&name.rust) {
345 | let msg = "extern shared struct must be declared in an `unsafe extern` block";
346 | cx.error(ety, msg);
347 ~ }
|
warning: this `if` statement can be collapsed
--> syntax/discriminant.rs:135:5
|
135 | / if let Some(expected_repr) = set.repr {
136 | | if let Some(limits) = Limits::of(expected_repr) {
137 | | if discriminant < limits.min || limits.max < discriminant {
138 | | let msg = format!(
... |
145 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
135 ~ if let Some(expected_repr) = set.repr
136 ~ && let Some(limits) = Limits::of(expected_repr) {
137 | if discriminant < limits.min || limits.max < discriminant {
...
143 | }
144 ~ }
|
warning: this `if` statement can be collapsed
--> syntax/discriminant.rs:136:9
|
136 | / if let Some(limits) = Limits::of(expected_repr) {
137 | | if discriminant < limits.min || limits.max < discriminant {
138 | | let msg = format!(
139 | | "discriminant value `{}` is outside the limits of {}",
... |
144 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
136 ~ if let Some(limits) = Limits::of(expected_repr)
137 ~ && (discriminant < limits.min || limits.max < discriminant) {
138 | let msg = format!(
...
142 | return Err(Error::new(Span::call_site(), msg));
143 ~ }
|
warning: this `if` statement can be collapsed
--> syntax/parse.rs:444:13
|
444 | / if let Api::CxxFunction(efn) | Api::RustFunction(efn) = item {
445 | | if let Some(receiver) = efn.sig.receiver_mut() {
446 | | if receiver.ty.rust == "Self" {
447 | | receiver.ty.rust = single_type.rust.clone();
... |
450 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
444 ~ if let Api::CxxFunction(efn) | Api::RustFunction(efn) = item
445 ~ && let Some(receiver) = efn.sig.receiver_mut() {
446 | if receiver.ty.rust == "Self" {
447 | receiver.ty.rust = single_type.rust.clone();
448 | }
449 ~ }
|
warning: this `if` statement can be collapsed
--> syntax/parse.rs:445:17
|
445 | / if let Some(receiver) = efn.sig.receiver_mut() {
446 | | if receiver.ty.rust == "Self" {
447 | | receiver.ty.rust = single_type.rust.clone();
448 | | }
449 | | }
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
445 ~ if let Some(receiver) = efn.sig.receiver_mut()
446 ~ && receiver.ty.rust == "Self" {
447 | receiver.ty.rust = single_type.rust.clone();
448 ~ }
|
warning: this `if` statement can be collapsed
--> syntax/parse.rs:633:25
|
633 | / if let Type::Ref(reference) = ty {
634 | | if let Type::Ident(ident) = reference.inner {
635 | | receiver = Some(Receiver {
636 | | pinned: reference.pinned,
... |
649 | | }
| |_________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
633 ~ if let Type::Ref(reference) = ty
634 ~ && let Type::Ident(ident) = reference.inner {
635 | receiver = Some(Receiver {
...
647 | continue;
648 ~ }
|
warning: this `if` statement can be collapsed
--> syntax/parse.rs:1100:9
|
1100 | / if let Some(TokenTree::Punct(punct)) = iter.next() {
1101 | | if punct.as_char() == '!' {
1102 | | let ty = iter.collect::<TokenStream>();
1103 | | if !ty.is_empty() {
... |
1108 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
1100 ~ if let Some(TokenTree::Punct(punct)) = iter.next()
1101 ~ && punct.as_char() == '!' {
1102 | let ty = iter.collect::<TokenStream>();
...
1106 | }
1107 ~ }
|
warning: this `if` statement can be collapsed
--> syntax/parse.rs:1484:13
|
1484 | / if let PathArguments::AngleBracketed(generic) = &segment.arguments {
1485 | | if ident == "Result" && generic.args.len() == 1 {
1486 | | if let GenericArgument::Type(arg) = &generic.args[0] {
1487 | | ret = arg;
... |
1492 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
1484 ~ if let PathArguments::AngleBracketed(generic) = &segment.arguments
1485 ~ && ident == "Result" && generic.args.len() == 1 {
1486 | if let GenericArgument::Type(arg) = &generic.args[0] {
...
1490 | }
1491 ~ }
|
warning: this `if` statement can be collapsed
--> syntax/parse.rs:1485:17
|
1485 | / if ident == "Result" && generic.args.len() == 1 {
1486 | | if let GenericArgument::Type(arg) = &generic.args[0] {
1487 | | ret = arg;
1488 | | *throws_tokens =
... |
1491 | | }
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
1485 ~ if ident == "Result" && generic.args.len() == 1
1486 ~ && let GenericArgument::Type(arg) = &generic.args[0] {
1487 | ret = arg;
1488 | *throws_tokens =
1489 | Some((kw::Result(ident.span()), generic.lt_token, generic.gt_token));
1490 ~ }
|
warning: this `if` statement can be collapsed
--> syntax/toposort.rs:39:9
|
39 | / if let Type::Ident(ident) = &field.ty {
40 | | if let Some(inner) = types.structs.get(&ident.rust) {
41 | | if visit(cx, inner, sorted, marks, types).is_err() {
42 | | cx.error(field, "unsupported cyclic data structure");
... |
46 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
39 ~ if let Type::Ident(ident) = &field.ty
40 ~ && let Some(inner) = types.structs.get(&ident.rust) {
41 | if visit(cx, inner, sorted, marks, types).is_err() {
...
44 | }
45 ~ }
|
warning: this `if` statement can be collapsed
--> syntax/toposort.rs:40:13
|
40 | / if let Some(inner) = types.structs.get(&ident.rust) {
41 | | if visit(cx, inner, sorted, marks, types).is_err() {
42 | | cx.error(field, "unsupported cyclic data structure");
43 | | result = Err(());
44 | | }
45 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
40 ~ if let Some(inner) = types.structs.get(&ident.rust)
41 ~ && visit(cx, inner, sorted, marks, types).is_err() {
42 | cx.error(field, "unsupported cyclic data structure");
43 | result = Err(());
44 ~ }
|
warning: this `if` statement can be collapsed
--> syntax/types.rs:217:13
|
217 | / if let Api::Impl(imp) = api {
218 | | if let Some(key) = imp.ty.impl_key(&resolutions) {
219 | | impls.insert(key, ConditionalImpl::from(imp));
220 | | }
221 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
217 ~ if let Api::Impl(imp) = api
218 ~ && let Some(key) = imp.ty.impl_key(&resolutions) {
219 | impls.insert(key, ConditionalImpl::from(imp));
220 ~ }
|
warning: this `if` statement can be collapsed
--> syntax/unpin.rs:32:9
|
32 | / if let Type::SliceRef(slice) = ty {
33 | | if let Type::Ident(inner) = &slice.inner {
34 | | if slice.mutable && is_extern_type_alias(inner) {
35 | | reasons.insert(&inner.rust, UnpinReason::Slice(slice));
... |
38 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
32 ~ if let Type::SliceRef(slice) = ty
33 ~ && let Type::Ident(inner) = &slice.inner {
34 | if slice.mutable && is_extern_type_alias(inner) {
35 | reasons.insert(&inner.rust, UnpinReason::Slice(slice));
36 | }
37 ~ }
|
warning: this `if` statement can be collapsed
--> syntax/unpin.rs:33:13
|
33 | / if let Type::Ident(inner) = &slice.inner {
34 | | if slice.mutable && is_extern_type_alias(inner) {
35 | | reasons.insert(&inner.rust, UnpinReason::Slice(slice));
36 | | }
37 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
33 ~ if let Type::Ident(inner) = &slice.inner
34 ~ && slice.mutable && is_extern_type_alias(inner) {
35 | reasons.insert(&inner.rust, UnpinReason::Slice(slice));
36 ~ }
|
warning: this `if` statement can be collapsed
--> syntax/unpin.rs:42:9
|
42 | / if let Api::CxxFunction(efn) | Api::RustFunction(efn) = api {
43 | | if let Some(receiver) = efn.receiver() {
44 | | if receiver.mutable && !receiver.pinned && is_extern_type_alias(&receiver.ty) {
45 | | reasons.insert(&receiver.ty.rust, UnpinReason::Receiver(receiver));
... |
48 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
42 ~ if let Api::CxxFunction(efn) | Api::RustFunction(efn) = api
43 ~ && let Some(receiver) = efn.receiver() {
44 | if receiver.mutable && !receiver.pinned && is_extern_type_alias(&receiver.ty) {
45 | reasons.insert(&receiver.ty.rust, UnpinReason::Receiver(receiver));
46 | }
47 ~ }
|
warning: this `if` statement can be collapsed
--> syntax/unpin.rs:43:13
|
43 | / if let Some(receiver) = efn.receiver() {
44 | | if receiver.mutable && !receiver.pinned && is_extern_type_alias(&receiver.ty) {
45 | | reasons.insert(&receiver.ty.rust, UnpinReason::Receiver(receiver));
46 | | }
47 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
43 ~ if let Some(receiver) = efn.receiver()
44 ~ && receiver.mutable && !receiver.pinned && is_extern_type_alias(&receiver.ty) {
45 | reasons.insert(&receiver.ty.rust, UnpinReason::Receiver(receiver));
46 ~ }
|
warning: this `if` statement can be collapsed
--> syntax/unpin.rs:52:9
|
52 | / if let Type::Ref(ty) = ty {
53 | | if let Type::Ident(inner) = &ty.inner {
54 | | if ty.mutable && !ty.pinned && is_extern_type_alias(inner) {
55 | | reasons.insert(&inner.rust, UnpinReason::Ref(ty));
... |
58 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
52 ~ if let Type::Ref(ty) = ty
53 ~ && let Type::Ident(inner) = &ty.inner {
54 | if ty.mutable && !ty.pinned && is_extern_type_alias(inner) {
55 | reasons.insert(&inner.rust, UnpinReason::Ref(ty));
56 | }
57 ~ }
|
warning: this `if` statement can be collapsed
--> syntax/unpin.rs:53:13
|
53 | / if let Type::Ident(inner) = &ty.inner {
54 | | if ty.mutable && !ty.pinned && is_extern_type_alias(inner) {
55 | | reasons.insert(&inner.rust, UnpinReason::Ref(ty));
56 | | }
57 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
|
53 ~ if let Type::Ident(inner) = &ty.inner
54 ~ && ty.mutable && !ty.pinned && is_extern_type_alias(inner) {
55 | reasons.insert(&inner.rust, UnpinReason::Ref(ty));
56 ~ }
|
Raise required compiler to Rust 1.88
Fixes security vulnerabilities in undici.
error: linking with `emcc` failed: exit status: 1
|
= note: "emcc" "-s" "EXPORTED_FUNCTIONS=[\"_main\",\"_org$blobstore$cxxbridge1$198$MultiBuf$operator$alignof\",\"_org$blobstore$cxxbridge1$198$MultiBuf$operator$sizeof\",\"_org$blobstore$cxxbridge1$198$next_chunk\",\"_cxxbridge1$exception\",\"_cxxbridge1$rust_vec$bool$capacity\",\"_cxxbridge1$rust_vec$bool$data\",\"_cxxbridge1$rust_vec$bool$drop\",\"_cxxbridge1$rust_vec$bool$len\",\"_cxxbridge1$rust_vec$bool$new\",\"_cxxbridge1$rust_vec$bool$reserve_total\",\"_cxxbridge1$rust_vec$bool$set_len\",\"_cxxbridge1$rust_vec$bool$truncate\",\"_cxxbridge1$rust_vec$char$capacity\",\"_cxxbridge1$rust_vec$char$data\",\"_cxxbridge1$rust_vec$char$drop\",\"_cxxbridge1$rust_vec$char$len\",\"_cxxbridge1$rust_vec$char$new\",\"_cxxbridge1$rust_vec$char$reserve_total\",\"_cxxbridge1$rust_vec$char$set_len\",\"_cxxbridge1$rust_vec$char$truncate\",\"_cxxbridge1$rust_vec$f32$capacity\",\"_cxxbridge1$rust_vec$f32$data\",\"_cxxbridge1$rust_vec$f32$drop\",\"_cxxbridge1$rust_vec$f32$len\",\"_cxxbridge1$rust_vec$f32$new\",\"_cxxbridge1$rust_vec$f32$reserve_total\",\"_cxxbridge1$rust_vec$f32$set_len\",\"_cxxbridge1$rust_vec$f32$truncate\",\"_cxxbridge1$rust_vec$f64$capacity\",\"_cxxbridge1$rust_vec$f64$data\",\"_cxxbridge1$rust_vec$f64$drop\",\"_cxxbridge1$rust_vec$f64$len\",\"_cxxbridge1$rust_vec$f64$new\",\"_cxxbridge1$rust_vec$f64$reserve_total\",\"_cxxbridge1$rust_vec$f64$set_len\",\"_cxxbridge1$rust_vec$f64$truncate\",\"_cxxbridge1$rust_vec$i16$capacity\",\"_cxxbridge1$rust_vec$i16$data\",\"_cxxbridge1$rust_vec$i16$drop\",\"_cxxbridge1$rust_vec$i16$len\",\"_cxxbridge1$rust_vec$i16$new\",\"_cxxbridge1$rust_vec$i16$reserve_total\",\"_cxxbridge1$rust_vec$i16$set_len\",\"_cxxbridge1$rust_vec$i16$truncate\",\"_cxxbridge1$rust_vec$i32$capacity\",\"_cxxbridge1$rust_vec$i32$data\",\"_cxxbridge1$rust_vec$i32$drop\",\"_cxxbridge1$rust_vec$i32$len\",\"_cxxbridge1$rust_vec$i32$new\",\"_cxxbridge1$rust_vec$i32$reserve_total\",\"_cxxbridge1$rust_vec$i32$set_len\",\"_cxxbridge1$rust_vec$i32$truncate\",\"_cxxbridge1$rust_vec$i64$capacity\",\"_cxxbridge1$rust_vec$i64$data\",\"_cxxbridge1$rust_vec$i64$drop\",\"_cxxbridge1$rust_vec$i64$len\",\"_cxxbridge1$rust_vec$i64$new\",\"_cxxbridge1$rust_vec$i64$reserve_total\",\"_cxxbridge1$rust_vec$i64$set_len\",\"_cxxbridge1$rust_vec$i64$truncate\",\"_cxxbridge1$rust_vec$i8$capacity\",\"_cxxbridge1$rust_vec$i8$data\",\"_cxxbridge1$rust_vec$i8$drop\",\"_cxxbridge1$rust_vec$i8$len\",\"_cxxbridge1$rust_vec$i8$new\",\"_cxxbridge1$rust_vec$i8$reserve_total\",\"_cxxbridge1$rust_vec$i8$set_len\",\"_cxxbridge1$rust_vec$i8$truncate\",\"_cxxbridge1$rust_vec$isize$capacity\",\"_cxxbridge1$rust_vec$isize$data\",\"_cxxbridge1$rust_vec$isize$drop\",\"_cxxbridge1$rust_vec$isize$len\",\"_cxxbridge1$rust_vec$isize$new\",\"_cxxbridge1$rust_vec$isize$reserve_total\",\"_cxxbridge1$rust_vec$isize$set_len\",\"_cxxbridge1$rust_vec$isize$truncate\",\"_cxxbridge1$rust_vec$str$capacity\",\"_cxxbridge1$rust_vec$str$data\",\"_cxxbridge1$rust_vec$str$drop\",\"_cxxbridge1$rust_vec$str$len\",\"_cxxbridge1$rust_vec$str$new\",\"_cxxbridge1$rust_vec$str$reserve_total\",\"_cxxbridge1$rust_vec$str$set_len\",\"_cxxbridge1$rust_vec$str$truncate\",\"_cxxbridge1$rust_vec$string$capacity\",\"_cxxbridge1$rust_vec$string$data\",\"_cxxbridge1$rust_vec$string$drop\",\"_cxxbridge1$rust_vec$string$len\",\"_cxxbridge1$rust_vec$string$new\",\"_cxxbridge1$rust_vec$string$reserve_total\",\"_cxxbridge1$rust_vec$string$set_len\",\"_cxxbridge1$rust_vec$string$truncate\",\"_cxxbridge1$rust_vec$u16$capacity\",\"_cxxbridge1$rust_vec$u16$data\",\"_cxxbridge1$rust_vec$u16$drop\",\"_cxxbridge1$rust_vec$u16$len\",\"_cxxbridge1$rust_vec$u16$new\",\"_cxxbridge1$rust_vec$u16$reserve_total\",\"_cxxbridge1$rust_vec$u16$set_len\",\"_cxxbridge1$rust_vec$u16$truncate\",\"_cxxbridge1$rust_vec$u32$capacity\",\"_cxxbridge1$rust_vec$u32$data\",\"_cxxbridge1$rust_vec$u32$drop\",\"_cxxbridge1$rust_vec$u32$len\",\"_cxxbridge1$rust_vec$u32$new\",\"_cxxbridge1$rust_vec$u32$reserve_total\",\"_cxxbridge1$rust_vec$u32$set_len\",\"_cxxbridge1$rust_vec$u32$truncate\",\"_cxxbridge1$rust_vec$u64$capacity\",\"_cxxbridge1$rust_vec$u64$data\",\"_cxxbridge1$rust_vec$u64$drop\",\"_cxxbridge1$rust_vec$u64$len\",\"_cxxbridge1$rust_vec$u64$new\",\"_cxxbridge1$rust_vec$u64$reserve_total\",\"_cxxbridge1$rust_vec$u64$set_len\",\"_cxxbridge1$rust_vec$u64$truncate\",\"_cxxbridge1$rust_vec$u8$capacity\",\"_cxxbridge1$rust_vec$u8$data\",\"_cxxbridge1$rust_vec$u8$drop\",\"_cxxbridge1$rust_vec$u8$len\",\"_cxxbridge1$rust_vec$u8$new\",\"_cxxbridge1$rust_vec$u8$reserve_total\",\"_cxxbridge1$rust_vec$u8$set_len\",\"_cxxbridge1$rust_vec$u8$truncate\",\"_cxxbridge1$rust_vec$usize$capacity\",\"_cxxbridge1$rust_vec$usize$data\",\"_cxxbridge1$rust_vec$usize$drop\",\"_cxxbridge1$rust_vec$usize$len\",\"_cxxbridge1$rust_vec$usize$new\",\"_cxxbridge1$rust_vec$usize$reserve_total\",\"_cxxbridge1$rust_vec$usize$set_len\",\"_cxxbridge1$rust_vec$usize$truncate\",\"_cxxbridge1$slice$len\",\"_cxxbridge1$slice$new\",\"_cxxbridge1$slice$ptr\",\"_cxxbridge1$str$from\",\"_cxxbridge1$str$len\",\"_cxxbridge1$str$new\",\"_cxxbridge1$str$ptr\",\"_cxxbridge1$str$ref\",\"_cxxbridge1$string$capacity\",\"_cxxbridge1$string$clone\",\"_cxxbridge1$string$drop\",\"_cxxbridge1$string$from_utf16\",\"_cxxbridge1$string$from_utf16_lossy\",\"_cxxbridge1$string$from_utf8\",\"_cxxbridge1$string$from_utf8_lossy\",\"_cxxbridge1$string$len\",\"_cxxbridge1$string$new\",\"_cxxbridge1$string$ptr\",\"_cxxbridge1$string$reserve_additional\",\"_cxxbridge1$string$reserve_total\"]" "<2 object files omitted>" "-l" "cxxbridge-demo" "/home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/panic_unwind/6047b267758ce24c/out/libpanic_unwind-6047b267758ce24c.rlib" "/home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/cxx/d94c05df5c1ae56c/out/libcxx-d94c05df5c1ae56c.rlib" "/home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/foldhash/45f55e60b6909cec/out/libfoldhash-45f55e60b6909cec.rlib" "/home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/link-cplusplus/9aa0cbb9008a9d86/out/liblink_cplusplus-9aa0cbb9008a9d86.rlib" "/home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/std/c620505fc70b0c19/out/libstd-c620505fc70b0c19.rlib" "/home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/cfg-if/7ab38bf47b662795/out/libcfg_if-7ab38bf47b662795.rlib" "/home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/rustc-demangle/46c264a548da57dd/out/librustc_demangle-46c264a548da57dd.rlib" "/home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/std_detect/30baa70dc59577a3/out/libstd_detect-30baa70dc59577a3.rlib" "/home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/hashbrown/a7e10e5b7dc3c0fe/out/libhashbrown-a7e10e5b7dc3c0fe.rlib" "/home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/rustc-std-workspace-alloc/b5a5e78a44dcade8/out/librustc_std_workspace_alloc-b5a5e78a44dcade8.rlib" "/home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/miniz_oxide/4c0c199a158e647a/out/libminiz_oxide-4c0c199a158e647a.rlib" "/home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/adler2/909c710eadb7816a/out/libadler2-909c710eadb7816a.rlib" "/home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/unwind/7026ac9fa3f8eec1/out/libunwind-7026ac9fa3f8eec1.rlib" "/home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/libc/c260072375030cbb/out/liblibc-c260072375030cbb.rlib" "/home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/rustc-std-workspace-core/c5b7562f679b0e07/out/librustc_std_workspace_core-c5b7562f679b0e07.rlib" "/home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/alloc/925ee459216b08d4/out/liballoc-925ee459216b08d4.rlib" "/home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/core/3c00c9952ed16fab/out/libcore-3c00c9952ed16fab.rlib" "/home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/compiler_builtins/130a3e97cc6cc4a2/out/libcompiler_builtins-130a3e97cc6cc4a2.rlib" "-l" "stdc++" "-B<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/bin/gcc-ld" "--target=wasm32-unknown-emscripten" "-fwasm-exceptions" "-L" "/home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/demo/e10a00f15fa7cdc2/out" "-L" "/home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/cxx/26ad6d75f82189fb/out" "-L" "/home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/link-cplusplus/d8a1fa74686c7474/out" "-L" "<sysroot>/lib/rustlib/wasm32-unknown-emscripten/lib/self-contained" "-o" "/home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/demo/e3b8b591f85bfd2e/out/demo.js" "-O3" "-g0" "--emrun" "-sABORTING_MALLOC=0" "-sWASM_BIGINT"
= note: some arguments are omitted. use `--verbose` to show all linker arguments
= note: wasm-ld: error: /home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/demo/e10a00f15fa7cdc2/out/libcxxbridge-demo.a(ff1ee5417837d52c-main.rs.o): undefined symbol: std::__2::__shared_weak_count::__release_weak()
wasm-ld: error: /home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/demo/e10a00f15fa7cdc2/out/libcxxbridge-demo.a(ff1ee5417837d52c-main.rs.o): undefined symbol: operator delete(void*, unsigned long)
wasm-ld: error: /home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/demo/e10a00f15fa7cdc2/out/libcxxbridge-demo.a(48d3f1b29a630f4c-blobstore.o): undefined symbol: std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char>>::append(char const*, unsigned long)
wasm-ld: error: /home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/demo/e10a00f15fa7cdc2/out/libcxxbridge-demo.a(48d3f1b29a630f4c-blobstore.o): undefined symbol: std::__2::__hash_memory(void const*, unsigned long)
wasm-ld: error: /home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/demo/e10a00f15fa7cdc2/out/libcxxbridge-demo.a(48d3f1b29a630f4c-blobstore.o): undefined symbol: operator delete(void*, unsigned long)
wasm-ld: error: /home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/demo/e10a00f15fa7cdc2/out/libcxxbridge-demo.a(48d3f1b29a630f4c-blobstore.o): undefined symbol: operator delete(void*, unsigned long)
wasm-ld: error: /home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/demo/e10a00f15fa7cdc2/out/libcxxbridge-demo.a(48d3f1b29a630f4c-blobstore.o): undefined symbol: operator delete(void*, unsigned long)
wasm-ld: error: /home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/demo/e10a00f15fa7cdc2/out/libcxxbridge-demo.a(48d3f1b29a630f4c-blobstore.o): undefined symbol: std::__2::__hash_memory(void const*, unsigned long)
wasm-ld: error: /home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/demo/e10a00f15fa7cdc2/out/libcxxbridge-demo.a(48d3f1b29a630f4c-blobstore.o): undefined symbol: operator new(unsigned long)
wasm-ld: error: /home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/demo/e10a00f15fa7cdc2/out/libcxxbridge-demo.a(48d3f1b29a630f4c-blobstore.o): undefined symbol: std::__2::__next_prime(unsigned long)
wasm-ld: error: /home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/demo/e10a00f15fa7cdc2/out/libcxxbridge-demo.a(48d3f1b29a630f4c-blobstore.o): undefined symbol: std::__2::__next_prime(unsigned long)
wasm-ld: error: /home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/demo/e10a00f15fa7cdc2/out/libcxxbridge-demo.a(48d3f1b29a630f4c-blobstore.o): undefined symbol: operator delete(void*, unsigned long)
wasm-ld: error: /home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/demo/e10a00f15fa7cdc2/out/libcxxbridge-demo.a(48d3f1b29a630f4c-blobstore.o): undefined symbol: operator delete(void*, unsigned long)
wasm-ld: error: /home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/demo/e10a00f15fa7cdc2/out/libcxxbridge-demo.a(48d3f1b29a630f4c-blobstore.o): undefined symbol: std::__2::__hash_memory(void const*, unsigned long)
wasm-ld: error: /home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/demo/e10a00f15fa7cdc2/out/libcxxbridge-demo.a(48d3f1b29a630f4c-blobstore.o): undefined symbol: operator new(unsigned long)
wasm-ld: error: /home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/demo/e10a00f15fa7cdc2/out/libcxxbridge-demo.a(48d3f1b29a630f4c-blobstore.o): undefined symbol: std::__2::__next_prime(unsigned long)
wasm-ld: error: /home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/demo/e10a00f15fa7cdc2/out/libcxxbridge-demo.a(48d3f1b29a630f4c-blobstore.o): undefined symbol: std::__2::__next_prime(unsigned long)
wasm-ld: error: /home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/demo/e10a00f15fa7cdc2/out/libcxxbridge-demo.a(48d3f1b29a630f4c-blobstore.o): undefined symbol: operator new(unsigned long)
wasm-ld: error: /home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/demo/e10a00f15fa7cdc2/out/libcxxbridge-demo.a(48d3f1b29a630f4c-blobstore.o): undefined symbol: operator delete(void*, unsigned long)
wasm-ld: error: /home/runner/work/cxx/cxx/target/wasm32-unknown-emscripten/release/build/demo/e10a00f15fa7cdc2/out/libcxxbridge-demo.a(48d3f1b29a630f4c-blobstore.o): undefined symbol: operator delete(void*, unsigned long)
wasm-ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
emcc: warning: link failed with undefined C++ symbols. Try linking with 'em++' or passing '-sDEFAULT_TO_CXX'
emcc: error: '/home/runner/work/_temp/337b35fe-a850-49f2-aee8-ad0237d4e505/emsdk-main/upstream/bin/wasm-ld @/tmp/emscripten_6ekocut1.rsp.utf-8' failed (returned 1)
Fix emscripten linker choice in CI
warning: used `assert!` to check that a value is empty
--> bridge/src/builtin.rs:440:5
|
440 | assert!(namespace.is_empty());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assert_is_empty
= note: `-W clippy::assert-is-empty` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::assert_is_empty)]`
help: use `assert_eq!` to show the value on failure
|
440 - assert!(namespace.is_empty());
440 + assert_eq!(namespace, [] as [bridge::block::Block<'_>; 0]);
|
warning: used `assert!` to check that a value is not empty
--> syntax/symbol.rs:39:9
|
39 | assert!(!symbol.0.is_empty());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assert_is_empty
help: use `assert_ne!` to show the value on failure
|
39 - assert!(!symbol.0.is_empty());
39 + assert_ne!(symbol.0, "");
|
warning: used `assert!` to check that a value is not empty
--> syntax/symbol.rs:114:5
|
114 | assert!(!symbol.0.is_empty());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assert_is_empty
help: use `assert_ne!` to show the value on failure
|
114 - assert!(!symbol.0.is_empty());
114 + assert_ne!(symbol.0, "");
|
warning: used `assert!` to check that a value is not empty
--> bridge/lib/tests/test.rs:19:5
|
19 | assert!(!code.header.is_empty());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assert_is_empty
= note: `-W clippy::assert-is-empty` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::assert_is_empty)]`
help: use `assert_ne!` to show the value on failure
|
19 - assert!(!code.header.is_empty());
19 + assert_ne!(code.header, [] as [u8; 0]);
|
warning: used `assert!` to check that a value is not empty
--> bridge/lib/tests/test.rs:20:5
|
20 | assert!(!code.implementation.is_empty());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assert_is_empty
help: use `assert_ne!` to show the value on failure
|
20 - assert!(!code.implementation.is_empty());
20 + assert_ne!(code.implementation, [] as [u8; 0]);
|
warning: used `assert!` to check that a value is empty
--> tests/ffi/lib.rs:697:5
|
697 | assert!(v.as_slice().is_empty());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assert_is_empty
= note: `-W clippy::assert-is-empty` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::assert_is_empty)]`
help: use `assert_eq!` to show the value on failure
|
697 - assert!(v.as_slice().is_empty());
697 + assert_eq!(v.as_slice(), []);
|
warning: using `clone` on type `usize` which implements the `Copy` trait
--> tests/ffi/lib.rs:38:14
|
38 | #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
| ^^^^^ help: try removing the `clone` call: `z: usize`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `-W clippy::clone-on-copy` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::clone_on_copy)]`
warning: using `clone` on type `usize` which implements the `Copy` trait
--> tests/ffi/lib.rs:81:14
|
81 | #[derive(Clone)]
| ^^^^^ help: try removing the `clone` call: `z: usize`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
Suppress clone_on_copy clippy lint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )