mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-29 11:37:39 +00:00
Rollup merge of #76309 - lzutao:indent-note, r=jyn514
Indent a note to make folding work nicer Sublime Text folds code based on indentation. It maybe an unnecessary change, but does it look nicer after that ?
This commit is contained in:
commit
8ff13f4fd2
@ -3357,8 +3357,9 @@ mod private_slice_index {
|
|||||||
on(T = "str", label = "string indices are ranges of `usize`",),
|
on(T = "str", label = "string indices are ranges of `usize`",),
|
||||||
on(
|
on(
|
||||||
all(any(T = "str", T = "&str", T = "std::string::String"), _Self = "{integer}"),
|
all(any(T = "str", T = "&str", T = "std::string::String"), _Self = "{integer}"),
|
||||||
note = "you can use `.chars().nth()` or `.bytes().nth()`
|
note = "you can use `.chars().nth()` or `.bytes().nth()`\n\
|
||||||
see chapter in The Book <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>"
|
for more information, see chapter 8 in The Book: \
|
||||||
|
<https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>"
|
||||||
),
|
),
|
||||||
message = "the type `{T}` cannot be indexed by `{Self}`",
|
message = "the type `{T}` cannot be indexed by `{Self}`",
|
||||||
label = "slice indices are of type `usize` or ranges of `usize`"
|
label = "slice indices are of type `usize` or ranges of `usize`"
|
||||||
|
@ -6,7 +6,7 @@ LL | let _: u8 = s[4];
|
|||||||
|
|
|
|
||||||
= help: the trait `SliceIndex<str>` is not implemented for `{integer}`
|
= help: the trait `SliceIndex<str>` is not implemented for `{integer}`
|
||||||
= note: you can use `.chars().nth()` or `.bytes().nth()`
|
= note: you can use `.chars().nth()` or `.bytes().nth()`
|
||||||
see chapter in The Book <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
|
for more information, see chapter 8 in The Book: <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
|
||||||
= note: required because of the requirements on the impl of `Index<{integer}>` for `str`
|
= note: required because of the requirements on the impl of `Index<{integer}>` for `str`
|
||||||
|
|
||||||
error[E0277]: the type `str` cannot be indexed by `{integer}`
|
error[E0277]: the type `str` cannot be indexed by `{integer}`
|
||||||
@ -17,7 +17,7 @@ LL | let _ = s.get(4);
|
|||||||
|
|
|
|
||||||
= help: the trait `SliceIndex<str>` is not implemented for `{integer}`
|
= help: the trait `SliceIndex<str>` is not implemented for `{integer}`
|
||||||
= note: you can use `.chars().nth()` or `.bytes().nth()`
|
= note: you can use `.chars().nth()` or `.bytes().nth()`
|
||||||
see chapter in The Book <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
|
for more information, see chapter 8 in The Book: <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
|
||||||
|
|
||||||
error[E0277]: the type `str` cannot be indexed by `{integer}`
|
error[E0277]: the type `str` cannot be indexed by `{integer}`
|
||||||
--> $DIR/str-idx.rs:5:29
|
--> $DIR/str-idx.rs:5:29
|
||||||
@ -27,7 +27,7 @@ LL | let _ = s.get_unchecked(4);
|
|||||||
|
|
|
|
||||||
= help: the trait `SliceIndex<str>` is not implemented for `{integer}`
|
= help: the trait `SliceIndex<str>` is not implemented for `{integer}`
|
||||||
= note: you can use `.chars().nth()` or `.bytes().nth()`
|
= note: you can use `.chars().nth()` or `.bytes().nth()`
|
||||||
see chapter in The Book <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
|
for more information, see chapter 8 in The Book: <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
|
||||||
|
|
||||||
error[E0277]: the type `str` cannot be indexed by `char`
|
error[E0277]: the type `str` cannot be indexed by `char`
|
||||||
--> $DIR/str-idx.rs:6:17
|
--> $DIR/str-idx.rs:6:17
|
||||||
|
@ -39,7 +39,7 @@ LL | s.get_mut(1);
|
|||||||
|
|
|
|
||||||
= help: the trait `SliceIndex<str>` is not implemented for `{integer}`
|
= help: the trait `SliceIndex<str>` is not implemented for `{integer}`
|
||||||
= note: you can use `.chars().nth()` or `.bytes().nth()`
|
= note: you can use `.chars().nth()` or `.bytes().nth()`
|
||||||
see chapter in The Book <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
|
for more information, see chapter 8 in The Book: <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
|
||||||
|
|
||||||
error[E0277]: the type `str` cannot be indexed by `{integer}`
|
error[E0277]: the type `str` cannot be indexed by `{integer}`
|
||||||
--> $DIR/str-mut-idx.rs:11:25
|
--> $DIR/str-mut-idx.rs:11:25
|
||||||
@ -49,7 +49,7 @@ LL | s.get_unchecked_mut(1);
|
|||||||
|
|
|
|
||||||
= help: the trait `SliceIndex<str>` is not implemented for `{integer}`
|
= help: the trait `SliceIndex<str>` is not implemented for `{integer}`
|
||||||
= note: you can use `.chars().nth()` or `.bytes().nth()`
|
= note: you can use `.chars().nth()` or `.bytes().nth()`
|
||||||
see chapter in The Book <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
|
for more information, see chapter 8 in The Book: <https://doc.rust-lang.org/book/ch08-02-strings.html#indexing-into-strings>
|
||||||
|
|
||||||
error[E0277]: the type `str` cannot be indexed by `char`
|
error[E0277]: the type `str` cannot be indexed by `char`
|
||||||
--> $DIR/str-mut-idx.rs:13:5
|
--> $DIR/str-mut-idx.rs:13:5
|
||||||
|
Loading…
Reference in New Issue
Block a user