From b8344ef88f0a973b876bf1d783683a74d1da0139 Mon Sep 17 00:00:00 2001 From: Konrad Borowski Date: Wed, 3 Jun 2020 20:52:01 +0200 Subject: [PATCH] Remove language-level UB for non-UTF-8 str --- src/what-unsafe-does.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/what-unsafe-does.md b/src/what-unsafe-does.md index 7f13f93..9d9d44a 100644 --- a/src/what-unsafe-does.md +++ b/src/what-unsafe-does.md @@ -37,7 +37,6 @@ language cares about is preventing the following things: `Trait` that matches the actual dynamic trait the pointer or reference points to * slice metadata is invalid if the length is not a valid `usize` (i.e., it must not be read from uninitialized memory) - * a `str` that isn't valid UTF-8 * a type with custom invalid values that is one of those values, such as a `NonNull` that is null. (Requesting custom invalid values is an unstable feature, but some stable libstd types, like `NonNull`, make use of it.)