Commit Graph

514 Commits

Author SHA1 Message Date
徐未来
b110613bee cxx 1.0.91升级至1.0.97
Signed-off-by: 徐未来 <xuweilai2@huawei.com>
2024-04-02 19:59:25 +08:00
openharmony_ci
96698d870d
回退 'Pull Request !11 : cxx1.0.91升级至1.0.97' 2024-04-02 03:30:32 +00:00
徐未来
e4f6feee96 1.0.91升级至1.0.97
Signed-off-by: 徐未来 <xuweilai2@huawei.com>
2024-03-08 16:36:47 +08:00
lubinglun
2047426ea5 Add GN Build Files and Custom Modifications
Issue:https://gitee.com/openharmony/build/issues/I6UFTP
Signed-off-by: lubinglun <lubinglun@huawei.com>
2023-04-12 17:25:56 +08:00
David Tolnay
473f24ab1a
Release 1.0.91 2023-02-15 09:29:18 -08:00
David Tolnay
33b5c9eec5
Release 1.0.90 2023-02-10 19:36:09 -08:00
David Tolnay
b3bdffce04
Ignore extra_unused_type_parameters clippy lint in generated code
error: type parameter goes unused in function definition
      --> demo/src/main.rs:11:14
       |
    11 |         type MultiBuf;
       |              ^^^^^^^^
       |
       = help: consider removing the parameter
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters
       = note: `-D clippy::extra-unused-type-parameters` implied by `-D clippy::all`

    error: type parameter goes unused in function definition
      --> src/cxx_string.rs:94:15
       |
    94 |     pub fn new<T: Private>() -> Self {
       |               ^^^^^^^^^^^^
       |
       = help: consider removing the parameter
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters

    error: type parameter goes unused in function definition
       --> src/extern_type.rs:184:27
        |
    184 | pub fn verify_extern_type<T: ExternType<Id = Id>, Id>() {}
        |                           ^^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: consider removing the parameter
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters
        = note: `-D clippy::extra-unused-type-parameters` implied by `-D clippy::all`

    error: type parameter goes unused in function definition
       --> src/extern_type.rs:187:27
        |
    187 | pub fn verify_extern_kind<T: ExternType<Kind = Kind>, Kind: self::Kind>() {}
        |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: consider removing the parameter
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters

    error: type parameter goes unused in function definition
       --> tests/ffi/lib.rs:230:14
        |
    230 |         type Reference<'a>;
        |              ^^^^^^^^^
        |
        = help: consider removing the parameter
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters
        = note: `-D clippy::extra-unused-type-parameters` implied by `-D clippy::all`

    error: type parameter goes unused in function definition
       --> tests/ffi/lib.rs:259:14
        |
    259 |         type R;
        |              ^
        |
        = help: consider removing the parameter
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_type_parameters
2023-02-10 19:21:36 -08:00
David Tolnay
1fdbb96b62
Release 1.0.89 2023-02-01 12:52:54 -08:00
David Tolnay
69f0380c3d
Suppress various pedantic clippy lints 2023-02-01 12:44:48 -08:00
David Tolnay
721bfc4eb3
Suppress dead_code on generated enum variants 2023-02-01 12:38:18 -08:00
David Tolnay
f33abb9ca8
Release 1.0.88 2023-01-26 20:48:38 -08:00
David Tolnay
3aa71ecdd4
Release 1.0.87 2023-01-19 19:01:49 -08:00
David Tolnay
fe16a5dea3
Raise minimum rustc to 1.60 2023-01-07 12:37:18 -08:00
David Tolnay
1f3627267a
Release 1.0.86 2023-01-07 12:18:32 -08:00
David Tolnay
09ae2ee7b5
Release 1.0.85 2022-12-18 09:42:05 -08:00
David Tolnay
1ac3311fa9
Release 1.0.84 2022-12-17 10:52:16 -08:00
David Tolnay
340f0ba52a
Release 1.0.83 2022-12-02 17:13:59 -08:00
David Tolnay
513371edca
Release 1.0.82 2022-11-18 01:23:30 -08:00
David Tolnay
544b350af6
Release 1.0.81 2022-11-08 01:00:47 -08:00
David Tolnay
8a029059c1
Support raw identifiers in namespace attribute
As in: #[namespace = ::my::company::r#box::implementation]
2022-11-08 00:35:10 -08:00
David Tolnay
c7060d4036
Release 1.0.80 2022-10-21 09:33:41 -07:00
David Tolnay
152b89b08b
No-std fixes for Box, String, Pin, c_char 2022-10-21 09:18:48 -07:00
David Tolnay
97a46f93b6
Release 1.0.79 2022-10-15 15:15:47 -07:00
David Tolnay
d2a7e0b244
Release 1.0.78 2022-09-28 16:45:12 -07:00
David Tolnay
be7090ab22
Release 1.0.77 2022-09-27 17:53:26 -07:00
David Tolnay
4e96c36aac
Release 1.0.76 2022-09-19 10:36:53 -07:00
David Tolnay
0293ff50cf
Release 1.0.75 2022-09-02 14:33:59 -07:00
David Tolnay
02e9a4795d
Release 1.0.74 2022-08-30 15:53:14 -07:00
David Tolnay
a6608495d1
Release 1.0.73 2022-08-01 17:10:57 -07:00
David Tolnay
5561bda12c
Sort package entries in Cargo.toml 2022-07-31 19:19:02 -07:00
David Tolnay
9e0d3680be
Release 1.0.72 2022-07-16 20:12:42 -07:00
David Tolnay
02d2600ebc
Resolve unused_must_use warning inside generated code
warning: unused return value of `Box::<T>::from_raw` that must be used
       --> tests/ffi/lib.rs:337:22
        |
    337 |     impl Box<Shared> {}
        |                      ^^
        |
        = note: `#[warn(unused_must_use)]` on by default
        = note: call `drop(from_raw(ptr))` if you intend to drop the `Box`

    warning: unused return value of `Box::<T>::from_raw` that must be used
      --> tests/ffi/lib.rs:72:27
       |
    72 |         second: Box<Second>,
       |                           ^
       |
       = note: call `drop(from_raw(ptr))` if you intend to drop the `Box`

    warning: unused return value of `Box::<T>::from_raw` that must be used
      --> tests/ffi/lib.rs:99:35
       |
    99 |         fn c_return_box() -> Box<R>;
       |                                   ^
       |
       = note: call `drop(from_raw(ptr))` if you intend to drop the `Box`
2022-07-16 20:03:45 -07:00
David Tolnay
2e1527c834
Release 1.0.71 2022-07-06 07:19:36 -07:00
abbform
0bbc34bc25 make #derive before #attr when derive 2022-07-06 21:58:48 +08:00
David Tolnay
ac89872316
Release 1.0.70 2022-07-04 09:56:31 -07:00
David Tolnay
66ba9a0a66
Preserve clippy attrs on extern "Rust" fn
#[cxx::bridge]
    mod ffi {
        extern "Rust" {
            #[allow(clippy::too_many_arguments)]
            fn repro(a: i32, b: i32, c: i32, d: i32, e: i32, f: i32, g: i32, h: i32) -> bool;
        }
    }

Before:

    warning: this function has too many arguments (8/7)
     --> src/main.rs:5:12
      |
    5 |         fn repro(a: i32, b: i32, c: i32, d: i32, e: i32, f: i32, g: i32, h: i32) -> bool;
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |
      = note: `#[warn(clippy::too_many_arguments)]` on by default
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

After: no lint.
2022-07-04 09:33:40 -07:00
David Tolnay
5d50b94280
Release 1.0.69 2022-06-17 23:56:34 -07:00
David Tolnay
b305ae7741
Ignore derive_partial_eq_without_eq clippy lint
error: you are deriving `PartialEq` and can implement `Eq`
     --> gen/lib/src/gen/block.rs:3:23
      |
    3 | #[derive(Copy, Clone, PartialEq, Debug)]
      |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
      |
      = note: `-D clippy::derive-partial-eq-without-eq` implied by `-D clippy::all`
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
     --> gen/cmd/src/gen/block.rs:3:23
      |
    3 | #[derive(Copy, Clone, PartialEq, Debug)]
      |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
      |
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
     --> gen/build/src/gen/block.rs:3:23
      |
    3 | #[derive(Copy, Clone, PartialEq, Debug)]
      |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
      |
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
     --> gen/lib/src/syntax/atom.rs:5:23
      |
    5 | #[derive(Copy, Clone, PartialEq)]
      |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
      |
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> gen/lib/src/syntax/derive.rs:10:23
       |
    10 | #[derive(Copy, Clone, PartialEq)]
       |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
     --> gen/cmd/src/syntax/atom.rs:5:23
      |
    5 | #[derive(Copy, Clone, PartialEq)]
      |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
      |
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
     --> gen/build/src/syntax/atom.rs:5:23
      |
    5 | #[derive(Copy, Clone, PartialEq)]
      |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
      |
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> gen/cmd/src/syntax/derive.rs:10:23
       |
    10 | #[derive(Copy, Clone, PartialEq)]
       |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> gen/build/src/syntax/derive.rs:10:23
       |
    10 | #[derive(Copy, Clone, PartialEq)]
       |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> gen/lib/src/syntax/mod.rs:72:23
       |
    72 | #[derive(Copy, Clone, PartialEq, Debug)]
       |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> gen/lib/src/syntax/mod.rs:285:23
        |
    285 | #[derive(Copy, Clone, PartialEq)]
        |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> gen/cmd/src/syntax/mod.rs:72:23
       |
    72 | #[derive(Copy, Clone, PartialEq, Debug)]
       |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> gen/cmd/src/syntax/mod.rs:285:23
        |
    285 | #[derive(Copy, Clone, PartialEq)]
        |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> gen/build/src/syntax/mod.rs:72:23
       |
    72 | #[derive(Copy, Clone, PartialEq, Debug)]
       |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> gen/build/src/syntax/mod.rs:285:23
        |
    285 | #[derive(Copy, Clone, PartialEq)]
        |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
     --> macro/src/syntax/atom.rs:5:23
      |
    5 | #[derive(Copy, Clone, PartialEq)]
      |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
      |
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> macro/src/syntax/derive.rs:10:23
       |
    10 | #[derive(Copy, Clone, PartialEq)]
       |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
      --> macro/src/syntax/mod.rs:72:23
       |
    72 | #[derive(Copy, Clone, PartialEq, Debug)]
       |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq

    error: you are deriving `PartialEq` and can implement `Eq`
       --> macro/src/syntax/mod.rs:285:23
        |
    285 | #[derive(Copy, Clone, PartialEq)]
        |                       ^^^^^^^^^ help: consider deriving `Eq` as well: `PartialEq, Eq`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eq
2022-05-21 19:58:53 -07:00
David Tolnay
2a197e7688
Replace unicode-xid with unicode-ident crate 2022-05-16 15:43:42 -07:00
David Tolnay
d4920548a7
Release 1.0.68 2022-05-13 16:45:29 -07:00
David Tolnay
13cc5d9df9
Resolve unused_attributes lints in generated code
warning: `#[doc(hidden)]` is ignored on trait impl items
      --> tests/ffi/module.rs:74:23
       |
    74 |     impl UniquePtr<D> {}
       |                       ^^ help: remove this attribute
       |
       = note: `#[warn(unused_attributes)]` on by default
       = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
       = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

    warning: `#[doc(hidden)]` is ignored on trait impl items
      --> tests/ffi/module.rs:75:23
       |
    75 |     impl UniquePtr<E> {}
       |                       ^^ help: remove this attribute
       |
       = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
       = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

    warning: `#[doc(hidden)]` is ignored on trait impl items
      --> tests/ffi/module.rs:76:23
       |
    76 |     impl UniquePtr<F> {}
       |                       ^^ help: remove this attribute
       |
       = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
       = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

    warning: `#[doc(hidden)]` is ignored on trait impl items
      --> tests/ffi/module.rs:77:23
       |
    77 |     impl UniquePtr<G> {}
       |                       ^^ help: remove this attribute
       |
       = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
       = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

    warning: `#[doc(hidden)]` is ignored on trait impl items
      --> tests/ffi/module.rs:57:51
       |
    57 |         fn c_return_ns_unique_ptr() -> UniquePtr<H>;
       |                                                   ^ help: remove this attribute
       |
       = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
       = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

    warning: `#[doc(hidden)]` is ignored on trait impl items
      --> tests/ffi/module.rs:71:54
       |
    71 |         fn ns_c_return_unique_ptr_ns() -> UniquePtr<I>;
       |                                                      ^ help: remove this attribute
       |
       = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
       = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

    warning: `#[doc(hidden)]` is ignored on trait impl items
       --> tests/ffi/lib.rs:227:18
        |
    227 |         #[derive(ExternType)]
        |                  ^^^^^^^^^^ help: remove this attribute
        |
        = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
        = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

    warning: `#[doc(hidden)]` is ignored on trait impl items
       --> tests/ffi/lib.rs:337:34
        |
    337 |     impl CxxVector<SharedString> {}
        |                                  ^^ help: remove this attribute
        |
        = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
        = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

    warning: `#[doc(hidden)]` is ignored on trait impl items
      --> tests/ffi/lib.rs:99:48
       |
    99 |         fn c_return_unique_ptr() -> UniquePtr<C>;
       |                                                ^ help: remove this attribute
       |
       = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
       = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

    warning: `#[doc(hidden)]` is ignored on trait impl items
       --> tests/ffi/lib.rs💯48
        |
    100 |         fn c_return_shared_ptr() -> SharedPtr<C>;
        |                                                ^ help: remove this attribute
        |
        = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
        = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

    warning: `#[doc(hidden)]` is ignored on trait impl items
       --> tests/ffi/lib.rs:112:77
        |
    112 |         fn c_return_unique_ptr_vector_shared() -> UniquePtr<CxxVector<Shared>>;
        |                                                                             ^^ help: remove this attribute
        |
        = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
        = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

    warning: `#[doc(hidden)]` is ignored on trait impl items
       --> tests/ffi/lib.rs:113:72
        |
    113 |         fn c_return_unique_ptr_vector_opaque() -> UniquePtr<CxxVector<C>>;
        |                                                                        ^^ help: remove this attribute
        |
        = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
        = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

    warning: `#[doc(hidden)]` is ignored on trait impl items
       --> tests/ffi/lib.rs:204:44
        |
    204 |         fn c_get_use_count(weak: &WeakPtr<C>) -> usize;
        |                                            ^ help: remove this attribute
        |
        = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
        = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item

    warning: `#[doc(hidden)]` is ignored on trait impl items
       --> tests/ffi/lib.rs:234:72
        |
    234 |         fn c_return_borrow<'a>(s: &'a CxxString) -> UniquePtr<Borrow<'a>>;
        |                                                                        ^^ help: remove this attribute
        |
        = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
        = note: whether the impl item is `doc(hidden)` or not entirely depends on the corresponding trait item
2022-05-09 21:33:40 -07:00
David Tolnay
0006c00f45
Release 1.0.67 2022-04-25 18:50:09 -07:00
David Tolnay
f13e68f5c5
Release 1.0.66 2022-03-08 12:19:26 -08:00
David Tolnay
c53e4bc81b
Release 1.0.65 2022-02-16 19:46:45 -08:00
Philip Craig
a4c94445a9 clippy fixes 2022-02-13 15:00:29 +00:00
David Tolnay
26137f95a2
Release 1.0.64 2022-01-30 13:03:12 -08:00
David Tolnay
e41be2f96b
Begin development on async fn support 2022-01-18 17:58:16 -08:00
David Tolnay
d58307a1f0
Rename variants_from_header optin to "experimental-enum-variants-from-header"
In preparation for "experimental-async-fn" as a completely orthogonal
experimental feature.
2022-01-18 17:29:01 -08:00
David Tolnay
cf5bbe629e
Fix variants_from_header build 2022-01-18 17:21:16 -08:00
David Tolnay
34d4447d43
Release 1.0.63 2022-01-18 15:55:25 -08:00