Skip to content

Commit 5afd760

Browse files
committed
syntax: Add the Bug Report HOWTO URL to the ICE message
And also reference the bug report HOWTO in CONTRIBUTING.md
1 parent cf7b9eb commit 5afd760

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

CONTRIBUTING.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## How to submit a bug report
2+
3+
If you're just reporting a bug, please see:
4+
5+
https://github.com/mozilla/rust/wiki/HOWTO-submit-a-Rust-bug-report
6+
17
## Pull request procedure
28

39
Pull requests should be targeted at Rust's `master` branch.

src/libsyntax/diagnostic.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ use std::io;
1515
use std::local_data;
1616
use extra::term;
1717

18+
static BUG_REPORT_URL: &'static str =
19+
"https://github.com/mozilla/rust/wiki/HOWTO-submit-a-Rust-bug-report";
20+
1821
pub trait Emitter {
1922
fn emit(&self,
2023
cmsp: Option<(@codemap::CodeMap, Span)>,
@@ -143,7 +146,8 @@ impl handler for HandlerT {
143146
}
144147
145148
pub fn ice_msg(msg: &str) -> ~str {
146-
format!("internal compiler error: {}", msg)
149+
format!("internal compiler error: {}\nThis message reflects a bug in the Rust compiler. \
150+
\nWe would appreciate a bug report: {}", msg, BUG_REPORT_URL)
147151
}
148152

149153
pub fn mk_span_handler(handler: @mut handler, cm: @codemap::CodeMap)

0 commit comments

Comments
 (0)