Skip to content

made an error message more approachable in rust/library/core/src/str/mod.rs:116 #118252

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion compiler/rustc_ast/src/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ use std::{slice, vec};
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};

use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
/// An owned smart pointer.

/// An owned smart pointer.
pub struct P<T: ?Sized> {
ptr: Box<T>,
}
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/str/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ fn slice_error_fail_rt(s: &str, begin: usize, end: usize) -> ! {
// 2. begin <= end
assert!(
begin <= end,
"begin <= end ({} <= {}) when slicing `{}`{}",
"begin should be <= end ({} is not <= {}) when slicing `{}`{}",
begin,
end,
s_trunc,
Expand Down