-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Closed
Labels
A-associated-itemsArea: Associated items (types, constants & functions)Area: Associated items (types, constants & functions)A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lints
Description
fn foo(n: usize) {
assert!(n <= u32::MAX as usize);
}
fn main() {}
Gives:
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?
euclio and estebank
Metadata
Metadata
Assignees
Labels
A-associated-itemsArea: Associated items (types, constants & functions)Area: Associated items (types, constants & functions)A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lints