@@ -100,7 +100,7 @@ class ErrorSinkCompiler : ErrorSink
100100 }
101101
102102 // SourceLoc-taking entry points used directly by `error(filename,linnum,...)`,
103- // `errorBackend`, `tip()` and supplemental sites; also called by the Loc
103+ // `errorBackend` and supplemental sites; also called by the Loc
104104 // overloads above.
105105
106106 final void verror (const SourceLoc loc, const (char )* format, va_list ap)
@@ -175,13 +175,6 @@ class ErrorSinkCompiler : ErrorSink
175175 emit(loc, format, ap, ErrorKind.message, false , false );
176176 }
177177
178- final void vtip (const (char )* format, va_list ap)
179- {
180- if (global.gag)
181- return ;
182- emit(SourceLoc.init, format, ap, ErrorKind.tip, false , false );
183- }
184-
185178 final void verrorSupplemental (const SourceLoc loc, const (char )* format, va_list ap)
186179 {
187180 if (global.gag)
@@ -233,7 +226,7 @@ class ErrorSinkCompiler : ErrorSink
233226 * loc = location of the diagnostic
234227 * format = printf-style format string
235228 * ap = arguments for `format`
236- * kind = error / warning / deprecation / tip / message
229+ * kind = error / warning / deprecation / message
237230 * supplemental = follow-on note, not a primary diagnostic
238231 * gagged = diagnostic occurred under speculative gagging
239232 */
@@ -269,7 +262,6 @@ private Classification classificationFor(ErrorKind kind) @safe @nogc pure nothro
269262 case ErrorKind.error: return Classification.error;
270263 case ErrorKind.warning: return Classification.warning;
271264 case ErrorKind.deprecation: return Classification.deprecation;
272- case ErrorKind.tip: return Classification.tip;
273265 case ErrorKind.message: return Classification.error; // unused (handled above)
274266 }
275267}
@@ -284,7 +276,6 @@ enum Classification : Color
284276 gagged = Color.brightBlue, // / for gagged errors
285277 warning = Color.brightYellow, // / for warnings
286278 deprecation = Color.brightCyan, // / for deprecations
287- tip = Color.brightGreen, // / for tip messages
288279}
289280
290281
@@ -573,30 +564,6 @@ alias DiagnosticHandler = bool delegate(const ref SourceLoc location, Color head
573564 */
574565__gshared DiagnosticHandler diagnosticHandler;
575566
576- /**
577- * Print a tip message with the prefix and highlighting.
578- * Params:
579- * format = printf-style format specification
580- * ... = printf-style variadic arguments
581- */
582- static if (__VERSION__ < 2092 )
583- extern (C++ ) void tip(const (char )* format, ... )
584- {
585- va_list ap;
586- va_start(ap, format);
587- global.errorSink.vtip(format, ap);
588- va_end(ap);
589- }
590- else
591- pragma (printf) extern (C++ ) void tip(const (char )* format, ... )
592- {
593- va_list ap;
594- va_start(ap, format);
595- global.errorSink.vtip(format, ap);
596- va_end(ap);
597- }
598-
599-
600567// Encapsulates a diagnostic as described by its location, format message, and kind.
601568private struct DiagnosticContext
602569{
@@ -636,7 +603,6 @@ private void printDiagnostic(const(char)* format, va_list ap, ref DiagnosticCont
636603 case ErrorKind.error: header = " Error: " ; break ;
637604 case ErrorKind.deprecation: header = " Deprecation: " ; break ;
638605 case ErrorKind.warning: header = " Warning: " ; break ;
639- case ErrorKind.tip: header = " Tip: " ; break ;
640606 case ErrorKind.message: assert (0 );
641607 }
642608 }
0 commit comments