Commit Graph

2164 Commits

Author SHA1 Message Date
David Tolnay
6aeaca628d
Disable lint jobs on pull requests 2021-03-22 19:43:08 -07:00
David Tolnay
f3e52f29f0
Merge pull request #751 from dtolnay/argv
Rewrite raw ptr book page with example involving argc/argv
2021-03-22 19:43:00 -07:00
David Tolnay
5f04fda69d
Merge pull request #750 from dtolnay/pointers
Pointer to pointer, pointer to reference, reference to pointer
2021-03-22 19:41:13 -07:00
David Tolnay
1082db6669
Merge pull request #748 from dtolnay/fnptr-ptr
Detect raw pointer argument inside of function pointer
2021-03-22 19:41:05 -07:00
David Tolnay
cfdcede8f0
Rewrite raw ptr book page with example involving argc/argv 2021-03-22 19:29:12 -07:00
David Tolnay
d2d225c10c
East const to make nested pointer types work 2021-03-22 19:23:51 -07:00
David Tolnay
bd313d5e92
Add dedicated error message for ptr to ptr and ref to ptr 2021-03-22 19:23:51 -07:00
David Tolnay
2a2264c483
Add dedicated error message for pointer to reference 2021-03-22 19:23:50 -07:00
David Tolnay
d91d2a8d4a
Relax restriction on target types of pointer 2021-03-22 19:23:49 -07:00
David Tolnay
ff0ecfb4e1
Merge pull request #747 from dtolnay/rawptr-doc
Raw pointer doc tweaks
2021-03-22 19:22:50 -07:00
David Tolnay
aba7ab1bb0
Detect pointer argument inside of function pointer 2021-03-22 19:18:18 -07:00
David Tolnay
b8682334c8
Add failing ui test showing unsafety of fn ptr not enforced 2021-03-22 19:18:18 -07:00
David Tolnay
d6c1cb21f4
Merge pull request #746 from dtolnay/pointers
Defer unsafety check for fn with ptr argument
2021-03-22 19:18:08 -07:00
David Tolnay
75b487285f
Add raw pointer to builtin types list in crate-level rustdoc 2021-03-22 19:13:53 -07:00
David Tolnay
bbb22b2b4e
Fix order of Rust version of T* vs const T* 2021-03-22 19:13:52 -07:00
David Tolnay
abe4ca47e3
Document restriction on passing raw ptr as argument 2021-03-22 19:13:52 -07:00
David Tolnay
420de87130
Register raw ptrs page in book table of contents
Otherwise the page does not even get rendered by mdbook.
2021-03-22 19:13:52 -07:00
David Tolnay
b47185f7e3
Order raw ptrs just above function ptrs in bindings list 2021-03-22 19:13:52 -07:00
David Tolnay
285779635a
Defer unsafety check for fn with ptr argument
That error does not need to be fatal at parse time, because the parser
still understands exactly what was written. We accumulate and emit it
alongside other type errors that might be present in the same function
signature.
2021-03-22 19:12:06 -07:00
David Tolnay
a3ef34f95b
Merge pull request #745 from dtolnay/pointers
Touch up PR 689
2021-03-22 19:11:58 -07:00
David Tolnay
b70310b760
Remove unneeded pointer parse check
A pointer with neither `const` nor `mut` would not have parsed as a
syn::Type::Ptr.
2021-03-22 19:06:08 -07:00
David Tolnay
beba43d024
Touch up PR 689 imports 2021-03-22 19:06:07 -07:00
David Tolnay
94909e0a6e
Remove duplicate unsafety parse from PR 689 2021-03-22 19:06:07 -07:00
David Tolnay
824d691923
Format PR 689 with clang-format 2021-03-22 19:06:06 -07:00
David Tolnay
7bb11c30ce
Sort pointer ffi test functions consistently 2021-03-22 19:06:05 -07:00
David Tolnay
d0af9d320e
Disable missing Unsafety doc comment clippy lint for test suite 2021-03-22 19:06:05 -07:00
David Tolnay
274c06f495
Divide up pointer UI tests 2021-03-22 19:06:04 -07:00
David Tolnay
7c3197eba8
Format PR 689 with rustfmt 2021-03-22 19:06:02 -07:00
David Tolnay
9fc8138823
Merge pull request #689 from adetaylor/pointers
Support raw pointers in cxx::bridge.
2021-03-22 19:04:37 -07:00
David Tolnay
de01edf706
Update C++ formatting to clang-format 11 2021-03-22 15:00:59 -07:00
David Tolnay
5d12f1d4c5
Format PR 714 with clang-format 10
This change in formatting seems to be due to https://reviews.llvm.org/D68695.
2021-03-22 14:59:33 -07:00
David Tolnay
516bb068e4
Release 1.0.33 2021-03-18 14:11:25 -07:00
David Tolnay
b11e8dd6d5
Lockfile update 2021-03-18 14:09:44 -07:00
David Tolnay
2e43b51227
Consistently use 'other: &Self' in homogeneous comparison impls 2021-03-18 13:35:38 -07:00
David Tolnay
94e205403d
Delete CxxString heterogeneous PartialOrd impls 2021-03-18 13:33:57 -07:00
David Tolnay
05db2fbc9f
Touch up PR 743 2021-03-18 13:33:27 -07:00
David Tolnay
389887843c
Merge pull request 743 from b05902132/cxx_string_traits 2021-03-18 13:27:59 -07:00
b05902132
7b783f92de implment Ord, PartialOrd and Hash for CxxString. 2021-03-19 02:27:45 +08:00
David Tolnay
3dafaede93
Resolve inconsistent_struct_constructor style lint
error: inconsistent struct constructor
       --> gen/cmd/src/app.rs:95:5
        |
    95  | /     Opt {
    96  | |         input,
    97  | |         cxx_impl_annotations,
    98  | |         header,
    99  | |         include,
    100 | |         outputs,
    101 | |     }
        | |_____^ help: try: `Opt { input, header, cxx_impl_annotations, include, outputs }`
        |
        = note: `-D clippy::inconsistent-struct-constructor` implied by `-D clippy::all`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inconsistent_struct_constructor
2021-02-25 20:42:30 -08:00
David Tolnay
e5bb345e8c
Merge pull request #723 from dtolnay/mangle
Document the possible arrangements of mangled symbols
2021-02-17 16:20:08 -08:00
Adrian Taylor
57832124b4 Merge fix. 2021-02-17 16:11:08 -08:00
David Tolnay
6c39d4b9c8
Document the arrangements of preprocessor variables 2021-02-17 15:56:07 -08:00
David Tolnay
415f23255e
Document the possible arrangements of mangled symbols 2021-02-17 15:49:39 -08:00
adetaylor
f67287db6f
Merge branch 'master' into pointers 2021-02-17 15:32:06 -08:00
David Tolnay
72d47c95a0
Release 1.0.32 2021-02-16 13:31:41 -08:00
David Tolnay
f9b5fe4740
Lockfile update 2021-02-16 13:26:18 -08:00
David Tolnay
6e3a8639fd
Hide Id associated types from ExternType impl rustdocs
This eliminates a quite large amount of unhelpful noise from https://docs.rs/cxx/1/cxx/trait.ExternType.html.
2021-02-16 13:21:50 -08:00
David Tolnay
efd852d915
Merge pull request #717 from khardix/master
Include license files in flags crate
2021-02-15 09:24:03 -08:00
Jan Staněk
de4e10cc7a
Include license files in flags crate
Other crates in this repo already include them,
and it is a requirement (or at least a strong suggestion)
for packaging it into Fedora.
2021-02-15 11:30:55 +01:00
David Tolnay
d3cb1148da
Merge pull request #714 from dtolnay/rvalue-assign
Disallow assignment to rvalue
2021-02-11 23:24:27 -08:00