diag: explain pointer-sized cast restrictions in source advice
This commit is contained in:
1 parent
8a714ba6de
commit
6a02659f31
23 files changed
+96
-8
No files matched your search
+1
-1
@@ -209,7 +209,7 @@ pub const SourceRepairKind = enum {
|
||||
.borrow_argument => "Write `ref place` or `mut place` for an inline borrow argument.",
|
||||
.borrow_binding => "Bind a borrow with `ref name = place;` or `mut name = place;`, rather than a let/var initializer.",
|
||||
.zero_storage => "`zero` is only a whole var initializer: `var name: T = zero;`; T must be zeroable.",
|
||||
.numeric_cast_modes => "Choose `as!` for a checked conversion (T0006 on overflow) or `as%` for a wrapping conversion.",
|
||||
.numeric_cast_modes => "The target-independent `as` rule excludes `usize`/`isize`, even when the value fits. Choose `as!` for a checked conversion (T0006 on overflow) or `as%` for a wrapping conversion.",
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user