File tree 3 files changed +30
-1
lines changed
3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -437,6 +437,7 @@ E0751: include_str!("./error_codes/E0751.md"),
437
437
E0752 : include_str!( "./error_codes/E0752.md" ) ,
438
438
E0753 : include_str!( "./error_codes/E0753.md" ) ,
439
439
E0754 : include_str!( "./error_codes/E0754.md" ) ,
440
+ E0758 : include_str!( "./error_codes/E0758.md" ) ,
440
441
;
441
442
// E0006, // merged with E0005
442
443
// E0008, // cannot bind by-move into a pattern guard
Original file line number Diff line number Diff line change
1
+ A multi-line (doc-)comment is unterminated.
2
+
3
+ Erroneous code example:
4
+
5
+ ``` compile_fail,E0758
6
+ /* I am not terminated!
7
+ ```
8
+
9
+ The same goes for doc comments:
10
+
11
+ ``` compile_fail,E0758
12
+ /*! I am not terminated!
13
+ ```
14
+
15
+ You need to end your multi-line comment with ` */ ` in order to fix this error:
16
+
17
+ ```
18
+ /* I am terminated! */
19
+ /*! I am also terminated! */
20
+ ```
Original file line number Diff line number Diff line change @@ -204,7 +204,15 @@ impl<'a> StringReader<'a> {
204
204
"unterminated block comment"
205
205
} ;
206
206
let last_bpos = self . pos ;
207
- self . fatal_span_ ( start, last_bpos, msg) . raise ( ) ;
207
+ self . sess
208
+ . span_diagnostic
209
+ . struct_span_fatal_with_code (
210
+ self . mk_sp ( start, last_bpos) ,
211
+ msg,
212
+ error_code ! ( E0758 ) ,
213
+ )
214
+ . emit ( ) ;
215
+ FatalError . raise ( ) ;
208
216
}
209
217
210
218
if is_doc_comment {
You can’t perform that action at this time.
0 commit comments