about summary refs log tree commit diff
path: root/tests/ui/str
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2024-10-24 22:38:50 +0000
committerEsteban Küber <esteban@kuber.com.ar>2024-11-02 03:08:04 +0000
commit7b9105dd8865ef10ef8d5f2f7bc3da180aec9dd2 (patch)
tree1904cc4834cb273b115469fb5e49b1007ca4285e /tests/ui/str
parentb7fc1a743122e3c45f105a5d1169a042a2c6e8bf (diff)
downloadrust-7b9105dd8865ef10ef8d5f2f7bc3da180aec9dd2.tar.gz
rust-7b9105dd8865ef10ef8d5f2f7bc3da180aec9dd2.zip
Trim output of E0277 in some cases
Remove default note for "trait is not implemented" in favor of the
more colorful diff output from the previous commit. Removes
duplicated output.
Diffstat (limited to 'tests/ui/str')
-rw-r--r--tests/ui/str/str-idx.stderr3
-rw-r--r--tests/ui/str/str-mut-idx.stderr3
2 files changed, 0 insertions, 6 deletions
diff --git a/tests/ui/str/str-idx.stderr b/tests/ui/str/str-idx.stderr
index 0ce0c207561..bedbbd9cb50 100644
--- a/tests/ui/str/str-idx.stderr
+++ b/tests/ui/str/str-idx.stderr
@@ -4,7 +4,6 @@ error[E0277]: the type `str` cannot be indexed by `{integer}`
 LL |     let _: u8 = s[4];
    |                   ^ string indices are ranges of `usize`
    |
-   = help: the trait `SliceIndex<str>` is not implemented for `{integer}`
    = note: you can use `.chars().nth()` or `.bytes().nth()`
            for more information, see chapter 8 in The Book: <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
    = help: the trait `SliceIndex<str>` is not implemented for `{integer}`
@@ -20,7 +19,6 @@ LL |     let _ = s.get(4);
    |               |
    |               required by a bound introduced by this call
    |
-   = help: the trait `SliceIndex<str>` is not implemented for `{integer}`
    = note: you can use `.chars().nth()` or `.bytes().nth()`
            for more information, see chapter 8 in The Book: <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
    = help: the trait `SliceIndex<str>` is not implemented for `{integer}`
@@ -37,7 +35,6 @@ LL |     let _ = s.get_unchecked(4);
    |               |
    |               required by a bound introduced by this call
    |
-   = help: the trait `SliceIndex<str>` is not implemented for `{integer}`
    = note: you can use `.chars().nth()` or `.bytes().nth()`
            for more information, see chapter 8 in The Book: <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
    = help: the trait `SliceIndex<str>` is not implemented for `{integer}`
diff --git a/tests/ui/str/str-mut-idx.stderr b/tests/ui/str/str-mut-idx.stderr
index 7bc46ff33b3..f09a4c329e5 100644
--- a/tests/ui/str/str-mut-idx.stderr
+++ b/tests/ui/str/str-mut-idx.stderr
@@ -31,7 +31,6 @@ LL |     s[1usize] = bot();
    |       ^^^^^^ string indices are ranges of `usize`
    |
    = help: the trait `SliceIndex<str>` is not implemented for `usize`
-   = help: the trait `SliceIndex<str>` is not implemented for `usize`
            but trait `SliceIndex<[_]>` is implemented for it
    = help: for that trait implementation, expected `[_]`, found `str`
    = note: required for `str` to implement `Index<usize>`
@@ -44,7 +43,6 @@ LL |     s.get_mut(1);
    |       |
    |       required by a bound introduced by this call
    |
-   = help: the trait `SliceIndex<str>` is not implemented for `{integer}`
    = note: you can use `.chars().nth()` or `.bytes().nth()`
            for more information, see chapter 8 in The Book: <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
    = help: the trait `SliceIndex<str>` is not implemented for `{integer}`
@@ -61,7 +59,6 @@ LL |     s.get_unchecked_mut(1);
    |       |
    |       required by a bound introduced by this call
    |
-   = help: the trait `SliceIndex<str>` is not implemented for `{integer}`
    = note: you can use `.chars().nth()` or `.bytes().nth()`
            for more information, see chapter 8 in The Book: <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
    = help: the trait `SliceIndex<str>` is not implemented for `{integer}`