Commit Graph

3334 Commits

Author SHA1 Message Date
topjohnwu
7535230afb Support generate from path in cxx-gen 2024-08-10 00:02:34 -07:00
topjohnwu
8b34a83f11 Do not link against cxxbridge1
This will be handled in the parent project
2024-08-10 00:02:34 -07:00
David Tolnay
a73ec2470e
Bump Bazel build to rustc 1.80.1 2024-08-08 10:39:25 -07:00
David Tolnay
592b53290b
Bazel rules_rust 0.49.0 2024-08-01 12:42:06 -07:00
David Tolnay
f45fe13810
Bump Bazel build to rustc 1.80.0 2024-07-25 14:46:06 -07:00
David Tolnay
1822e22523
Bazel rules_rust 0.48.0 2024-07-19 11:00:01 -07:00
David Tolnay
d92ad1bffa
Bazel rules_rust 0.47.1 2024-07-09 07:56:34 -07:00
David Tolnay
a68d06a614
Delete support for rust versions without c_char in core 2024-07-08 20:57:05 -07:00
David Tolnay
1565becf8d
Resolve manual_let_else clippy lint
warning: this could be rewritten as `let...else`
      --> gen/build/src/cargo.rs:54:13
       |
    54 | /             let k = match k.to_str() {
    55 | |                 Some(k) => k,
    56 | |                 None => continue,
    57 | |             };
       | |______________^ help: consider writing: `let Some(k) = k.to_str() else { continue };`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
       = note: `-W clippy::manual-let-else` implied by `-W clippy::pedantic`
       = help: to override `-W clippy::pedantic` add `#[allow(clippy::manual_let_else)]`

    warning: this could be rewritten as `let...else`
      --> gen/build/src/cargo.rs:58:13
       |
    58 | /             let v = match v.into_string() {
    59 | |                 Ok(v) => v,
    60 | |                 Err(_) => continue,
    61 | |             };
       | |______________^ help: consider writing: `let Ok(v) = v.into_string() else { continue };`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else

    warning: this could be rewritten as `let...else`
       --> gen/build/src/lib.rs:437:5
        |
    437 | /     let mut entries = match fs::read_dir(src) {
    438 | |         Ok(entries) => entries,
    439 | |         Err(_) => return,
    440 | |     };
        | |______^ help: consider writing: `let Ok(mut entries) = fs::read_dir(src) else { return };`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else

    warning: this could be rewritten as `let...else`
       --> gen/build/src/out.rs:160:5
        |
    160 | /     let relative_path = match abstractly_relativize_symlink(original, link) {
    161 | |         Some(relative_path) => relative_path,
    162 | |         None => return original.to_path_buf(),
    163 | |     };
        | |______^ help: consider writing: `let Some(relative_path) = abstractly_relativize_symlink(original, link) else { return original.to_path_buf() };`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else

    warning: this could be rewritten as `let...else`
       --> syntax/check.rs:558:9
        |
    558 | /         let resolve = match cx.types.try_resolve(&receiver.ty) {
    559 | |             Some(resolve) => resolve,
    560 | |             None => return,
    561 | |         };
        | |__________^ help: consider writing: `let Some(resolve) = cx.types.try_resolve(&receiver.ty) else { return };`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
        = note: `-W clippy::manual-let-else` implied by `-W clippy::pedantic`
        = help: to override `-W clippy::pedantic` add `#[allow(clippy::manual_let_else)]`

    warning: this could be rewritten as `let...else`
       --> syntax/parse.rs:439:5
        |
    439 | /     let name = match &abi.name {
    440 | |         Some(name) => name,
    441 | |         None => {
    442 | |             return Err(Error::new_spanned(
    ...   |
    446 | |         }
    447 | |     };
        | |______^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
    help: consider writing
        |
    439 ~     let Some(name) = &abi.name else {
    440 +             return Err(Error::new_spanned(
    441 +                 abi,
    442 +                 "ABI name is required, extern \"C++\" or extern \"Rust\"",
    443 +             ));
    444 +         };
        |

    warning: this could be rewritten as `let...else`
        --> syntax/parse.rs:1332:5
         |
    1332 | /     let len_expr = if let Expr::Lit(lit) = &ty.len {
    1333 | |         lit
    1334 | |     } else {
    1335 | |         let msg = "unsupported expression, array length must be an integer literal";
    1336 | |         return Err(Error::new_spanned(&ty.len, msg));
    1337 | |     };
         | |______^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
    help: consider writing
         |
    1332 ~     let Expr::Lit(len_expr) = &ty.len else {
    1333 +         let msg = "unsupported expression, array length must be an integer literal";
    1334 +         return Err(Error::new_spanned(&ty.len, msg));
    1335 +     };
         |

    warning: this could be rewritten as `let...else`
      --> syntax/report.rs:24:9
       |
    24 | /         let mut all_errors = match iter.next() {
    25 | |             Some(err) => err,
    26 | |             None => return Ok(()),
    27 | |         };
       | |__________^ help: consider writing: `let Some(mut all_errors) = iter.next() else { return Ok(()) };`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else

    warning: this could be rewritten as `let...else`
       --> syntax/types.rs:174:13
        |
    174 | /             let impl_key = match ty.impl_key() {
    175 | |                 Some(impl_key) => impl_key,
    176 | |                 None => continue,
    177 | |             };
        | |______________^ help: consider writing: `let Some(impl_key) = ty.impl_key() else { continue };`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
2024-07-08 20:48:29 -07:00
David Tolnay
3ea1e9f654
Raise required compiler to rust 1.67
Required by recent versions of the cc crate.

    error: package `cc v1.0.106` cannot be built because it requires rustc 1.67 or newer, while the currently active rustc version is 1.63.0
2024-07-08 20:38:37 -07:00
David Tolnay
afd4aa3f3d
Release 1.0.124 2024-06-14 10:55:05 -07:00
David Tolnay
ba1bd72c77
Lockfile update 2024-06-14 10:51:12 -07:00
David Tolnay
b9e6953e9c
Merge pull request #1355 from dtolnay/error
Provide no-std Error impl for cxx::Exception on Rust 1.81+
2024-06-14 10:47:14 -07:00
David Tolnay
2034697617
Invert core error cfg, until stable 2024-06-14 10:42:44 -07:00
David Tolnay
ec298b9fd7
Provide no-std Error impl for cxx::Exception 2024-06-14 10:35:20 -07:00
David Tolnay
3cf7826638
Resolve std_instead_of_core clippy restriction on std::error
warning: used import from `std` instead of `core`
       --> src/exception.rs:21:6
        |
    21  | impl std::error::Error for Exception {}
        |      ^^^ help: consider importing the item from `core`: `core`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#std_instead_of_core
    note: the lint level is defined here
       --> src/lib.rs:378:5
        |
    378 |     clippy::std_instead_of_core
        |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-06-14 10:35:20 -07:00
David Tolnay
dd532b6505
Ignore needless_maybe_sized clippy lint in generated code
warning: `?Sized` bound is ignored because of a `Sized` requirement
       --> tests/ffi/lib.rs:233:14
        |
    233 |         type Reference<'a>;
        |              ^^^^^^^^^^^^^^
        |
    note: `T` cannot be unsized because of the bound
       --> tests/ffi/lib.rs:233:9
        |
    233 |         type Reference<'a>;
        |         ^^^^^^^^^^^^^^^^^^^
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_maybe_sized
        = note: `#[warn(clippy::needless_maybe_sized)]` on by default
    help: change the bounds that require `Sized`, or remove the `?Sized` bound
        |
    233 -         type Reference<'a>;
    233 +
        |

    warning: `?Sized` bound is ignored because of a `Sized` requirement
       --> tests/ffi/lib.rs:262:14
        |
    262 |         type R;
        |              ^^
        |
    note: `T` cannot be unsized because of the bound
       --> tests/ffi/lib.rs:262:9
        |
    262 |         type R;
        |         ^^^^^^^
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_maybe_sized
    help: change the bounds that require `Sized`, or remove the `?Sized` bound
        |
    262 -         type R;
    262 +
        |
2024-06-14 10:34:48 -07:00
David Tolnay
c9b8d2140f
Bump Bazel build to rustc 1.79.0 2024-06-13 09:23:15 -07:00
David Tolnay
7f128d6fb7
Bazel rules_rust 0.46.0 2024-06-10 10:05:52 -07:00
David Tolnay
6b781e6862
Bazel rules_rust 0.45.1 2024-06-10 10:04:54 -07:00
David Tolnay
223bfef879
Bazel rules_rust 0.45.0 2024-06-10 10:04:27 -07:00
David Tolnay
1af206789c
Bazel rules_rust 0.44.0 2024-06-10 10:03:38 -07:00
David Tolnay
5ec0375b4f
Update bazel_skylib to 1.7.1 2024-06-10 10:01:49 -07:00
David Tolnay
5701ce002f
Regenerate bazel lockfile using bazel 7.2.0 2024-06-10 09:58:52 -07:00
David Tolnay
0ba442d442
Extend website's <meta name="description"> tag 2024-06-07 11:12:07 -07:00
David Tolnay
bdb44f4dc0
Release 1.0.123 2024-06-04 23:17:26 -07:00
David Tolnay
2af417ddf4
Lockfile update 2024-06-04 23:12:19 -07:00
David Tolnay
2d600a0e4b
Punctuate comment from PR 1353 2024-06-04 23:07:52 -07:00
David Tolnay
7735969361
Merge pull request #1353 from luqmana/char-if-unique
Give char the if_unique treatment too to handle possible collisions with [u]int8_t definitions.
2024-06-04 23:06:56 -07:00
Luqman Aden
d7748b3aee Give char the if_unique treatment too to handle possible collisions with [u]int8_t definitions. 2024-06-05 05:56:16 +00:00
David Tolnay
be9a4e4ec7
Fill in ignore reasons in all #[ignore] attributes 2024-06-01 22:13:40 -07:00
David Tolnay
1449ffbc41
Merge pull request #1351 from dtolnay/docsrs
Rely on docs.rs to define --cfg=docsrs by default
2024-05-18 21:37:24 -07:00
David Tolnay
81404f2f49
Rely on docs.rs to define --cfg=docsrs by default 2024-05-18 21:28:24 -07:00
David Tolnay
953009edfb
Merge pull request #1345 from dtolnay/bundled
Switch to bundled buck2 prelude
2024-05-09 11:25:34 -07:00
David Tolnay
0347fb7f15
Switch to bundled buck2 prelude 2024-05-09 11:18:03 -07:00
David Tolnay
4fd9c57b18
Ignore .global-cache produced by cargo vendor 2024-05-09 10:25:53 -07:00
David Tolnay
e361900b9d
Skip rerunning build script on library code changes 2024-05-08 21:54:32 -07:00
David Tolnay
1d9011ddaf
Suppress unexpected cfgs lint when built without build script 2024-05-07 16:29:06 -07:00
David Tolnay
462896c806
Release 1.0.122 2024-05-07 16:20:00 -07:00
David Tolnay
340fbaab00
Bump Bazel build to rustc 1.78.0 2024-05-07 16:17:47 -07:00
David Tolnay
f5ab199079
Lockfile update 2024-05-07 16:16:19 -07:00
David Tolnay
492f43d59e
Merge pull request #1344 from dtolnay/checkcfg
Resolve unexpected_cfgs warning
2024-05-07 15:31:04 -07:00
David Tolnay
cbc47f07e2
Resolve unexpected_cfgs warning
warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header`
       --> gen/build/src/gen/write.rs:333:15
        |
    333 |         #[cfg(feature = "experimental-enum-variants-from-header")]
        |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: expected values for `feature` are: `experimental-async-fn`, `parallel`
        = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
        = note: `#[warn(unexpected_cfgs)]` on by default

    warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header`
       --> gen/build/src/gen/write.rs:393:15
        |
    393 |         #[cfg(feature = "experimental-enum-variants-from-header")]
        |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: expected values for `feature` are: `experimental-async-fn`, `parallel`
        = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header`
       --> gen/build/src/gen/write.rs:415:15
        |
    415 |         #[cfg(feature = "experimental-enum-variants-from-header")]
        |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: expected values for `feature` are: `experimental-async-fn`, `parallel`
        = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header`
       --> gen/build/src/syntax/attrs.rs:147:21
        |
    147 |             && cfg!(feature = "experimental-enum-variants-from-header")
        |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: expected values for `feature` are: `experimental-async-fn`, `parallel`
        = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header`
       --> gen/build/src/syntax/discriminant.rs:182:11
        |
    182 |     #[cfg(feature = "experimental-enum-variants-from-header")]
        |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: expected values for `feature` are: `experimental-async-fn`, `parallel`
        = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header`
       --> gen/build/src/syntax/tokens.rs:296:19
        |
    296 |             #[cfg(feature = "experimental-enum-variants-from-header")]
        |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: expected values for `feature` are: `experimental-async-fn`, `parallel`
        = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header`
      --> gen/build/src/syntax/types.rs:95:31
       |
    95 |                         #[cfg(feature = "experimental-enum-variants-from-header")]
       |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = note: expected values for `feature` are: `experimental-async-fn`, `parallel`
       = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml`
       = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header`
       --> gen/build/src/syntax/mod.rs:146:11
        |
    146 |     #[cfg(feature = "experimental-enum-variants-from-header")]
        |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: expected values for `feature` are: `experimental-async-fn`, `parallel`
        = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header`
       --> gen/lib/src/gen/write.rs:333:15
        |
    333 |         #[cfg(feature = "experimental-enum-variants-from-header")]
        |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the condition
        |
        = note: no expected values for `feature`
        = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
        = note: `#[warn(unexpected_cfgs)]` on by default

    warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header`
       --> gen/lib/src/gen/write.rs:393:15
        |
    393 |         #[cfg(feature = "experimental-enum-variants-from-header")]
        |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the condition
        |
        = note: no expected values for `feature`
        = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header`
       --> gen/lib/src/gen/write.rs:415:15
        |
    415 |         #[cfg(feature = "experimental-enum-variants-from-header")]
        |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the condition
        |
        = note: no expected values for `feature`
        = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header`
       --> gen/lib/src/syntax/attrs.rs:147:21
        |
    147 |             && cfg!(feature = "experimental-enum-variants-from-header")
        |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the condition
        |
        = note: no expected values for `feature`
        = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header`
       --> gen/lib/src/syntax/discriminant.rs:182:11
        |
    182 |     #[cfg(feature = "experimental-enum-variants-from-header")]
        |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the condition
        |
        = note: no expected values for `feature`
        = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition value: `experimental-async-fn`
       --> gen/lib/src/syntax/parse.rs:565:52
        |
    565 |     if foreign_fn.sig.asyncness.is_some() && !cfg!(feature = "experimental-async-fn") {
        |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the condition
        |
        = note: no expected values for `feature`
        = help: consider adding `experimental-async-fn` as a feature in `Cargo.toml`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header`
       --> gen/lib/src/syntax/tokens.rs:296:19
        |
    296 |             #[cfg(feature = "experimental-enum-variants-from-header")]
        |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the condition
        |
        = note: no expected values for `feature`
        = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header`
      --> gen/lib/src/syntax/types.rs:95:31
       |
    95 |                         #[cfg(feature = "experimental-enum-variants-from-header")]
       |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the condition
       |
       = note: no expected values for `feature`
       = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml`
       = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header`
       --> gen/lib/src/syntax/mod.rs:146:11
        |
    146 |     #[cfg(feature = "experimental-enum-variants-from-header")]
        |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the condition
        |
        = note: no expected values for `feature`
        = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header`
       --> gen/cmd/src/gen/write.rs:333:15
        |
    333 |         #[cfg(feature = "experimental-enum-variants-from-header")]
        |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: expected values for `feature` are: `experimental-async-fn`
        = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
        = note: `#[warn(unexpected_cfgs)]` on by default

    warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header`
       --> gen/cmd/src/gen/write.rs:393:15
        |
    393 |         #[cfg(feature = "experimental-enum-variants-from-header")]
        |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: expected values for `feature` are: `experimental-async-fn`
        = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header`
       --> gen/cmd/src/gen/write.rs:415:15
        |
    415 |         #[cfg(feature = "experimental-enum-variants-from-header")]
        |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: expected values for `feature` are: `experimental-async-fn`
        = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header`
       --> gen/cmd/src/syntax/attrs.rs:147:21
        |
    147 |             && cfg!(feature = "experimental-enum-variants-from-header")
        |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: expected values for `feature` are: `experimental-async-fn`
        = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header`
       --> gen/cmd/src/syntax/discriminant.rs:182:11
        |
    182 |     #[cfg(feature = "experimental-enum-variants-from-header")]
        |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: expected values for `feature` are: `experimental-async-fn`
        = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header`
       --> gen/cmd/src/syntax/tokens.rs:296:19
        |
    296 |             #[cfg(feature = "experimental-enum-variants-from-header")]
        |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: expected values for `feature` are: `experimental-async-fn`
        = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header`
      --> gen/cmd/src/syntax/types.rs:95:31
       |
    95 |                         #[cfg(feature = "experimental-enum-variants-from-header")]
       |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
       = note: expected values for `feature` are: `experimental-async-fn`
       = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml`
       = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition value: `experimental-enum-variants-from-header`
       --> gen/cmd/src/syntax/mod.rs:146:11
        |
    146 |     #[cfg(feature = "experimental-enum-variants-from-header")]
        |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: expected values for `feature` are: `experimental-async-fn`
        = help: consider adding `experimental-enum-variants-from-header` as a feature in `Cargo.toml`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `trybuild`
     --> tests/ffi/build.rs:4:13
      |
    4 |     if cfg!(trybuild) {
      |             ^^^^^^^^
      |
      = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
      = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(trybuild)");` to the top of the `build.rs`
      = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
      = note: `#[warn(unexpected_cfgs)]` on by default

    warning: unexpected `cfg` condition name: `deny_warnings`
      --> tests/ffi/build.rs:13:37
       |
    13 |     build.warnings_into_errors(cfg!(deny_warnings));
       |                                     ^^^^^^^^^^^^^
       |
       = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(deny_warnings)");` to the top of the `build.rs`
       = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `deny_warnings`
      --> build.rs:14:36
       |
    14 |         .warnings_into_errors(cfg!(deny_warnings))
       |                                    ^^^^^^^^^^^^^
       |
       = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
       = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(deny_warnings)");` to the top of the `build.rs`
       = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
       = note: `#[warn(unexpected_cfgs)]` on by default

    warning: unexpected `cfg` condition name: `doc_cfg`
       --> src/lib.rs:368:13
        |
    368 | #![cfg_attr(doc_cfg, feature(doc_cfg))]
        |             ^^^^^^^
        |
        = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
        = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
        = note: `#[warn(unexpected_cfgs)]` on by default

    warning: unexpected `cfg` condition name: `built_with_cargo`
       --> src/lib.rs:409:7
        |
    409 | #[cfg(built_with_cargo)]
        |       ^^^^^^^^^^^^^^^^
        |
        = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(built_with_cargo)");` to the top of the `build.rs`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `cxx_experimental_no_alloc`
       --> src/lib.rs:433:34
        |
    433 | #[cfg(not(any(feature = "alloc", cxx_experimental_no_alloc)))]
        |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(cxx_experimental_no_alloc)");` to the top of the `build.rs`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `compile_error_if_alloc`
       --> src/lib.rs:438:11
        |
    438 | #[cfg(all(compile_error_if_alloc, feature = "alloc"))]
        |           ^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(compile_error_if_alloc)");` to the top of the `build.rs`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `compile_error_if_std`
       --> src/lib.rs:443:11
        |
    443 | #[cfg(all(compile_error_if_std, feature = "std"))]
        |           ^^^^^^^^^^^^^^^^^^^^
        |
        = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(compile_error_if_std)");` to the top of the `build.rs`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `doc_cfg`
       --> src/lib.rs:480:12
        |
    480 | #[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))]
        |            ^^^^^^^
        |
        = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `no_core_ffi_c_char`
      --> src/c_char.rs:11:11
       |
    11 | #[cfg(not(no_core_ffi_c_char))]
       |           ^^^^^^^^^^^^^^^^^^
       |
       = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(no_core_ffi_c_char)");` to the top of the `build.rs`
       = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `no_core_ffi_c_char`
      --> src/c_char.rs:16:7
       |
    16 | #[cfg(no_core_ffi_c_char)]
       |       ^^^^^^^^^^^^^^^^^^
       |
       = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(no_core_ffi_c_char)");` to the top of the `build.rs`
       = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `doc_cfg`
     --> src/exception.rs:7:12
      |
    7 | #[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))]
      |            ^^^^^^^
      |
      = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs`
      = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `doc_cfg`
      --> src/exception.rs:20:12
       |
    20 | #[cfg_attr(doc_cfg, doc(cfg(feature = "std")))]
       |            ^^^^^^^
       |
       = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs`
       = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `doc_cfg`
       --> src/extern_type.rs:220:16
        |
    220 |     #[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))]
        |                ^^^^^^^
        |
        = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `doc_cfg`
       --> src/cxx_string.rs:151:16
        |
    151 |     #[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))]
        |                ^^^^^^^
        |
        = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(doc_cfg)");` to the top of the `build.rs`
        = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration

    warning: unexpected `cfg` condition name: `skip_ui_tests`
     --> tests/compiletest.rs:3:12
      |
    3 | #[cfg_attr(skip_ui_tests, ignore)]
      |            ^^^^^^^^^^^^^
      |
      = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, `windows`
      = help: consider using a Cargo feature instead or adding `println!("cargo::rustc-check-cfg=cfg(skip_ui_tests)");` to the top of the `build.rs`
      = note: see <https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-check-cfg> for more information about checking conditional configuration
      = note: `#[warn(unexpected_cfgs)]` on by default
2024-05-07 15:27:52 -07:00
David Tolnay
b0f010fae6
Resolve collapsible_match clippy lint
warning: this `if let` can be collapsed into the outer `if let`
        --> gen/src/write.rs:1117:13
         |
    1117 | /             if let Type::RustBox(_) | Type::UniquePtr(_) | Type::Str(_) | Type::SliceRef(_) = ret {
    1118 | |                 write!(out, ")");
    1119 | |             }
         | |_____________^
         |
    help: the outer pattern can be modified to include the inner pattern
        --> gen/src/write.rs:1116:21
         |
    1116 |         if let Some(ret) = &sig.ret {
         |                     ^^^ replace this binding
    1117 |             if let Type::RustBox(_) | Type::UniquePtr(_) | Type::Str(_) | Type::SliceRef(_) = ret {
         |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ with this pattern
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match
         = note: `#[warn(clippy::collapsible_match)]` on by default
2024-05-03 23:14:38 -04:00
David Tolnay
d5dd97693c
Raise minimum tested compiler to 1.63
Required by the `cc` crate.
2024-04-20 20:56:10 -07:00
David Tolnay
362f3f9096
Bazel rules_rust 0.42.1 2024-04-16 10:59:50 -07:00
David Tolnay
084b47d7fa
Release 1.0.121 2024-04-08 12:46:46 -07:00
David Tolnay
551141b58a
Lockfile update 2024-04-08 12:46:06 -07:00
David Tolnay
5be78d9b6f
Touch up CfgEvaluator doc comments 2024-04-08 12:43:57 -07:00
David Tolnay
38b5842aa3
Merge pull request #1334 from ahayzen-kdab/cxx-gen-allow-for-cfg-eval
gen: allow for cfg_evaluator to be set in cxx_gen
2024-04-08 12:43:47 -07:00