Age | Commit message (Collapse) | Author |
|
* Update build to match upstream's use of edition 2021
Test: mmm
Change-Id: Iad58f8bb416050de4fb3f3087c051d680a2180e7
|
|
Required by the `toml` crate.
|
|
|
|
|
|
|
|
Set C++ standard version using cc::Build::std
|
|
warning: returning the result of a `let` binding from a block
--> flags/src/impl.rs:14:5
|
3 | let mut flag = "c++11";
| ----------------------- unnecessary `let` binding
...
14 | flag
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
= note: `-W clippy::let-and-return` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::let_and_return)]`
help: return the expression directly
|
3 ~
4 |
...
13 |
14 ~ ("c++11") as _
|
|
|
|
|
|
|
Documentation: Use `builder.std` rather than explicit compiler flags
|
|
The `-std=c++11` flag only works with GNU-style compiler frontends
for MSVC this should be `/std:c++11`. Even better is to use the builder's
explicit C/C++ standard setter.
|
|
|
|
|
|
Fix: Use correct methods when writing toposorted structs
|
|
If there are other structs in `toposorted_structs` before `strct`, they were written with the methods of `strct` instead of their own. This commit fixes that.
This commit also fixes the check against `out.types.cxx` that should prevent duplicate definitions. I didn't encounter any such issues, but I still think that it makes sense to fix it.
Both issues were introduced in commit 5439fa195bbece443d261d40bf08d77012d44e58.
|
|
|
|
|
|
|
|
warning: the item `Trait` is imported redundantly
--> macro/src/derive.rs:1:43
|
1 | use crate::syntax::{derive, Enum, Struct, Trait};
| ^^^^^
...
5 | pub(crate) use crate::syntax::derive::*;
| ------------------------ the item `Trait` is already imported here
|
= note: `#[warn(unused_imports)]` on by default
|
|
|
|
|
|
https://github.com/rust-lang/rust-clippy/issues/12257
warning: current MSRV (Minimum Supported Rust Version) is `1.60.0` but this item is stable since `1.64.0`
--> tests/cxx_string.rs:16:15
|
16 | g(&s).await;
| ^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv
= note: `-W clippy::incompatible-msrv` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::incompatible_msrv)]`
|
|
warning: reference as raw pointer
--> tests/ffi/module.rs:34:31
|
34 | fn c_take_trivial_ref(d: &D);
| ^^^^^ help: try: `std::ptr::from_ref::<D>(d)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
= note: `-W clippy::ref-as-ptr` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::ref_as_ptr)]`
warning: reference as raw pointer
--> tests/ffi/module.rs:35:35
|
35 | fn c_take_trivial_mut_ref(d: &mut D);
| ^^^^^^^^^ help: try: `std::ptr::from_mut::<D>(d)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> tests/ffi/module.rs:36:35
|
36 | fn c_take_trivial_pin_ref(d: Pin<&D>);
| ^^^^^^^^^ help: try: `std::ptr::from_ref::<D>(d)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> tests/ffi/module.rs:37:39
|
37 | fn c_take_trivial_pin_mut_ref(d: Pin<&mut D>);
| ^^^^^^^^^^^^^ help: try: `std::ptr::from_mut::<D>(d)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> tests/ffi/module.rs:42:34
|
42 | fn c_take_trivial_ns_ref(g: &G);
| ^^^^^ help: try: `std::ptr::from_ref::<G>(g)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> tests/ffi/module.rs:45:30
|
45 | fn c_take_opaque_ref(e: &E);
| ^^^^^ help: try: `std::ptr::from_ref::<E>(e)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> tests/ffi/module.rs:49:33
|
49 | fn c_take_opaque_ns_ref(e: &F);
| ^^^^^ help: try: `std::ptr::from_ref::<F>(e)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> tests/ffi/module.rs:55:36
|
55 | fn c_return_opaque_mut_pin(e: Pin<&mut E>) -> Pin<&mut E>;
| ^^^^^^^^^^^^^ help: try: `std::ptr::from_mut::<E>(e)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> tests/ffi/lib.rs:138:25
|
138 | fn c_take_ref_r(r: &R);
| ^^^^^ help: try: `std::ptr::from_ref::<R>(r)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> tests/ffi/lib.rs:167:37
|
167 | fn c_take_ref_shared_string(s: &SharedString) -> &SharedString;
| ^^^^^^^^^^^^^^^^ help: try: `std::ptr::from_ref::<SharedString>(s)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> tests/ffi/lib.rs:342:34
|
342 | impl CxxVector<SharedString> {}
| ^^ help: try: `std::ptr::from_mut::<{}>({})`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
warning: reference as raw pointer
--> tests/ffi/lib.rs:116:77
|
116 | fn c_return_unique_ptr_vector_shared() -> UniquePtr<CxxVector<Shared>>;
| ^ help: try: `std::ptr::from_mut::<>>(>)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_as_ptr
|
|
|
|
|
|
Required by newest version of clap.
error: package `clap v4.5.0` cannot be built because it requires rustc 1.74 or
newer, while the currently active rustc version is 1.70.0
Either upgrade to rustc 1.74 or newer, or use
cargo update -p clap@4.5.0 --precise ver
where `ver` is the latest version of `clap` supporting rustc 1.70.0
|
|
|
|
Unclear what changed since the lockfile change generated by the
rules_rust 0.38.0 update to cause this.
|
|
|
|
|
|
Remove pre-1.57 proc_macro2::fallback::force()
|
|
|
|
|
|
https://github.com/rust-lang/rust-clippy/issues/12133
warning: function cannot return without recursing
--> gen/build/src/cargo.rs:91:5
|
91 | / fn eq(&self, rhs: &Self) -> bool {
92 | | Lookup::new(&self.0).eq(Lookup::new(&rhs.0))
93 | | }
| |_____^
|
note: recursive call site
--> gen/build/src/cargo.rs:92:9
|
92 | Lookup::new(&self.0).eq(Lookup::new(&rhs.0))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unconditional_recursion
= note: `-W clippy::unconditional-recursion` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::unconditional_recursion)]`
|
|
|
|
warning: you are explicitly cloning with `.map()`
--> gen/cmd/src/app.rs:72:32
|
72 | let cxx_impl_annotations = matches
| ________________________________^
73 | | .get_one::<String>(CXX_IMPL_ANNOTATIONS)
74 | | .map(String::clone);
| |___________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone
= note: `-W clippy::map-clone` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::map_clone)]`
help: consider calling the dedicated `cloned` method
|
72 ~ let cxx_impl_annotations = matches
73 ~ .get_one::<String>(CXX_IMPL_ANNOTATIONS).cloned();
|
|
|
warning: initializer for `thread_local` value can be made `const`
--> tests/test.rs:20:34
|
20 | static CORRECT: Cell<bool> = Cell::new(false);
| ^^^^^^^^^^^^^^^^ help: replace with: `const { Cell::new(false) }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#thread_local_initializer_can_be_made_const
= note: `-W clippy::thread-local-initializer-can-be-made-const` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::thread_local_initializer_can_be_made_const)]`
|
|
|
|
|
|
Work around new dead_code warnings
|
|
|
|
warning: field `0` is never read
--> macro/src/syntax/mod.rs:52:13
|
52 | Include(Include),
| ------- ^^^^^^^
| |
| field in this variant
|
= note: `#[warn(dead_code)]` on by default
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|
52 | Include(()),
| ~~
warning: fields `0` and `1` are never read
--> macro/src/syntax/cfg.rs:9:8
|
9 | Eq(Ident, Option<LitStr>),
| -- ^^^^^ ^^^^^^^^^^^^^^
| |
| fields in this variant
|
help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields
|
9 | Eq((), ()),
| ~~ ~~
warning: field `0` is never read
--> macro/src/syntax/cfg.rs:11:9
|
11 | Any(Vec<CfgExpr>),
| --- ^^^^^^^^^^^^
| |
| field in this variant
|
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|
11 | Any(()),
| ~~
warning: field `0` is never read
--> macro/src/syntax/cfg.rs:12:9
|
12 | Not(Box<CfgExpr>),
| --- ^^^^^^^^^^^^
| |
| field in this variant
|
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|
12 | Not(()),
| ~~
warning: field `0` is never read
--> src/lib.rs:551:13
|
551 | struct void(core::ffi::c_void);
| ---- ^^^^^^^^^^^^^^^^^
| |
| field in this struct
|
= note: `#[warn(dead_code)]` on by default
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|
551 | struct void(());
| ~~
warning: field `0` is never read
--> tests/ffi/lib.rs:411:26
|
411 | pub struct Reference<'a>(&'a String);
| --------- ^^^^^^^^^^
| |
| field in this struct
|
= note: `#[warn(dead_code)]` on by default
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|
411 | pub struct Reference<'a>(());
| ~~
|
|
Include printing of "cargo:rerun-if-changed" in tutorial
|
|
|
|
|
|
|
|
|
|
adamchalmers/achalmers/document-how-to-implement-vectorelement
Document how to implement VectorElement
|
|
Switch to bzlmod
|
|
|