Skip to content

Commit 78dfacd

Browse files
committed
rustc: Add long diagnostics for E0152
1 parent af1c39c commit 78dfacd

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/librustc/diagnostics.rs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,20 @@ reference when using guards or refactor the entire expression, perhaps by
112112
putting the condition inside the body of the arm.
113113
"##,
114114

115+
E0152: r##"
116+
Lang items are already implemented in the standard library. Unless you are
117+
writing a free-standing application (e.g. a kernel), you do not need to provide
118+
them yourself.
119+
120+
You can build a free-standing crate by adding `#![no_std]` to the crate
121+
attributes:
122+
123+
#![feature(no_std)]
124+
#![no_std]
125+
126+
See also https://doc.rust-lang.org/book/no-stdlib.html
127+
"##,
128+
115129
E0162: r##"
116130
An if-let pattern attempts to match the pattern, and enters the body if the
117131
match was succesful. If the match is irrefutable (when it cannot fail to match),
@@ -256,7 +270,6 @@ register_diagnostics! {
256270
E0137,
257271
E0138,
258272
E0139,
259-
E0152,
260273
E0158,
261274
E0161,
262275
E0170,

0 commit comments

Comments
 (0)