Advertisement
JSkier

Untitled

Jun 22nd, 2021
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 17.46 KB | None | 0 0
  1. error[E0308]: mismatched types
  2.     --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1064:28
  3.      |
  4. 1064 |     Limb::BITS.checked_mul(x.len())
  5.      |                            ^^^^^^^ expected `u32`, found `usize`
  6.      |
  7. help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit
  8.     |
  9. 1064 |     Limb::BITS.checked_mul(x.len().try_into().unwrap())
  10.     |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  11.  
  12. error[E0308]: mismatched types
  13.    --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1065:22
  14.     |
  15. 1065 |         .map(|v| v - nlz)
  16.     |                      ^^^ expected `u32`, found `usize`
  17.  
  18. error[E0277]: cannot subtract `usize` from `u32`
  19.    --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1065:20
  20.     |
  21. 1065 |         .map(|v| v - nlz)
  22.     |                    ^ no implementation for `u32 - usize`
  23.     |
  24.     = help: the trait `Sub<usize>` is not implemented for `u32`
  25.  
  26. error[E0308]: mismatched types
  27.    --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1066:20
  28.     |
  29. 1066 |         .unwrap_or(usize::max_value())
  30.     |                    ^^^^^^^^^^^^^^^^^^ expected `u32`, found `usize`
  31.     |
  32. help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit
  33.      |
  34. 1066 |         .unwrap_or(usize::max_value().try_into().unwrap())
  35.      |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  36.  
  37. error[E0308]: mismatched types
  38.     --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1064:5
  39.      |
  40. 1060 |   pub fn bit_length(x: &[Limb]) -> usize {
  41.      |                                    ----- expected `usize` because of return type
  42. ...
  43. 1064 | /     Limb::BITS.checked_mul(x.len())
  44. 1065 | |         .map(|v| v - nlz)
  45. 1066 | |         .unwrap_or(usize::max_value())
  46.      | |______________________________________^ expected `usize`, found `u32`
  47.      |
  48. help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
  49.     |
  50. 1064 |     Limb::BITS.checked_mul(x.len())
  51. 1065 |         .map(|v| v - nlz)
  52. 1066 |         .unwrap_or(usize::max_value()).try_into().unwrap()
  53.     |
  54.  
  55. error[E0308]: mismatched types
  56.    --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1091:23
  57.     |
  58. 1091 |     debug_assert!(n < bits && n != 0);
  59.     |                       ^^^^ expected `usize`, found `u32`
  60.     |
  61. help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
  62.      |
  63. 1091 |     debug_assert!(n < bits.try_into().unwrap() && n != 0);
  64.      |                       ^^^^^^^^^^^^^^^^^^^^^^^^
  65.  
  66. error[E0308]: mismatched types
  67.     --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1098:25
  68.      |
  69. 1098 |     let lshift = bits - n;
  70.      |                         ^ expected `u32`, found `usize`
  71.  
  72. error[E0277]: cannot subtract `usize` from `u32`
  73.     --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1098:23
  74.      |
  75. 1098 |     let lshift = bits - n;
  76.      |                       ^ no implementation for `u32 - usize`
  77.      |
  78.      = help: the trait `Sub<usize>` is not implemented for `u32`
  79.  
  80. error[E0308]: mismatched types
  81.     --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1140:19
  82.      |
  83. 1140 |     let rem = n % bits;
  84.      |                   ^^^^ expected `usize`, found `u32`
  85.  
  86. error[E0277]: cannot mod `usize` by `u32`
  87.     --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1140:17
  88.      |
  89. 1140 |     let rem = n % bits;
  90.      |                 ^ no implementation for `usize % u32`
  91.      |
  92.      = help: the trait `Rem<u32>` is not implemented for `usize`
  93.  
  94. error[E0308]: mismatched types
  95.     --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1141:19
  96.      |
  97. 1141 |     let div = n / bits;
  98.      |                   ^^^^ expected `usize`, found `u32`
  99.  
  100. error[E0277]: cannot divide `usize` by `u32`
  101.     --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1141:17
  102.      |
  103. 1141 |     let div = n / bits;
  104.      |                 ^ no implementation for `usize / u32`
  105.      |
  106.      = help: the trait `Div<u32>` is not implemented for `usize`
  107.  
  108. error[E0308]: mismatched types
  109.     --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1197:23
  110.      |
  111. 1197 |     debug_assert!(n < bits);
  112.      |                       ^^^^ expected `usize`, found `u32`
  113.      |
  114. help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
  115.     |
  116. 1197 |     debug_assert!(n < bits.try_into().unwrap());
  117.     |                       ^^^^^^^^^^^^^^^^^^^^^^^^
  118.  
  119. error[E0308]: mismatched types
  120.    --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1207:25
  121.     |
  122. 1207 |     let rshift = bits - n;
  123.     |                         ^ expected `u32`, found `usize`
  124.  
  125. error[E0277]: cannot subtract `usize` from `u32`
  126.    --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1207:23
  127.     |
  128. 1207 |     let rshift = bits - n;
  129.     |                       ^ no implementation for `u32 - usize`
  130.     |
  131.     = help: the trait `Sub<usize>` is not implemented for `u32`
  132.  
  133. error[E0308]: mismatched types
  134.    --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1259:19
  135.     |
  136. 1259 |     let rem = n % bits;
  137.     |                   ^^^^ expected `usize`, found `u32`
  138.  
  139. error[E0277]: cannot mod `usize` by `u32`
  140.    --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1259:17
  141.     |
  142. 1259 |     let rem = n % bits;
  143.     |                 ^ no implementation for `usize % u32`
  144.     |
  145.     = help: the trait `Rem<u32>` is not implemented for `usize`
  146.  
  147. error[E0308]: mismatched types
  148.    --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1260:19
  149.     |
  150. 1260 |     let div = n / bits;
  151.     |                   ^^^^ expected `usize`, found `u32`
  152.  
  153. error[E0277]: cannot divide `usize` by `u32`
  154.    --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1260:17
  155.     |
  156. 1260 |     let div = n / bits;
  157.     |                 ^ no implementation for `usize / u32`
  158.     |
  159.     = help: the trait `Div<u32>` is not implemented for `usize`
  160.  
  161. error[E0277]: cannot divide `usize` by `u32`
  162.  --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/bhcomp.rs:62:22
  163.   |
  164. 62 |     let bytes = bits / Limb::BITS;
  165.   |                      ^ no implementation for `usize / u32`
  166.   |
  167.   = help: the trait `Div<u32>` is not implemented for `usize`
  168.  
  169. error[E0308]: mismatched types
  170.    --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:2071:27
  171.     |
  172. 2071 |     let rs = Limb::BITS - s;
  173.     |                           ^ expected `u32`, found `usize`
  174.  
  175. error[E0277]: cannot subtract `usize` from `u32`
  176.    --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:2071:25
  177.     |
  178. 2071 |     let rs = Limb::BITS - s;
  179.     |                         ^ no implementation for `u32 - usize`
  180.     |
  181.     = help: the trait `Sub<usize>` is not implemented for `u32`
  182.  
  183. error[E0308]: mismatched types
  184.   --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/bigcomp.rs:157:55
  185.    |
  186. 157 |     let nlz = den.leading_zeros().wrapping_sub(wlz) & (u32::BITS - 1);
  187.    |                                                       ^^^^^^^^^^^^^^^ expected `usize`, found `u32`
  188.  
  189. error[E0277]: no implementation for `usize & u32`
  190.   --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/bigcomp.rs:157:53
  191.    |
  192. 157 |     let nlz = den.leading_zeros().wrapping_sub(wlz) & (u32::BITS - 1);
  193.    |                                                     ^ no implementation for `usize & u32`
  194.    |
  195.    = help: the trait `BitAnd<u32>` is not implemented for `usize`
  196.  
  197. error[E0308]: mismatched types
  198.   --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/bigcomp.rs:175:40
  199.    |
  200. 175 |         let (q, r) = shift.ceil_divmod(Limb::BITS);
  201.    |                                        ^^^^^^^^^^ expected `usize`, found `u32`
  202.    |
  203. help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
  204.     |
  205. 175 |         let (q, r) = shift.ceil_divmod(Limb::BITS.try_into().unwrap());
  206.     |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  207.  
  208.    Compiling rand v0.7.3
  209. error: aborting due to 27 previous errors
  210.  
  211. Some errors have detailed explanations: E0277, E0308.
  212. For more information about an error, try `rustc --explain E0277`.
  213. error: could not compile `lexical-core`
  214.  
  215. To learn more, run the command again with --verbose.
  216. warning: build failed, waiting for other jobs to finish...
  217. error[E0308]: mismatched types
  218.     --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1049:42
  219.      |
  220. 1049 |     let mut count = index.saturating_mul(Limb::BITS);
  221.      |                                          ^^^^^^^^^^ expected `usize`, found `u32`
  222.      |
  223. help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
  224.     |
  225. 1049 |     let mut count = index.saturating_mul(Limb::BITS.try_into().unwrap());
  226.     |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  227.  
  228. error[E0308]: mismatched types
  229.    --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1064:28
  230.     |
  231. 1064 |     Limb::BITS.checked_mul(x.len())
  232.     |                            ^^^^^^^ expected `u32`, found `usize`
  233.     |
  234. help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit
  235.      |
  236. 1064 |     Limb::BITS.checked_mul(x.len().try_into().unwrap())
  237.      |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  238.  
  239. error[E0308]: mismatched types
  240.     --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1065:22
  241.      |
  242. 1065 |         .map(|v| v - nlz)
  243.      |                      ^^^ expected `u32`, found `usize`
  244.  
  245. error[E0277]: cannot subtract `usize` from `u32`
  246.     --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1065:20
  247.      |
  248. 1065 |         .map(|v| v - nlz)
  249.      |                    ^ no implementation for `u32 - usize`
  250.      |
  251.      = help: the trait `Sub<usize>` is not implemented for `u32`
  252.  
  253. error[E0308]: mismatched types
  254.     --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1066:20
  255.      |
  256. 1066 |         .unwrap_or(usize::max_value())
  257.      |                    ^^^^^^^^^^^^^^^^^^ expected `u32`, found `usize`
  258.      |
  259. help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit
  260.     |
  261. 1066 |         .unwrap_or(usize::max_value().try_into().unwrap())
  262.     |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  263.  
  264. error[E0308]: mismatched types
  265.    --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1064:5
  266.     |
  267. 1060 |   pub fn bit_length(x: &[Limb]) -> usize {
  268.     |                                    ----- expected `usize` because of return type
  269. ...
  270. 1064 | /     Limb::BITS.checked_mul(x.len())
  271. 1065 | |         .map(|v| v - nlz)
  272. 1066 | |         .unwrap_or(usize::max_value())
  273.     | |______________________________________^ expected `usize`, found `u32`
  274.     |
  275. help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
  276.      |
  277. 1064 |     Limb::BITS.checked_mul(x.len())
  278. 1065 |         .map(|v| v - nlz)
  279. 1066 |         .unwrap_or(usize::max_value()).try_into().unwrap()
  280.      |
  281.  
  282. error[E0308]: mismatched types
  283.     --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1091:23
  284.      |
  285. 1091 |     debug_assert!(n < bits && n != 0);
  286.      |                       ^^^^ expected `usize`, found `u32`
  287.      |
  288. help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
  289.     |
  290. 1091 |     debug_assert!(n < bits.try_into().unwrap() && n != 0);
  291.     |                       ^^^^^^^^^^^^^^^^^^^^^^^^
  292.  
  293. error[E0308]: mismatched types
  294.    --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1098:25
  295.     |
  296. 1098 |     let lshift = bits - n;
  297.     |                         ^ expected `u32`, found `usize`
  298.  
  299. error[E0277]: cannot subtract `usize` from `u32`
  300.    --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1098:23
  301.     |
  302. 1098 |     let lshift = bits - n;
  303.     |                       ^ no implementation for `u32 - usize`
  304.     |
  305.     = help: the trait `Sub<usize>` is not implemented for `u32`
  306.  
  307. error[E0308]: mismatched types
  308.    --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1140:19
  309.     |
  310. 1140 |     let rem = n % bits;
  311.     |                   ^^^^ expected `usize`, found `u32`
  312.  
  313. error[E0277]: cannot mod `usize` by `u32`
  314.    --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1140:17
  315.     |
  316. 1140 |     let rem = n % bits;
  317.     |                 ^ no implementation for `usize % u32`
  318.     |
  319.     = help: the trait `Rem<u32>` is not implemented for `usize`
  320.  
  321. error[E0308]: mismatched types
  322.    --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1141:19
  323.     |
  324. 1141 |     let div = n / bits;
  325.     |                   ^^^^ expected `usize`, found `u32`
  326.  
  327. error[E0277]: cannot divide `usize` by `u32`
  328.    --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1141:17
  329.     |
  330. 1141 |     let div = n / bits;
  331.     |                 ^ no implementation for `usize / u32`
  332.     |
  333.     = help: the trait `Div<u32>` is not implemented for `usize`
  334.  
  335. error[E0308]: mismatched types
  336.    --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1197:23
  337.     |
  338. 1197 |     debug_assert!(n < bits);
  339.     |                       ^^^^ expected `usize`, found `u32`
  340.     |
  341. help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
  342.      |
  343. 1197 |     debug_assert!(n < bits.try_into().unwrap());
  344.      |                       ^^^^^^^^^^^^^^^^^^^^^^^^
  345.  
  346. error[E0308]: mismatched types
  347.     --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1207:25
  348.      |
  349. 1207 |     let rshift = bits - n;
  350.      |                         ^ expected `u32`, found `usize`
  351.  
  352. error[E0277]: cannot subtract `usize` from `u32`
  353.     --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1207:23
  354.      |
  355. 1207 |     let rshift = bits - n;
  356.      |                       ^ no implementation for `u32 - usize`
  357.      |
  358.      = help: the trait `Sub<usize>` is not implemented for `u32`
  359.  
  360. error[E0308]: mismatched types
  361.     --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1259:19
  362.      |
  363. 1259 |     let rem = n % bits;
  364.      |                   ^^^^ expected `usize`, found `u32`
  365.  
  366. error[E0277]: cannot mod `usize` by `u32`
  367.     --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1259:17
  368.      |
  369. 1259 |     let rem = n % bits;
  370.      |                 ^ no implementation for `usize % u32`
  371.      |
  372.      = help: the trait `Rem<u32>` is not implemented for `usize`
  373.  
  374. error[E0308]: mismatched types
  375.     --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1260:19
  376.      |
  377. 1260 |     let div = n / bits;
  378.      |                   ^^^^ expected `usize`, found `u32`
  379.  
  380. error[E0277]: cannot divide `usize` by `u32`
  381.     --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:1260:17
  382.      |
  383. 1260 |     let div = n / bits;
  384.      |                 ^ no implementation for `usize / u32`
  385.      |
  386.      = help: the trait `Div<u32>` is not implemented for `usize`
  387.  
  388. error[E0308]: mismatched types
  389.     --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:2071:27
  390.      |
  391. 2071 |     let rs = Limb::BITS - s;
  392.      |                           ^ expected `u32`, found `usize`
  393.  
  394. error[E0277]: cannot subtract `usize` from `u32`
  395.     --> /tmp/suricata-nfqueue/src/suricata-6.0.2/rust/vendor/lexical-core/src/atof/algorithm/math.rs:2071:25
  396.      |
  397. 2071 |     let rs = Limb::BITS - s;
  398.      |                         ^ no implementation for `u32 - usize`
  399.      |
  400.      = help: the trait `Sub<usize>` is not implemented for `u32`
  401.  
  402. error: aborting due to 27 previous errors
  403.  
  404. Some errors have detailed explanations: E0277, E0308.
  405. For more information about an error, try `rustc --explain E0277`.
  406. error: build failed
  407. make[1]: *** [Makefile:544: all-local] Error 101
  408. make[1]: Leaving directory '/tmp/suricata-nfqueue/src/suricata-6.0.2/rust'
  409. make: *** [Makefile:492: all-recursive] Error 1
  410. ==> ERROR: A failure occurred in build().
  411.     Aborting...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement