Skip to content

Commit 57633b2

Browse files
Rollup merge of #152140 - bjorn3:driver_fixed_error_codes, r=jdonszelmann
Hard code the error code registry for custom drivers And do some cleanups enabled by this.
2 parents 5d1ae59 + 3cee5c8 commit 57633b2

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

examples/rustc-interface-example.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@
44

55
extern crate rustc_driver;
66
extern crate rustc_error_codes;
7-
extern crate rustc_errors;
87
extern crate rustc_hash;
98
extern crate rustc_hir;
109
extern crate rustc_interface;
1110
extern crate rustc_session;
1211
extern crate rustc_span;
1312

14-
use rustc_errors::registry;
1513
use rustc_hash::FxHashMap;
1614
use rustc_session::config;
1715

@@ -50,8 +48,6 @@ fn main() {
5048
//
5149
// The second parameter is local providers and the third parameter is external providers.
5250
override_queries: None, // Option<fn(&Session, &mut ty::query::Providers<'_>, &mut ty::query::Providers<'_>)>
53-
// Registry of diagnostics codes.
54-
registry: registry::Registry::new(rustc_errors::codes::DIAGNOSTICS),
5551
make_codegen_backend: None,
5652
expanded_args: Vec::new(),
5753
ice_file: None,

examples/rustc-interface-getting-diagnostics.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern crate rustc_span;
1515
use std::sync::{Arc, Mutex};
1616

1717
use rustc_errors::emitter::Emitter;
18-
use rustc_errors::registry::{self, Registry};
18+
use rustc_errors::registry::Registry;
1919
use rustc_errors::translation::Translate;
2020
use rustc_errors::{DiagInner, FluentBundle};
2121
use rustc_session::config;
@@ -76,7 +76,6 @@ fn main() {
7676
})),
7777
register_lints: None,
7878
override_queries: None,
79-
registry: registry::Registry::new(rustc_errors::codes::DIAGNOSTICS),
8079
make_codegen_backend: None,
8180
expanded_args: Vec::new(),
8281
ice_file: None,

0 commit comments

Comments
 (0)