Commit Graph

792 Commits

Author SHA1 Message Date
David Tolnay
ac65507e78
Add doxygen option to cxx_build::CFG 2022-11-18 01:15:23 -08:00
David Tolnay
a628611897
Add option to emit C++ comments as /// 2022-11-18 01:14:55 -08:00
David Tolnay
159b85b904
Make types in CFG documentation show better in dark theme 2022-11-18 00:34:20 -08:00
David Tolnay
cdd735afb3
Move Cfg destructuring out of the conditional if-let part 2022-11-18 00:21:55 -08:00
David Tolnay
f908cfa123
Exhaustively handle fields in Drop for Cfg
This way it's no longer possible to forget to update this code when
adding new configuration fields into CFG.
2022-11-18 00:19:50 -08:00
David Tolnay
75c0454f1d
Extract a function for writing docs in generated C++ 2022-11-18 00:04:55 -08:00
David Tolnay
544b350af6
Release 1.0.81 2022-11-08 01:00:47 -08:00
David Tolnay
c7060d4036
Release 1.0.80 2022-10-21 09:33:41 -07:00
David Tolnay
8b7643b933
Mark rust::detail::Fail constructor noexcept 2022-10-15 15:32:04 -07:00
David Tolnay
97a46f93b6
Release 1.0.79 2022-10-15 15:15:47 -07:00
David Tolnay
6f257d81f4
Allow trycatch to call Fail using std::string 2022-10-15 15:00:44 -07:00
David Tolnay
d1afb26f4b
Factor out the Fail lambda from all trycatch calls 2022-10-15 14:17:26 -07:00
David Tolnay
5ab0a485cc
Mark cxxbridge1$exception noexcept
This function is implemented in Rust using #[no_mangle] extern "C", and
it cannot throw a C++ exception.
2022-10-15 14:14:12 -07:00
David Tolnay
202a02917b
Move namespace rust::repr above namespace rust::detail
I'd like to use rust::repr::PtrLen in the implementation of a
rust::detail::Fail functor.
2022-10-15 13:57:49 -07:00
David Tolnay
41f662f02e
Deduplicate rust::repr namespace begin/end 2022-10-15 13:57:00 -07:00
David Tolnay
1b33345a6e
Move rust::repr out of anonymous namespace
This will be needed to use PtrLen in the implementation of a Fail
functor in cxx.cc.
2022-10-15 13:54:08 -07:00
Ryan Lopopolo
845f66a245
Update codespan-reporting to build with -Zminimal-versions
`codespan-reporting` 0.11.0 does not build with `-Zminimal-versions` because it has a constraint
 on `termcolor = 1` whereas it depends on the `Copy` trait being implemented on types in `termcolor`
which were not added until 1.0.4.

See:

- https://github.com/brendanzab/codespan/issues/322
- e99c867339
2022-10-13 21:24:43 -07:00
David Tolnay
d2a7e0b244
Release 1.0.78 2022-09-28 16:45:12 -07:00
David Tolnay
fae939d974
Update argument parser to clap 4 2022-09-28 16:38:15 -07:00
David Tolnay
3e3c664c84
Sort cxxbridge flags in alphabetical order 2022-09-28 16:03:09 -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
072fd4f0a3
Allow Rust vector of array of trivially relocatable type 2022-09-19 10:25:31 -07:00
David Tolnay
0293ff50cf
Release 1.0.75 2022-09-02 14:33:59 -07:00
David Tolnay
a1e1983740
Add build-dependencies keyword for cxx-build
Notably the cc crate uses this keyword.
2022-08-30 22:53:44 -07:00
David Tolnay
02e9a4795d
Release 1.0.74 2022-08-30 15:53:14 -07:00
David Tolnay
6d78b8ed2e
Fix Windows "access is denied" removing a dangling symlink 2022-08-30 15:32:27 -07:00
David Tolnay
c4ee13ebc3
Fix Windows "filename, directory name, or volume label syntax is incorrect" 2022-08-30 14:21:44 -07:00
David Tolnay
a6608495d1
Release 1.0.73 2022-08-01 17:10:57 -07:00
David Tolnay
db68a70fb1
Add categories to crates.io metadata 2022-08-01 00:06:45 -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
2e1527c834
Release 1.0.71 2022-07-06 07:19:36 -07:00
David Tolnay
ac89872316
Release 1.0.70 2022-07-04 09:56:31 -07:00
David Tolnay
d8892fecd3
Ignore explicit_auto_deref clippy lint
error: deref which would be done by auto-deref
      --> gen/build/src/intern.rs:23:27
       |
    23 |         Some(interned) => *interned,
       |                           ^^^^^^^^^ help: try this: `interned`
       |
       = note: `-D clippy::explicit-auto-deref` implied by `-D clippy::all`
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
2022-07-01 20:01:48 -07:00
David Tolnay
5d50b94280
Release 1.0.69 2022-06-17 23:56:34 -07:00
David Tolnay
2a606a3e42
Update to clap 3.2 2022-06-17 23:40:34 -07:00
David Tolnay
5ceda9a122
Update oldest allowed compiler for cxxbridge-cmd to 1.56.1 2022-06-17 22:31:31 -07:00
David Tolnay
1526d5bad2
Ignore significant_drop_in_scrutinee clippy lint
error: temporary with significant drop in match scrutinee
      --> gen/build/src/intern.rs:22:26
       |
    22 |     InternedString(match set.get(s) {
       |                          ^^^^^^^^^^
       |
       = note: `-D clippy::significant-drop-in-scrutinee` implied by `-D clippy::all`
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#significant_drop_in_scrutinee
2022-06-06 23:50:12 -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
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
993353fa28
Recognize C array of relocatable element type in struct as relocatable 2022-03-08 11:54:39 -08:00
David Tolnay
c53e4bc81b
Release 1.0.65 2022-02-16 19:46:45 -08:00
David Tolnay
feec8a1762
Resolve clap deprecations
warning: use of deprecated struct `clap::App`: Replaced with `Command`
     --> gen/cmd/src/app.rs:9:12
      |
    9 | use clap::{App, AppSettings, Arg};
      |            ^^^
      |
      = note: `#[warn(deprecated)]` on by default

    warning: use of deprecated struct `clap::App`: Replaced with `Command`
      --> gen/cmd/src/app.rs:36:13
       |
    36 | fn app() -> App<'static> {
       |             ^^^

    warning: use of deprecated struct `clap::App`: Replaced with `Command`
      --> gen/cmd/src/app.rs:37:19
       |
    37 |     let mut app = App::new("cxxbridge")
       |                   ^^^

    warning: use of deprecated variant `clap::AppSettings::NextLineHelp`: Replaced with `Command::next_line_help` and `Command::is_next_line_help_set`
      --> gen/cmd/src/app.rs:40:31
       |
    40 |         .setting(AppSettings::NextLineHelp)
       |                               ^^^^^^^^^^^^
2022-02-16 19:20:34 -08:00
David Tolnay
19ed7f8808
Pull in clap 3.1.0 2022-02-16 19:19:23 -08:00
David Tolnay
26137f95a2
Release 1.0.64 2022-01-30 13:03:12 -08:00
David Tolnay
09e8df598f
Add workaround for evaluating cfg(debug_assertions) 2022-01-30 12:49:15 -08:00