From 64d98f8ee037282c35007b64c2649055c56af1db Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:03 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/str/str-mut-idx.stderr | 84 -------------------------------------- 1 file changed, 84 deletions(-) delete mode 100644 src/test/ui/str/str-mut-idx.stderr (limited to 'src/test/ui/str/str-mut-idx.stderr') diff --git a/src/test/ui/str/str-mut-idx.stderr b/src/test/ui/str/str-mut-idx.stderr deleted file mode 100644 index b165c4825..000000000 --- a/src/test/ui/str/str-mut-idx.stderr +++ /dev/null @@ -1,84 +0,0 @@ -error[E0277]: the size for values of type `str` cannot be known at compilation time - --> $DIR/str-mut-idx.rs:4:15 - | -LL | s[1..2] = bot(); - | ^^^ doesn't have a size known at compile-time - | - = help: the trait `Sized` is not implemented for `str` -note: required by a bound in `bot` - --> $DIR/str-mut-idx.rs:1:8 - | -LL | fn bot() -> T { loop {} } - | ^ required by this bound in `bot` -help: consider relaxing the implicit `Sized` restriction - | -LL | fn bot() -> T { loop {} } - | ++++++++ - -error[E0277]: the size for values of type `str` cannot be known at compilation time - --> $DIR/str-mut-idx.rs:4:5 - | -LL | s[1..2] = bot(); - | ^^^^^^^ doesn't have a size known at compile-time - | - = help: the trait `Sized` is not implemented for `str` - = note: the left-hand-side of an assignment must have a statically known size - -error[E0277]: the type `str` cannot be indexed by `usize` - --> $DIR/str-mut-idx.rs:7:7 - | -LL | s[1usize] = bot(); - | ^^^^^^ string indices are ranges of `usize` - | - = help: the trait `SliceIndex` is not implemented for `usize` - = help: the trait `SliceIndex<[T]>` is implemented for `usize` - = note: required for `str` to implement `Index` - -error[E0277]: the type `str` cannot be indexed by `{integer}` - --> $DIR/str-mut-idx.rs:9:15 - | -LL | s.get_mut(1); - | ------- ^ string indices are ranges of `usize` - | | - | required by a bound introduced by this call - | - = help: the trait `SliceIndex` is not implemented for `{integer}` - = note: you can use `.chars().nth()` or `.bytes().nth()` - for more information, see chapter 8 in The Book: - = help: the trait `SliceIndex<[T]>` is implemented for `usize` -note: required by a bound in `core::str::::get_mut` - --> $SRC_DIR/core/src/str/mod.rs:LL:COL - | -LL | pub const fn get_mut>(&mut self, i: I) -> Option<&mut I::Output> { - | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `core::str::::get_mut` - -error[E0277]: the type `str` cannot be indexed by `{integer}` - --> $DIR/str-mut-idx.rs:11:25 - | -LL | s.get_unchecked_mut(1); - | ----------------- ^ string indices are ranges of `usize` - | | - | required by a bound introduced by this call - | - = help: the trait `SliceIndex` is not implemented for `{integer}` - = note: you can use `.chars().nth()` or `.bytes().nth()` - for more information, see chapter 8 in The Book: - = help: the trait `SliceIndex<[T]>` is implemented for `usize` -note: required by a bound in `core::str::::get_unchecked_mut` - --> $SRC_DIR/core/src/str/mod.rs:LL:COL - | -LL | pub const unsafe fn get_unchecked_mut>( - | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `core::str::::get_unchecked_mut` - -error[E0277]: the type `str` cannot be indexed by `char` - --> $DIR/str-mut-idx.rs:13:7 - | -LL | s['c']; - | ^^^ string indices are ranges of `usize` - | - = help: the trait `SliceIndex` is not implemented for `char` - = note: required for `str` to implement `Index` - -error: aborting due to 6 previous errors - -For more information about this error, try `rustc --explain E0277`. -- cgit v1.2.3