Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to catch_fatal_errors in rustc driver #4545

Merged
merged 2 commits into from
Sep 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,9 @@ You can use tool lints to allow or deny lints from your code, eg.:

pub fn main() {
rustc_driver::init_rustc_env_logger();
rustc_driver::install_ice_hook();
exit(
rustc_driver::report_ices_to_stderr_if_any(move || {
rustc_driver::catch_fatal_errors(move || {
use std::env;

if std::env::args().any(|a| a == "--version" || a == "-V") {
Expand Down
15 changes: 15 additions & 0 deletions tests/ui/ice-4545.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
fn repro() {
trait Foo {
type Bar;
}

#[allow(dead_code)]
struct Baz<T: Foo> {
field: T::Bar,
}
}

fn main() {
repro();
}