diff options
| author | Robin Kruppe <robin.kruppe@gmail.com> | 2018-02-14 23:11:29 +0100 |
|---|---|---|
| committer | Robin Kruppe <robin.kruppe@gmail.com> | 2018-02-15 19:49:50 +0100 |
| commit | 051ea5cc9bac00c7f588b4eae72b8a382d8ceb68 (patch) | |
| tree | a3011f11a8464e418db327a0513ef8dbaece16fc /src/test | |
| parent | 9d493c897b4382dc145b9448b3fafdfbbaecf528 (diff) | |
| download | rust-051ea5cc9bac00c7f588b4eae72b8a382d8ceb68.tar.gz rust-051ea5cc9bac00c7f588b4eae72b8a382d8ceb68.zip | |
[improper_ctypes] Don't suggest raw pointers when encountering trait objects
It's unhelpful since raw pointers to trait objects are also FFI-unsafe and casting to a thin raw pointer loses the vtable. There are working solutions that _involve_ raw pointers but they're too complex to explain in one line and have serious trade offs.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/lint-ctypes.stderr | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/test/ui/lint-ctypes.stderr b/src/test/ui/lint-ctypes.stderr index 2abf08d55f7..748c311055f 100644 --- a/src/test/ui/lint-ctypes.stderr +++ b/src/test/ui/lint-ctypes.stderr @@ -78,8 +78,6 @@ error: `extern` block uses type `std::clone::Clone` which is not FFI-safe: trait | 62 | pub fn trait_type(p: &Clone); //~ ERROR uses type `std::clone::Clone` | ^^^^^^ - | - = help: consider using a raw pointer instead error: `extern` block uses type `(i32, i32)` which is not FFI-safe: tuples have unspecified layout --> $DIR/lint-ctypes.rs:63:26 |
