Skip to content

Tutorial example generates lots of noisy Rust warnings #1174

Open
@dabrahams

Description

@dabrahams
Finished compiling "playpen.dl" in 0.23s
libunwind: malformed __unwind_info at 0x184576CA8 bad second level page
warning: unused return value of `CString::from_raw` that must be used
    --> differential_datalog/src/api/c_api.rs:1043:5
     |
1043 |     CString::from_raw(s);
     |     ^^^^^^^^^^^^^^^^^^^^
     |
     = note: call `drop(from_raw(ptr))` if you intend to drop the `CString`
     = note: `#[warn(unused_must_use)]` on by default
help: use `let _ = ...` to ignore the resulting value
     |
1043 |     let _ = CString::from_raw(s);
     |     +++++++

warning: unused return value of `Box::<T>::from_raw` that must be used
    --> differential_datalog/src/api/c_api.rs:1137:9
     |
1137 |         Box::from_raw(delta);
     |         ^^^^^^^^^^^^^^^^^^^^
     |
     = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box`
help: use `let _ = ...` to ignore the resulting value
     |
1137 |         let _ = Box::from_raw(delta);
     |         +++++++

warning: unused return value of `Box::<T>::from_raw` that must be used
    --> differential_datalog/src/record/mod.rs:1177:5
     |
1177 |     Box::from_raw(rec);
     |     ^^^^^^^^^^^^^^^^^^
     |
     = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box`
help: use `let _ = ...` to ignore the resulting value
     |
1177 |     let _ = Box::from_raw(rec);
     |     +++++++

warning: `differential_datalog` (lib) generated 3 warnings
libunwind: malformed __unwind_info at 0x184576CA8 bad second level page
warning: unused return value of `Box::<T>::from_raw` that must be used
   --> types/ddlog_bigint/ddlog_bigint.rs:661:9
    |
661 |         Box::from_raw(x);
    |         ^^^^^^^^^^^^^^^^
    |
    = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box`
    = note: `#[warn(unused_must_use)]` on by default
help: use `let _ = ...` to ignore the resulting value
    |
661 |         let _ = Box::from_raw(x);
    |         +++++++

warning: unused return value of `Box::<T>::from_raw` that must be used
   --> types/ddlog_bigint/ddlog_bigint.rs:680:9
    |
680 |         Box::from_raw(x);
    |         ^^^^^^^^^^^^^^^^
    |
    = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box`
help: use `let _ = ...` to ignore the resulting value
    |
680 |         let _ = Box::from_raw(x);
    |         +++++++

warning: `ddlog_bigint` (lib) generated 2 warnings
    Finished release [optimized] target(s) in 0.11s
warning: the following packages contain code that will be rejected by a future version of Rust: nom v4.2.3
note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions