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

cast 0.2.4 fails on i686-unknown-linux-gnu #29

Closed
kanav99 opened this issue Apr 12, 2021 · 5 comments
Closed

cast 0.2.4 fails on i686-unknown-linux-gnu #29

kanav99 opened this issue Apr 12, 2021 · 5 comments

Comments

@kanav99
Copy link

kanav99 commented Apr 12, 2021

Compiling cast 0.2.4 on i686-unknown-linux-gnu target fails to compile. 0.2.3 works fine.
Log:

error[E0432]: unresolved import `Error`
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/cast-0.2.4/src/lib.rs:361:10
    |
361 |     use {Error, From};
    |          ^^^^^ no external crate `Error`

error[E0437]: type `Output` is not a member of trait `From`
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/cast-0.2.4/src/lib.rs:192:21
    |
192 |                       type Output = $dst;
    |                       ^^^^^^^^^^^^^^^^^^^ not a member of trait `From`
...
364 | /     promotion! {
365 | |         i8    => f32, f64, i8, i16, i32, isize, i64;
366 | |         i16   => f32, f64,     i16, i32, isize, i64;
367 | |         i32   => f32, f64,          i32, isize, i64;
368 | |         isize => f32, f64,          i32, isize, i64;
369 | |         i64   => f32, f64,                      i64;
370 | |     }
    | |_____- in this macro invocation
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `cast` is not a member of trait `From`
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/cast-0.2.4/src/lib.rs:195:21
    |
195 | /                     fn cast(src: $src) -> $dst {
196 | |                         src as $dst
197 | |                     }
    | |_____________________^ not a member of trait `From`
...
364 | /     promotion! {
365 | |         i8    => f32, f64, i8, i16, i32, isize, i64;
366 | |         i16   => f32, f64,     i16, i32, isize, i64;
367 | |         i32   => f32, f64,          i32, isize, i64;
368 | |         isize => f32, f64,          i32, isize, i64;
369 | |         i64   => f32, f64,                      i64;
370 | |     }
    | |_____- in this macro invocation
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0437]: type `Output` is not a member of trait `From`
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/cast-0.2.4/src/lib.rs:210:21
    |
210 |                       type Output = Result<$dst, Error>;
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `From`
...
372 | /     half_promotion! {
373 | |         i8    =>                                     u8, u16, u32, usize, u64;
374 | |         i16   =>                                         u16, u32, usize, u64;
375 | |         i32   =>                                              u32, usize, u64;
376 | |         isize =>                                              u32, usize, u64;
377 | |         i64   =>                                                          u64;
378 | |     }
    | |_____- in this macro invocation
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `cast` is not a member of trait `From`
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/cast-0.2.4/src/lib.rs:213:21
    |
213 | /                     fn cast(src: $src) -> Self::Output {
214 | |                         if src < 0 {
215 | |                             Err(Error::Underflow)
216 | |                         } else {
217 | |                             Ok(src as $dst)
218 | |                         }
219 | |                     }
    | |_____________________^ not a member of trait `From`
...
372 | /     half_promotion! {
373 | |         i8    =>                                     u8, u16, u32, usize, u64;
374 | |         i16   =>                                         u16, u32, usize, u64;
375 | |         i32   =>                                              u32, usize, u64;
376 | |         isize =>                                              u32, usize, u64;
377 | |         i64   =>                                                          u64;
378 | |     }
    | |_____- in this macro invocation
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0437]: type `Output` is not a member of trait `From`
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/cast-0.2.4/src/lib.rs:256:21
    |
256 |                       type Output = Result<$dst, Error>;
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `From`
...
380 | /     from_signed! {
381 | |
382 | |         i16   =>           i8,                       u8;
383 | |         i32   =>           i8, i16,                  u8, u16;
384 | |         isize =>           i8, i16,                  u8, u16;
385 | |         i64   =>           i8, i16, i32, isize,      u8, u16, u32, usize;
386 | |     }
    | |_____- in this macro invocation
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `cast` is not a member of trait `From`
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/cast-0.2.4/src/lib.rs:259:21
    |
259 | /                     fn cast(src: $src) -> Self::Output {
260 | |                         use core::$dst;
261 | |
262 | |                         Err(if src < $dst::MIN as $src {
...   |
268 | |                         })
269 | |                     }
    | |_____________________^ not a member of trait `From`
...
380 | /     from_signed! {
381 | |
382 | |         i16   =>           i8,                       u8;
383 | |         i32   =>           i8, i16,                  u8, u16;
384 | |         isize =>           i8, i16,                  u8, u16;
385 | |         i64   =>           i8, i16, i32, isize,      u8, u16, u32, usize;
386 | |     }
    | |_____- in this macro invocation
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0437]: type `Output` is not a member of trait `From`
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/cast-0.2.4/src/lib.rs:192:21
    |
192 |                       type Output = $dst;
    |                       ^^^^^^^^^^^^^^^^^^^ not a member of trait `From`
...
389 | /     promotion! {
390 | |         u8    => f32, f64,     i16, i32, isize, i64, u8, u16, u32, usize, u64;
391 | |         u16   => f32, f64,          i32, isize, i64,     u16, u32, usize, u64;
392 | |         u32   => f32, f64,                      i64,          u32, usize, u64;
393 | |         usize => f32, f64,                      i64,          u32, usize, u64;
394 | |         u64   => f32, f64,                                                u64;
395 | |     }
    | |_____- in this macro invocation
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `cast` is not a member of trait `From`
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/cast-0.2.4/src/lib.rs:195:21
    |
195 | /                     fn cast(src: $src) -> $dst {
196 | |                         src as $dst
197 | |                     }
    | |_____________________^ not a member of trait `From`
...
389 | /     promotion! {
390 | |         u8    => f32, f64,     i16, i32, isize, i64, u8, u16, u32, usize, u64;
391 | |         u16   => f32, f64,          i32, isize, i64,     u16, u32, usize, u64;
392 | |         u32   => f32, f64,                      i64,          u32, usize, u64;
393 | |         usize => f32, f64,                      i64,          u32, usize, u64;
394 | |         u64   => f32, f64,                                                u64;
395 | |     }
    | |_____- in this macro invocation
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0437]: type `Output` is not a member of trait `From`
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/cast-0.2.4/src/lib.rs:232:21
    |
232 |                       type Output = Result<$dst, Error>;
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `From`
...
397 | /     from_unsigned! {
398 | |         u8    =>           i8;
399 | |         u16   =>           i8, i16,                  u8;
400 | |         u32   =>           i8, i16, i32, isize,      u8, u16;
401 | |         usize =>           i8, i16, i32, isize,      u8, u16;
402 | |         u64   =>           i8, i16, i32, isize, i64, u8, u16, u32, usize;
403 | |     }
    | |_____- in this macro invocation
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `cast` is not a member of trait `From`
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/cast-0.2.4/src/lib.rs:235:21
    |
235 | /                     fn cast(src: $src) -> Self::Output {
236 | |                         use core::$dst;
237 | |
238 | |                         if src > $dst::MAX as $src {
...   |
242 | |                         }
243 | |                     }
    | |_____________________^ not a member of trait `From`
...
397 | /     from_unsigned! {
398 | |         u8    =>           i8;
399 | |         u16   =>           i8, i16,                  u8;
400 | |         u32   =>           i8, i16, i32, isize,      u8, u16;
401 | |         usize =>           i8, i16, i32, isize,      u8, u16;
402 | |         u64   =>           i8, i16, i32, isize, i64, u8, u16, u32, usize;
403 | |     }
    | |_____- in this macro invocation
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0437]: type `Output` is not a member of trait `From`
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/cast-0.2.4/src/lib.rs:192:21
    |
192 |                       type Output = $dst;
    |                       ^^^^^^^^^^^^^^^^^^^ not a member of trait `From`
...
406 | /     promotion! {
407 | |         f32   => f32, f64;
408 | |         f64   =>      f64;
409 | |     }
    | |_____- in this macro invocation
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `cast` is not a member of trait `From`
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/cast-0.2.4/src/lib.rs:195:21
    |
195 | /                     fn cast(src: $src) -> $dst {
196 | |                         src as $dst
197 | |                     }
    | |_____________________^ not a member of trait `From`
...
406 | /     promotion! {
407 | |         f32   => f32, f64;
408 | |         f64   =>      f64;
409 | |     }
    | |_____- in this macro invocation
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0437]: type `Output` is not a member of trait `From`
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/cast-0.2.4/src/lib.rs:282:21
    |
282 |                       type Output = Result<$dst, Error>;
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a member of trait `From`
...
411 | /     from_float! {
412 | |         f32, u32 =>        i8, i16, i32, isize, i64, u8, u16, u32, usize, u64;
413 | |         f64, u64 =>        i8, i16, i32, isize, i64, u8, u16, u32, usize, u64;
414 | |     }
    | |_____- in this macro invocation
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0407]: method `cast` is not a member of trait `From`
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/cast-0.2.4/src/lib.rs:285:21
    |
285 | /                     fn cast(src: $src) -> Self::Output {
286 | |                         use core::{$dst, $src};
287 | |
288 | |                         Err(if src != src {
...   |
317 | |                         })
318 | |                     }
    | |_____________________^ not a member of trait `From`
...
411 | /     from_float! {
412 | |         f32, u32 =>        i8, i16, i32, isize, i64, u8, u16, u32, usize, u64;
413 | |         f64, u64 =>        i8, i16, i32, isize, i64, u8, u16, u32, usize, u64;
414 | |     }
    | |_____- in this macro invocation
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0220]: associated type `Output` not found for `Self`
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/cast-0.2.4/src/lib.rs:213:49
    |
213 |                       fn cast(src: $src) -> Self::Output {
    |                                                   ^^^^^^ associated type `Output` not found
...
372 | /     half_promotion! {
373 | |         i8    =>                                     u8, u16, u32, usize, u64;
374 | |         i16   =>                                         u16, u32, usize, u64;
375 | |         i32   =>                                              u32, usize, u64;
376 | |         isize =>                                              u32, usize, u64;
377 | |         i64   =>                                                          u64;
378 | |     }
    | |_____- in this macro invocation
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0220]: associated type `Output` not found for `Self`
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/cast-0.2.4/src/lib.rs:259:49
    |
259 |                       fn cast(src: $src) -> Self::Output {
    |                                                   ^^^^^^ associated type `Output` not found
...
380 | /     from_signed! {
381 | |
382 | |         i16   =>           i8,                       u8;
383 | |         i32   =>           i8, i16,                  u8, u16;
384 | |         isize =>           i8, i16,                  u8, u16;
385 | |         i64   =>           i8, i16, i32, isize,      u8, u16, u32, usize;
386 | |     }
    | |_____- in this macro invocation
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0220]: associated type `Output` not found for `Self`
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/cast-0.2.4/src/lib.rs:235:49
    |
235 |                       fn cast(src: $src) -> Self::Output {
    |                                                   ^^^^^^ associated type `Output` not found
...
397 | /     from_unsigned! {
398 | |         u8    =>           i8;
399 | |         u16   =>           i8, i16,                  u8;
400 | |         u32   =>           i8, i16, i32, isize,      u8, u16;
401 | |         usize =>           i8, i16, i32, isize,      u8, u16;
402 | |         u64   =>           i8, i16, i32, isize, i64, u8, u16, u32, usize;
403 | |     }
    | |_____- in this macro invocation
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0220]: associated type `Output` not found for `Self`
   --> /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/cast-0.2.4/src/lib.rs:285:49
    |
285 |                       fn cast(src: $src) -> Self::Output {
    |                                                   ^^^^^^ associated type `Output` not found
...
411 | /     from_float! {
412 | |         f32, u32 =>        i8, i16, i32, isize, i64, u8, u16, u32, usize, u64;
413 | |         f64, u64 =>        i8, i16, i32, isize, i64, u8, u16, u32, usize, u64;
414 | |     }
    | |_____- in this macro invocation
    |
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
@Maldus512
Copy link

Maldus512 commented Apr 12, 2021

I have the same issue on thumbv7em-none-eabihf

@ohmyarch
Copy link

Same.

@vitalyvb
Copy link
Contributor

Workarounds:
rust-embedded/discovery#319 (comment)
#27 (comment)

Pull request for this issue - #27

@D1plo1d
Copy link

D1plo1d commented Apr 12, 2021

This also effects armhf builds on the Raspberry Pi

@japaric
Copy link
Owner

japaric commented Apr 12, 2021

v0.2.5 includes PR #27 . v0.2.4 has been yanked.

@japaric japaric closed this as completed Apr 12, 2021
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

6 participants