syntax: Add the Bug Report HOWTO URL to the ICE message

And also reference the bug report HOWTO in CONTRIBUTING.md
This commit is contained in:
Tim Chevalier 2013-10-21 12:10:57 -07:00
parent cf7b9eb51f
commit 5afd760834
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,9 @@
## How to submit a bug report
If you're just reporting a bug, please see:
https://github.com/mozilla/rust/wiki/HOWTO-submit-a-Rust-bug-report
## Pull request procedure ## Pull request procedure
Pull requests should be targeted at Rust's `master` branch. Pull requests should be targeted at Rust's `master` branch.

View File

@ -15,6 +15,9 @@ use std::io;
use std::local_data; use std::local_data;
use extra::term; use extra::term;
static BUG_REPORT_URL: &'static str =
"https://github.com/mozilla/rust/wiki/HOWTO-submit-a-Rust-bug-report";
pub trait Emitter { pub trait Emitter {
fn emit(&self, fn emit(&self,
cmsp: Option<(@codemap::CodeMap, Span)>, cmsp: Option<(@codemap::CodeMap, Span)>,
@ -143,7 +146,8 @@ impl handler for HandlerT {
} }
pub fn ice_msg(msg: &str) -> ~str { pub fn ice_msg(msg: &str) -> ~str {
format!("internal compiler error: {}", msg) format!("internal compiler error: {}\nThis message reflects a bug in the Rust compiler. \
\nWe would appreciate a bug report: {}", msg, BUG_REPORT_URL)
} }
pub fn mk_span_handler(handler: @mut handler, cm: @codemap::CodeMap) pub fn mk_span_handler(handler: @mut handler, cm: @codemap::CodeMap)