Skip to content

Commit 79f2d3d

Browse files
committed
Auto merge of rust-lang#77524 - Patryk27:fixes/66228, r=estebank
Rework diagnostics for wrong number of generic args (fixes rust-lang#66228 and rust-lang#71924) This PR reworks the `wrong number of {} arguments` message, so that it provides more details and contextual hints.
2 parents 765e959 + 605f2db commit 79f2d3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/slice/raw.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ pub unsafe fn from_raw_parts<'a, T>(data: *const T, len: usize) -> &'a [T] {
103103
///
104104
/// Behavior is undefined if any of the following conditions are violated:
105105
///
106-
/// * `data` must be [valid] for boths reads and writes for `len * mem::size_of::<T>()` many bytes,
106+
/// * `data` must be [valid] for both reads and writes for `len * mem::size_of::<T>()` many bytes,
107107
/// and it must be properly aligned. This means in particular:
108108
///
109109
/// * The entire memory range of this slice must be contained within a single allocated object!

0 commit comments

Comments
 (0)