File tree Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Expand file tree Collapse file tree 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"),
437437E0752 : include_str!( "./error_codes/E0752.md" ) ,
438438E0753 : include_str!( "./error_codes/E0753.md" ) ,
439439E0754 : include_str!( "./error_codes/E0754.md" ) ,
440+ E0758 : include_str!( "./error_codes/E0758.md" ) ,
440441E0760 : include_str!( "./error_codes/E0760.md" ) ,
441442;
442443// E0006, // merged with E0005
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 @@ -191,7 +191,15 @@ impl<'a> StringReader<'a> {
191191 "unterminated block comment"
192192 } ;
193193 let last_bpos = self . pos ;
194- self . fatal_span_ ( start, last_bpos, msg) . raise ( ) ;
194+ self . sess
195+ . span_diagnostic
196+ . struct_span_fatal_with_code (
197+ self . mk_sp ( start, last_bpos) ,
198+ msg,
199+ error_code ! ( E0758 ) ,
200+ )
201+ . emit ( ) ;
202+ FatalError . raise ( ) ;
195203 }
196204
197205 if is_doc_comment {
You can’t perform that action at this time.
0 commit comments