Skip to content
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

Error running cargo fix #5775

Closed
Ethan826 opened this issue Jul 23, 2018 · 3 comments
Closed

Error running cargo fix #5775

Ethan826 opened this issue Jul 23, 2018 · 3 comments

Comments

@Ethan826
Copy link

I tried this: cargo +nightly fix --prepare-for 2018 --all-targets --all-features --allow-dirty

I expected to see this happen: for the cargo fix utility to fix all my code and prepare me for the wonderful future of Rust 2018.

Instead, this happened: I got the following output (pasting the extremely long output of the command, as requested by the compiler message):

    Checking risk v0.1.0 (file:///media/ethan/679fbae4-4c9b-4685-b694-393caada26d1/canceriq/risk-service)                                                                    
warning: error applying suggestions to `src/risk/gail/lookup/mod.rs`

The full error message was:

> Cannot replace slice of data that was already replacedThis likely indicates a bug in either rustc or cargo itself,
and we would appreciate a bug report! You're likely to see 
a number of compiler warnings after this message which cargo
attempted to fix but failed. If you could open an issue at
https://github.com/rust-lang/cargo/issues
quoting the full output of this command we'd be very appreciative!

warning: failed to automatically apply fixes suggested by rustc to crate `risk`

after fixes were automatically applied the compiler reported errors within these files:

  * <__lazy_static_internal macros>
  * src/risk/claus/claus_data.rs
  * src/risk/gail/input/mod.rs
  * src/risk/gail/lookup/mod.rs
  * src/risk/gail/result.rs
  * src/risk/uspstf/uspstf_counseling/manchester.rs
  * src/risk/uspstf/uspstf_counseling/ontario.rs

This likely indicates a bug in either rustc or cargo itself,
and we would appreciate a bug report! You're likely to see 
a number of compiler warnings after this message which cargo
attempted to fix but failed. If you could open an issue at
https://github.com/rust-lang/cargo/issues
quoting the full output of this command we'd be very appreciative!

warning: `...` range patterns are deprecated
  --> src/risk/claus/claus_data.rs:75:11
   |
75 |         29...38 => Some(interpolate(
   |           ^^^ help: use `..=` for an inclusive range
   |
note: lint level defined here
  --> src/lib.rs:14:9
   |
14 | #![warn(rust_2018_idioms)]
   |         ^^^^^^^^^^^^^^^^
   = note: #[warn(ellipsis_inclusive_range_patterns)] implied by #[warn(rust_2018_idioms)]

warning: `...` range patterns are deprecated
  --> src/risk/claus/claus_data.rs:83:11
   |
83 |         39...48 => Some(interpolate(
   |           ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
  --> src/risk/claus/claus_data.rs:91:11
   |
91 |         49...58 => Some(interpolate(
   |           ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
  --> src/risk/claus/claus_data.rs:99:11
   |
99 |         59...68 => Some(interpolate(
   |           ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/claus/claus_data.rs:107:11
    |
107 |         69...78 => Some(interpolate(
    |           ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/claus/claus_data.rs:146:11
    |
146 |         29...38 => Some(interpolate(
    |           ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/claus/claus_data.rs:154:11
    |
154 |         39...48 => Some(interpolate(
    |           ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/claus/claus_data.rs:162:11
    |
162 |         49...58 => Some(interpolate(
    |           ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/claus/claus_data.rs:170:11
    |
170 |         59...68 => Some(interpolate(
    |           ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/claus/claus_data.rs:178:11
    |
178 |         69...78 => Some(interpolate(
    |           ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/claus/claus_data.rs:205:15
    |
205 |             20...29 => Some(0),
    |               ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/claus/claus_data.rs:206:15
    |
206 |             30...39 => Some(1),
    |               ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/claus/claus_data.rs:207:15
    |
207 |             40...49 => Some(2),
    |               ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/claus/claus_data.rs:208:15
    |
208 |             50...59 => Some(3),
    |               ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/claus/claus_data.rs:209:15
    |
209 |             60...69 => Some(4),
    |               ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/claus/claus_data.rs:210:15
    |
210 |             70...79 => Some(5),
    |               ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/uspstf/uspstf_counseling/manchester.rs:172:14
    |
172 |             0...29 => (6, 5),
    |              ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/uspstf/uspstf_counseling/manchester.rs:173:15
    |
173 |             30...39 => (4, 4),
    |               ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/uspstf/uspstf_counseling/manchester.rs:174:15
    |
174 |             40...49 => (3, 3),
    |               ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/uspstf/uspstf_counseling/manchester.rs:175:15
    |
175 |             50...59 => (2, 2),
    |               ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/uspstf/uspstf_counseling/ontario.rs:346:15
    |
346 |             20...29 => 6,
    |               ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/uspstf/uspstf_counseling/ontario.rs:347:15
    |
347 |             30...39 => 4,
    |               ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/uspstf/uspstf_counseling/ontario.rs:348:15
    |
348 |             40...49 => 2,
    |               ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/uspstf/uspstf_counseling/ontario.rs:358:14
    |
358 |             0...39 => 6,
    |              ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/uspstf/uspstf_counseling/ontario.rs:359:15
    |
359 |             40...59 => 4,
    |               ^^^ help: use `..=` for an inclusive range

error[E0446]: crate-visible type `risk::gail::input::GailInput` in public interface
  --> src/risk/gail/lookup/mod.rs:16:1
   |
16 | / pub fn gail_lookup(
17 | |     parsed_input: &GailInput,
18 | |     hm: &FnvHashMap<&str, GailNumericResult>,
19 | | ) -> Result<GailNumericResult, String> {
...  |
27 | |     }.map(|r| r.into())
28 | | }
   | |_^ can't leak crate-visible type
   | 
  ::: src/risk/gail/input/mod.rs:11:1
   |
11 |   pub(crate) struct GailInput {
   |   ---------- `risk::gail::input::GailInput` declared as crate-visible

error[E0446]: crate-visible type `risk::gail::result::GailNumericResult` in public interface
  --> src/risk/gail/lookup/mod.rs:16:1
   |
16 | / pub fn gail_lookup(
17 | |     parsed_input: &GailInput,
18 | |     hm: &FnvHashMap<&str, GailNumericResult>,
19 | | ) -> Result<GailNumericResult, String> {
...  |
27 | |     }.map(|r| r.into())
28 | | }
   | |_^ can't leak crate-visible type
   | 
  ::: src/risk/gail/result.rs:20:1
   |
20 |   pub(crate) struct GailNumericResult {
   |   ---------- `risk::gail::result::GailNumericResult` declared as crate-visible

error[E0446]: crate-visible type `risk::gail::result::GailNumericResult` in public interface
  --> src/risk/gail/lookup/matrix_loading.rs:6:1
   |
6  | / lazy_static! {
7  | |     /// This lazy static MATRIX is a hash-map taking a canonical string representing an input
8  | |     pub static ref MATRIX: FnvHashMap<&'static str, GailNumericResult> = {
9  | |         parse_matrix(include_str!("gailmatrix.dat"))
10 | |             .expect("Error generating Gail result hashtable")
11 | |     };
12 | | }
   | |_^ can't leak crate-visible type
   | 
  ::: src/risk/gail/result.rs:20:1
   |
20 |   pub(crate) struct GailNumericResult {
   |   ---------- `risk::gail::result::GailNumericResult` declared as crate-visible
   |
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error[E0446]: crate-visible type `risk::gail::result::GailNumericResult` in public interface
  --> src/risk/gail/lookup/matrix_loading.rs:6:1
   |
6  | / lazy_static! {
7  | |     /// This lazy static MATRIX is a hash-map taking a canonical string representing an input
8  | |     pub static ref MATRIX: FnvHashMap<&'static str, GailNumericResult> = {
9  | |         parse_matrix(include_str!("gailmatrix.dat"))
10 | |             .expect("Error generating Gail result hashtable")
11 | |     };
12 | | }
   | |_^ can't leak crate-visible type
   | 
  ::: src/risk/gail/result.rs:20:1
   |
20 |   pub(crate) struct GailNumericResult {
   |   ---------- `risk::gail::result::GailNumericResult` declared as crate-visible
   |
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0446`.
error: Could not compile `risk`.
warning: build failed, waiting for other jobs to finish...
warning: `...` range patterns are deprecated
  --> src/risk/claus/claus_data.rs:75:11
   |
75 |         29...38 => Some(interpolate(
   |           ^^^ help: use `..=` for an inclusive range
   |
note: lint level defined here
  --> src/lib.rs:14:9
   |
14 | #![warn(rust_2018_idioms)]
   |         ^^^^^^^^^^^^^^^^
   = note: #[warn(ellipsis_inclusive_range_patterns)] implied by #[warn(rust_2018_idioms)]

warning: `...` range patterns are deprecated
  --> src/risk/claus/claus_data.rs:83:11
   |
83 |         39...48 => Some(interpolate(
   |           ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
  --> src/risk/claus/claus_data.rs:91:11
   |
91 |         49...58 => Some(interpolate(
   |           ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
  --> src/risk/claus/claus_data.rs:99:11
   |
99 |         59...68 => Some(interpolate(
   |           ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/claus/claus_data.rs:107:11
    |
107 |         69...78 => Some(interpolate(
    |           ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/claus/claus_data.rs:146:11
    |
146 |         29...38 => Some(interpolate(
    |           ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/claus/claus_data.rs:154:11
    |
154 |         39...48 => Some(interpolate(
    |           ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/claus/claus_data.rs:162:11
    |
162 |         49...58 => Some(interpolate(
    |           ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/claus/claus_data.rs:170:11
    |
170 |         59...68 => Some(interpolate(
    |           ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/claus/claus_data.rs:178:11
    |
178 |         69...78 => Some(interpolate(
    |           ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/claus/claus_data.rs:205:15
    |
205 |             20...29 => Some(0),
    |               ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/claus/claus_data.rs:206:15
    |
206 |             30...39 => Some(1),
    |               ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/claus/claus_data.rs:207:15
    |
207 |             40...49 => Some(2),
    |               ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/claus/claus_data.rs:208:15
    |
208 |             50...59 => Some(3),
    |               ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/claus/claus_data.rs:209:15
    |
209 |             60...69 => Some(4),
    |               ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/claus/claus_data.rs:210:15
    |
210 |             70...79 => Some(5),
    |               ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/uspstf/uspstf_counseling/manchester.rs:172:14
    |
172 |             0...29 => (6, 5),
    |              ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/uspstf/uspstf_counseling/manchester.rs:173:15
    |
173 |             30...39 => (4, 4),
    |               ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/uspstf/uspstf_counseling/manchester.rs:174:15
    |
174 |             40...49 => (3, 3),
    |               ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/uspstf/uspstf_counseling/manchester.rs:175:15
    |
175 |             50...59 => (2, 2),
    |               ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/uspstf/uspstf_counseling/ontario.rs:346:15
    |
346 |             20...29 => 6,
    |               ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/uspstf/uspstf_counseling/ontario.rs:347:15
    |
347 |             30...39 => 4,
    |               ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/uspstf/uspstf_counseling/ontario.rs:348:15
    |
348 |             40...49 => 2,
    |               ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/uspstf/uspstf_counseling/ontario.rs:358:14
    |
358 |             0...39 => 6,
    |              ^^^ help: use `..=` for an inclusive range

warning: `...` range patterns are deprecated
   --> src/risk/uspstf/uspstf_counseling/ontario.rs:359:15
    |
359 |             40...59 => 4,
    |               ^^^ help: use `..=` for an inclusive range

warning: unreachable `pub` item
 --> src/risk/claus/claus_data.rs:4:1
  |
4 | pub type Claus2dMatrix = [[f64; 6]; 6];
  | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  | |
  | help: consider restricting its visibility: `pub(crate)`
  |
note: lint level defined here
 --> src/lib.rs:14:9
  |
14| #![warn(rust_2018_idioms)]
  |         ^^^^^^^^^^^^^^^^
  = note: #[warn(unreachable_pub)] implied by #[warn(rust_2018_idioms)]
  = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
 --> src/risk/claus/claus_data.rs:5:1
  |
5 | pub type Claus3dMatrix = [[[f64; 6]; 6]; 6];
  | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  | |
  | help: consider restricting its visibility: `pub(crate)`
  |
  = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
 --> src/risk/claus/claus_data.rs:7:1
  |
7 | pub trait ClausData {
  | ---^^^^^^^^^^^^^^^^
  | |
  | help: consider restricting its visibility: `pub(crate)`
  |
  = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
  --> src/risk/claus/claus_data.rs:12:1
   |
12 | pub struct OneAffectedRelative {
   | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |
   | help: consider restricting its visibility: `pub(crate)`
   |
   = help: or consider exporting it for use by other crates

warning: unreachable `pub` field
  --> src/risk/claus/claus_data.rs:13:5
   |
13 |     pub coefficients: Claus2dMatrix,
   |     ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/claus/claus_data.rs:14:5
   |
14 |     pub proband_age: Option<u8>,
   |     ---^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/claus/claus_data.rs:15:5
   |
15 |     pub relative_age_of_diagnosis: Option<u8>,
   |     ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` item
  --> src/risk/claus/claus_data.rs:19:1
   |
19 | pub struct TwoAffectedRelatives {
   | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |
   | help: consider restricting its visibility: `pub(crate)`
   |
   = help: or consider exporting it for use by other crates

warning: unreachable `pub` field
  --> src/risk/claus/claus_data.rs:20:5
   |
20 |     pub coefficients: Claus3dMatrix,
   |     ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/claus/claus_data.rs:21:5
   |
21 |     pub proband_age: Option<u8>,
   |     ---^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/claus/claus_data.rs:22:5
   |
22 |     pub first_relative_age_of_diagnosis: Option<u8>,
   |     ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/claus/claus_data.rs:23:5
   |
23 |     pub second_relative_age_of_diagnosis: Option<u8>,
   |     ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` item
  --> src/risk/claus/coefficients.rs:5:1
   |
5  |   pub const ONE_FDR: Claus2dMatrix = [
   |   ^--
   |   |
   |  _help: consider restricting its visibility: `pub(crate)`
   | |
6  | |     [0.007, 0.025, 0.062, 0.116, 0.171, 0.211],
7  | |     [0.005, 0.017, 0.044, 0.086, 0.130, 0.165],
8  | |     [0.003, 0.012, 0.032, 0.064, 0.101, 0.132],
...  |
11 | |     [0.001, 0.005, 0.015, 0.035, 0.062, 0.088],
12 | | ];
   | |__^
   |
   = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
  --> src/risk/claus/coefficients.rs:14:1
   |
14 |   pub const ONE_SDR: Claus2dMatrix = [
   |   ^--
   |   |
   |  _help: consider restricting its visibility: `pub(crate)`
   | |
15 | |     [0.004, 0.014, 0.035, 0.070, 0.110, 0.142],
16 | |     [0.003, 0.010, 0.027, 0.056, 0.090, 0.120],
17 | |     [0.002, 0.007, 0.021, 0.045, 0.076, 0.104],
...  |
20 | |     [0.001, 0.004, 0.013, 0.032, 0.058, 0.083],
21 | | ];
   | |__^
   |
   = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
  --> src/risk/claus/coefficients.rs:27:1
   |
27 |   pub const TWO_FDR: Claus3dMatrix = [
   |   ^--
   |   |
   |  _help: consider restricting its visibility: `pub(crate)`
   | |
28 | |     [
29 | |         [0.021, 0.069, 0.166, 0.295, 0.412, 0.484],
30 | |         [0.020, 0.066, 0.157, 0.279, 0.391, 0.460],
...  |
75 | |     ],
76 | | ];
   | |__^
   |
   = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
   --> src/risk/claus/coefficients.rs:78:1
    |
78  |   pub const FDR_AND_SDR_SAME_SIDE: Claus3dMatrix = [
    |   ^--
    |   |
    |  _help: consider restricting its visibility: `pub(crate)`
    | |
79  | |     [
80  | |         [0.019, 0.064, 0.153, 0.273, 0.382, 0.450],
81  | |         [0.018, 0.062, 0.148, 0.265, 0.371, 0.437],
...   |
126 | |     ],
127 | | ];
    | |__^
    |
    = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
   --> src/risk/claus/coefficients.rs:129:1
    |
129 |   pub const FDR_AND_SDR_OPPOSITE_SIDES: Claus3dMatrix = [
    |   ^--
    |   |
    |  _help: consider restricting its visibility: `pub(crate)`
    | |
130 | |     [
131 | |         [0.010, 0.033, 0.080, 0.148, 0.214, 0.260],
132 | |         [0.009, 0.030, 0.073, 0.136, 0.198, 0.241],
...   |
177 | |     ],
178 | | ];
    | |__^
    |
    = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
   --> src/risk/claus/coefficients.rs:180:1
    |
180 |   pub const TWO_SDR_OPPOSITE_SIDES: Claus3dMatrix = [
    |   ^--
    |   |
    |  _help: consider restricting its visibility: `pub(crate)`
    | |
181 | |     [
182 | |         [0.007, 0.023, 0.057, 0.108, 0.160, 0.199],
183 | |         [0.006, 0.020, 0.050, 0.095, 0.143, 0.179],
...   |
228 | |     ],
229 | | ];
    | |__^
    |
    = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
   --> src/risk/claus/coefficients.rs:231:1
    |
231 |   pub const TWO_SDR_SAME_SIDE: Claus3dMatrix = [
    |   ^--
    |   |
    |  _help: consider restricting its visibility: `pub(crate)`
    | |
232 | |     [
233 | |         [0.010, 0.033, 0.081, 0.149, 0.216, 0.262],
234 | |         [0.009, 0.032, 0.079, 0.145, 0.210, 0.256],
...   |
279 | |     ],
280 | | ];
    | |__^
    |
    = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
 --> src/risk/claus/helpers.rs:8:1
  |
8 | pub const MINIMUM_AGE: u8 = 29;
  | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  | |
  | help: consider restricting its visibility: `pub(crate)`
  |
  = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
 --> src/risk/claus/helpers.rs:9:1
  |
9 | pub const MAXIMUM_AGE: u8 = 79;
  | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  | |
  | help: consider restricting its visibility: `pub(crate)`
  |
  = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
  --> src/risk/claus/helpers.rs:14:1
   |
14 | pub struct RelevantCancers {
   | ---^^^^^^^^^^^^^^^^^^^^^^^
   | |
   | help: consider restricting its visibility: `pub(crate)`
   |
   = help: or consider exporting it for use by other crates

warning: unreachable `pub` field
  --> src/risk/claus/helpers.rs:15:5
   |
15 |     pub maternal_fdrs: (Option<u8>, Option<u8>),
   |     ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/claus/helpers.rs:16:5
   |
16 |     pub paternal_fdrs: (Option<u8>, Option<u8>),
   |     ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/claus/helpers.rs:17:5
   |
17 |     pub maternal_and_paternal_fdrs: (Option<u8>, Option<u8>),
   |     ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/claus/helpers.rs:18:5
   |
18 |     pub maternal_sdrs: (Option<u8>, Option<u8>),
   |     ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/claus/helpers.rs:19:5
   |
19 |     pub paternal_sdrs: (Option<u8>, Option<u8>),
   |     ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/claus/helpers.rs:20:5
   |
20 |     pub maternal_and_paternal_sdrs: (Option<u8>, Option<u8>),
   |     ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` item
  --> src/risk/claus/helpers.rs:24:5
   |
24 |     pub fn min_maternal_fdr(&self) -> Option<u8> {
   |     ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` item
  --> src/risk/claus/helpers.rs:28:5
   |
28 |     pub fn min_paternal_sdr(&self) -> Option<u8> {
   |     ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` item
  --> src/risk/claus/helpers.rs:32:5
   |
32 |     pub fn min_maternal_sdr(&self) -> Option<u8> {
   |     ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` item
  --> src/risk/claus/helpers.rs:37:1
   |
37 | pub fn get_relevant_cancers(family: &Family, proband_id: &str) -> RelevantCancers {
   | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |
   | help: consider restricting its visibility: `pub(crate)`
   |
   = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
   --> src/risk/claus/helpers.rs:142:1
    |
142 | pub fn min_of_options(first: Option<u8>, second: Option<u8>) -> Option<u8> {
    | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | |
    | help: consider restricting its visibility: `pub(crate)`
    |
    = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
  --> src/risk/gail/input/ingest.rs:73:1
   |
73 | pub fn ingest_family_to_gail(family: &Family, proband_id: &str) -> Result<Vec<GailInput>, String> {
   | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |
   | help: consider restricting its visibility: `pub(crate)`
   |
   = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
 --> src/risk/gail/input/normalize.rs:3:1
  |
3 | pub fn normalize_age(age: usize) -> Result<usize, String> {
  | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  | |
  | help: consider restricting its visibility: `pub(crate)`
  |
  = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
  --> src/risk/gail/input/normalize.rs:11:1
   |
11 | pub fn normalize_menarche_age(menarche_age: usize) -> Result<usize, String> {
   | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |
   | help: consider restricting its visibility: `pub(crate)`
   |
   = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
  --> src/risk/gail/input/normalize.rs:28:1
   |
28 | pub fn normalize_first_degree_rel(first_degree_rel: usize) -> Result<usize, String> {
   | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |
   | help: consider restricting its visibility: `pub(crate)`
   |
   = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
  --> src/risk/gail/input/normalize.rs:45:1
   |
45 | pub fn normalize_first_live_birth_age(first_live_birth_age: usize) -> Result<usize, String> {
   | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |
   | help: consider restricting its visibility: `pub(crate)`
   |
   = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
 --> src/risk/gail/input/mod.rs:5:1
  |
5 | pub use self::ingest::ingest_family_to_gail;
  | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  | |
  | help: consider restricting its visibility: `pub(crate)`
  |
  = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
  --> src/risk/gail/input/mod.rs:11:1
   |
11 | pub struct GailInput {
   | ---^^^^^^^^^^^^^^^^^
   | |
   | help: consider restricting its visibility: `pub(crate)`
   |
   = help: or consider exporting it for use by other crates

warning: unreachable `pub` field
  --> src/risk/gail/input/mod.rs:13:5
   |
13 |     pub current_age: usize,
   |     ---^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/gail/input/mod.rs:15:5
   |
15 |     pub menarche_age: usize,
   |     ---^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/gail/input/mod.rs:18:5
   |
18 |     pub first_live_birth_age: usize,
   |     ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/gail/input/mod.rs:20:5
   |
20 |     pub first_degree_rel: usize,
   |     ---^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/gail/input/mod.rs:22:5
   |
22 |     pub had_biopsy: bool,
   |     ---^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/gail/input/mod.rs:24:5
   |
24 |     pub num_biopsy: usize,
   |     ---^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/gail/input/mod.rs:26:5
   |
26 |     pub hyper_plasia: bool,
   |     ---^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/gail/input/mod.rs:28:5
   |
28 |     pub race: usize,
   |     ---^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` item
  --> src/risk/gail/input/mod.rs:38:5
   |
38 |     pub fn normalize(&self) -> Result<GailInput, String> {
   |     ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` item
  --> src/risk/gail/input/mod.rs:55:5
   |
55 |     pub fn to_hash_key(&self) -> String {
   |     ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` item
  --> src/risk/gail/lookup/matrix_parsing.rs:65:1
   |
65 | pub fn parse_matrix(matrix: &str) -> Result<FnvHashMap<&str, GailNumericResult>, String> {
   | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |
   | help: consider restricting its visibility: `pub(crate)`
   |
   = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
 --> src/risk/gail/lookup/mod.rs:9:32
  |
9 | pub use self::matrix_loading::{warm, MATRIX};
  | ---                            ^^^^
  | |
  | help: consider restricting its visibility: `pub(crate)`
  |
  = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
 --> src/risk/gail/lookup/mod.rs:9:38
  |
9 | pub use self::matrix_loading::{warm, MATRIX};
  | ---                                  ^^^^^^
  | |
  | help: consider restricting its visibility: `pub(crate)`
  |
  = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
  --> src/risk/gail/lookup/mod.rs:16:1
   |
16 |   pub fn gail_lookup(
   |   ^--
   |   |
   |  _help: consider restricting its visibility: `pub(crate)`
   | |
17 | |     parsed_input: &GailInput,
18 | |     hm: &FnvHashMap<&str, GailNumericResult>,
19 | | ) -> Result<GailNumericResult, String> {
...  |
27 | |     }.map(|r| r.into())
28 | | }
   | |_^
   |
   = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
  --> src/risk/gail/result.rs:20:1
   |
20 | pub struct GailNumericResult {
   | ---^^^^^^^^^^^^^^^^^^^^^^^^^
   | |
   | help: consider restricting its visibility: `pub(crate)`
   |
   = help: or consider exporting it for use by other crates

warning: unreachable `pub` field
  --> src/risk/gail/result.rs:21:5
   |
21 |     pub five_year: f64,
   |     ---^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/gail/result.rs:22:5
   |
22 |     pub ten_year: f64,
   |     ---^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/gail/result.rs:23:5
   |
23 |     pub fifteen_year: f64,
   |     ---^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/gail/result.rs:24:5
   |
24 |     pub twenty_year: f64,
   |     ---^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/gail/result.rs:25:5
   |
25 |     pub lifetime: f64,
   |     ---^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` item
  --> src/risk/gail/result.rs:30:5
   |
30 |     pub fn zero() -> Self {
   |     ---^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` item
 --> src/risk/gail/util.rs:2:1
  |
2 | pub fn bool_to_int(b: bool) -> i32 {
  | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  | |
  | help: consider restricting its visibility: `pub(crate)`
  |
  = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
  --> src/risk/gail/util.rs:14:1
   |
14 | pub fn bucketize<T: PartialOrd + Clone>(v: T, buckets: &[(Option<T>, Option<T>, T)]) -> Option<T> {
   | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |
   | help: consider restricting its visibility: `pub(crate)`
   |
   = help: or consider exporting it for use by other crates

warning: unreachable `pub` field
  --> src/risk/nccn/helpers.rs:27:5
   |
27 |     pub has_breast_cancer: bool,
   |     ---^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/nccn/helpers.rs:28:5
   |
28 |     pub has_breast_cancer_by_age: bool,
   |     ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/premm/premm_5.rs:15:5
   |
15 |     pub mlh1: f64,
   |     ---^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/premm/premm_5.rs:16:5
   |
16 |     pub msh2: f64,
   |     ---^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/premm/premm_5.rs:17:5
   |
17 |     pub msh6: f64,
   |     ---^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/premm/premm_5.rs:18:5
   |
18 |     pub pms2: f64,
   |     ---^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/premm/premm_5.rs:22:5
   |
22 |     pub constant: f64,
   |     ---^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/premm/premm_5.rs:23:5
   |
23 |     pub v0: f64,
   |     ---^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/premm/premm_5.rs:24:5
   |
24 |     pub v1: f64,
   |     ---^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/premm/premm_5.rs:25:5
   |
25 |     pub v2: f64,
   |     ---^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/premm/premm_5.rs:26:5
   |
26 |     pub v3: f64,
   |     ---^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/premm/premm_5.rs:27:5
   |
27 |     pub v4: f64,
   |     ---^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/premm/premm_5.rs:28:5
   |
28 |     pub v5: f64,
   |     ---^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/premm/premm_5.rs:29:5
   |
29 |     pub v6: f64,
   |     ---^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/premm/premm_5.rs:30:5
   |
30 |     pub v7: f64,
   |     ---^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/premm/premm_5.rs:31:5
   |
31 |     pub v8: f64,
   |     ---^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/premm/premm_5.rs:32:5
   |
32 |     pub v9: f64,
   |     ---^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` field
  --> src/risk/premm/premm_5.rs:33:5
   |
33 |     pub v10: f64,
   |     ---^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(crate)`

warning: unreachable `pub` item
  --> src/risk/uspstf/uspstf_counseling/manchester.rs:57:1
   |
57 | pub fn manchester(family: &Family, proband_id: &str) -> bool {
   | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |
   | help: consider restricting its visibility: `pub(crate)`
   |
   = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
   --> src/risk/uspstf/uspstf_counseling/ontario.rs:106:1
    |
106 | pub fn ontario(family: &Family, proband_id: &str) -> bool {
    | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | |
    | help: consider restricting its visibility: `pub(crate)`
    |
    = help: or consider exporting it for use by other crates

warning: unreachable `pub` item
  --> src/risk/uspstf/uspstf_counseling/referral_screening_tool.rs:43:1
   |
43 | pub fn referral_screening_tool(family: &Family, proband_id: &str) -> bool {
   | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   | |
   | help: consider restricting its visibility: `pub(crate)`
   |
   = help: or consider exporting it for use by other crates

error: build failed

I'm using cargo 1.29.0-nightly (506eea7 2018-07-17)

@alexcrichton
Copy link
Member

Thanks for the report! Would it be possible to poke around the crate you're seeing these errors from?

Additionally, does this happen if you disable the rust_2018_idioms lint group?

@Ethan826
Copy link
Author

No problem. Thanks for all the great work on my favorite programming language!

The problem does not occur if I disable that lint group. I have emailed you at your GitHub profile email address, as I'm happy to share some code with you but do not want to post it publicly.

bors added a commit that referenced this issue Jul 24, 2018
Fix a formatting of a cargo fix message

Something I saw in the report of #5775
@alexcrichton
Copy link
Member

Ok thanks so much for the info! I've reduced this down to two separate issues (both with lints in rustc)

I'm gonna close this in favor of them, thanks again for taking the time to report this!

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

No branches or pull requests

2 participants