Skip to content

Fix compiler warning during building/testing. #1249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 18, 2022

Conversation

tnull
Copy link
Contributor

@tnull tnull commented Jan 18, 2022

This PR fixes the following warnings I got when running cargo build/cargo test:

warning: unused return value of `transmute_copy` that must be used
   --> lightning-invoice/src/lib.rs:120:11
    |
120 |     unsafe { core::mem::transmute_copy::<SystemTime, [u8; 16]>(&SystemTime::UNIX_EPOCH); }
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(unused_must_use)]` on by default

...

warning: lint `broken_intra_doc_links` has been renamed to `rustdoc::broken_intra_doc_links`
  --> /Users/ero/workspace/rust-lightning/lightning/src/lib.rs:23:9
   |
23 | #![deny(broken_intra_doc_links)]
   |         ^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `rustdoc::broken_intra_doc_links`
   |
   = note: `#[warn(renamed_and_removed_lints)]` on by default

...

warning: lint `broken_intra_doc_links` has been renamed to `rustdoc::broken_intra_doc_links`
 --> /Users/ero/workspace/rust-lightning/lightning-background-processor/src/lib.rs:5:9
  |
5 | #![deny(broken_intra_doc_links)]
  |         ^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `rustdoc::broken_intra_doc_links`
  |
  = note: `#[warn(renamed_and_removed_lints)]` on by default

...

warning: lint `broken_intra_doc_links` has been renamed to `rustdoc::broken_intra_doc_links`
 --> /Users/ero/workspace/rust-lightning/lightning-invoice/src/lib.rs:6:9
  |
6 | #![deny(broken_intra_doc_links)]
  |         ^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `rustdoc::broken_intra_doc_links`
  |
  = note: `#[warn(renamed_and_removed_lints)]` on by default

...

warning: lint `broken_intra_doc_links` has been renamed to `rustdoc::broken_intra_doc_links`
 --> /Users/ero/workspace/rust-lightning/lightning-persister/src/lib.rs:3:9
  |
3 | #![deny(broken_intra_doc_links)]
  |         ^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `rustdoc::broken_intra_doc_links`
  |
  = note: `#[warn(renamed_and_removed_lints)]` on by default

...

warning: lint `broken_intra_doc_links` has been renamed to `rustdoc::broken_intra_doc_links`
  --> /Users/ero/workspace/rust-lightning/lightning-net-tokio/src/lib.rs:69:9
   |
69 | #![deny(broken_intra_doc_links)]
   |         ^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `rustdoc::broken_intra_doc_links`
   |
   = note: `#[warn(renamed_and_removed_lints)]` on by default

...

warning: lint `broken_intra_doc_links` has been renamed to `rustdoc::broken_intra_doc_links`
  --> /Users/ero/workspace/rust-lightning/lightning-block-sync/src/lib.rs:16:9
   |
16 | #![deny(broken_intra_doc_links)]
   |         ^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `rustdoc::broken_intra_doc_links`
   |
   = note: `#[warn(renamed_and_removed_lints)]` on by default

@tnull
Copy link
Contributor Author

tnull commented Jan 18, 2022

Whoops, the changes don't seem to be compatible with the minimum supported version. So feel free to close this.

@TheBlueMatt
Copy link
Collaborator

No reason we can't take just the transmute fix.

@tnull tnull force-pushed the fix_compile_warnings branch from 85a65c0 to 5490366 Compare January 18, 2022 13:45
@tnull
Copy link
Contributor Author

tnull commented Jan 18, 2022

True, 5490366 fixes only this warning.

@codecov-commenter
Copy link

Codecov Report

Merging #1249 (5490366) into main (34cdca9) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1249      +/-   ##
==========================================
- Coverage   90.41%   90.41%   -0.01%     
==========================================
  Files          70       70              
  Lines       38087    38087              
==========================================
- Hits        34437    34436       -1     
- Misses       3650     3651       +1     
Impacted Files Coverage Δ
lightning-invoice/src/lib.rs 87.50% <0.00%> (ø)
lightning/src/ln/functional_tests.rs 97.28% <0.00%> (-0.02%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 34cdca9...5490366. Read the comment docs.

@valentinewallace valentinewallace merged commit 7b6a7bb into lightningdevkit:main Jan 18, 2022
@tnull tnull deleted the fix_compile_warnings branch March 9, 2022 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants