You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0599]: no associated item named `MAX` found for type `u32` in the current scope
--> ...\test.rs:2:18
|
2 | assert!(n <= u32::MAX as usize);
| ^^^^^^^^ associated item not found in `u32`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0599`.
Perhaps here we want to give a hint where to find the u32::MAX?
This case in particular could be handled explicitly, I believe, as I don't think we have this problem in general in std, only for the numeric types. That being said, if someone has the time to build a generic solution, that'd be of course more useful than a targeted approach.
Activity
estebank commentedon Oct 15, 2018
I'm convinced there's an open ticket for this, but I'm failing to find it. Closest I could find was #29841.
estebank commentedon Oct 15, 2018
This case in particular could be handled explicitly, I believe, as I don't think we have this problem in general in
std, only for the numeric types. That being said, if someone has the time to build a generic solution, that'd be of course more useful than a targeted approach.estebank commentedon Oct 15, 2018
Found it! #26760
leonardo-m commentedon Oct 15, 2018
Close?