Skip to content

Commit b3077fb

Browse files
authored
Rollup merge of rust-lang#107838 - estebank:terminal_hyperlinks, r=nagisa
Introduce `-Zterminal-urls` to use OSC8 for error codes Terminals supporting the OSC8 Hyperlink Extension can support inline anchors where the text is user defineable but clicking on it opens a browser to a specified URLs, just like `<a href="URL">` does in HTML. https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
2 parents 863e96d + 374c393 commit b3077fb

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

clippy_lints/src/doc.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use rustc_ast::token::CommentKind;
1111
use rustc_data_structures::fx::FxHashSet;
1212
use rustc_data_structures::sync::Lrc;
1313
use rustc_errors::emitter::EmitterWriter;
14-
use rustc_errors::{Applicability, Handler, SuggestionStyle};
14+
use rustc_errors::{Applicability, Handler, SuggestionStyle, TerminalUrl};
1515
use rustc_hir as hir;
1616
use rustc_hir::intravisit::{self, Visitor};
1717
use rustc_hir::{AnonConst, Expr};
@@ -717,6 +717,7 @@ fn check_code(cx: &LateContext<'_>, text: &str, edition: Edition, span: Span) {
717717
None,
718718
false,
719719
false,
720+
TerminalUrl::No,
720721
);
721722
let handler = Handler::with_emitter(false, None, Box::new(emitter));
722723
let sess = ParseSess::with_span_handler(handler, sm);

src/driver.rs

+1
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ fn report_clippy_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) {
220220
None,
221221
false,
222222
false,
223+
rustc_errors::TerminalUrl::No,
223224
));
224225
let handler = rustc_errors::Handler::with_emitter(true, None, emitter);
225226

0 commit comments

Comments
 (0)