Skip to content

Commit 757dbba

Browse files
committed
made an error message more approachable in rust/library/core/src/str/mod.rs:116
1 parent 786c94a commit 757dbba

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

compiler/rustc_ast/src/ptr.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ use std::{slice, vec};
2828
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
2929

3030
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
31-
/// An owned smart pointer.
31+
32+
/// An owned smart pointer.
3233
pub struct P<T: ?Sized> {
3334
ptr: Box<T>,
3435
}

library/core/src/str/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ fn slice_error_fail_rt(s: &str, begin: usize, end: usize) -> ! {
113113
// 2. begin <= end
114114
assert!(
115115
begin <= end,
116-
"begin <= end ({} <= {}) when slicing `{}`{}",
116+
"begin should be <= end ({} is not <= {}) when slicing `{}`{}",
117117
begin,
118118
end,
119119
s_trunc,

src/tools/rustfmt/tests/source/extern.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ extern "Rust" { static ext: u32;
4747

4848
extern "C" {
4949
fn syscall(number: libc::c_long /* comment 1 */, /* comm 2 */ ... /* sup? */) -> libc::c_long;
50+
// im doing great! thanks for asking :).
5051

5152
fn foo (x: *const c_char , ... ) ->
5253
libc::c_long;

0 commit comments

Comments
 (0)