mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-05 19:43:24 +00:00
FIX - broken translatable diagnostics tests
This commit is contained in:
parent
1524b59444
commit
72f766ae71
@ -11,7 +11,9 @@ extern crate rustc_macros;
|
||||
extern crate rustc_session;
|
||||
extern crate rustc_span;
|
||||
|
||||
use rustc_errors::{AddSubdiagnostic, Diagnostic, DiagnosticBuilder, ErrorGuaranteed, Handler, fluent};
|
||||
use rustc_errors::{
|
||||
AddSubdiagnostic, Diagnostic, DiagnosticBuilder, ErrorGuaranteed, Handler, fluent
|
||||
};
|
||||
use rustc_macros::{SessionDiagnostic, SessionSubdiagnostic};
|
||||
use rustc_session::SessionDiagnostic;
|
||||
use rustc_span::Span;
|
||||
|
@ -1,8 +1,8 @@
|
||||
error: diagnostics should be created using translatable messages
|
||||
--> $DIR/diagnostics.rs:37:14
|
||||
--> $DIR/diagnostics.rs:37:17
|
||||
|
|
||||
LL | sess.struct_err("untranslatable diagnostic")
|
||||
| ^^^^^^^^^^
|
||||
LL | handler.struct_err("untranslatable diagnostic")
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/diagnostics.rs:6:9
|
||||
@ -17,10 +17,10 @@ LL | diag.note("untranslatable diagnostic");
|
||||
| ^^^^
|
||||
|
||||
error: diagnostics should only be created in `SessionDiagnostic`/`AddSubdiagnostic` impls
|
||||
--> $DIR/diagnostics.rs:68:22
|
||||
--> $DIR/diagnostics.rs:68:25
|
||||
|
|
||||
LL | let _diag = sess.struct_err(fluent::parser::expect_path);
|
||||
| ^^^^^^^^^^
|
||||
LL | let _diag = handler.struct_err(fluent::parser::expect_path);
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/diagnostics.rs:7:9
|
||||
@ -29,16 +29,16 @@ LL | #![deny(rustc::diagnostic_outside_of_impl)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: diagnostics should only be created in `SessionDiagnostic`/`AddSubdiagnostic` impls
|
||||
--> $DIR/diagnostics.rs:71:22
|
||||
--> $DIR/diagnostics.rs:71:25
|
||||
|
|
||||
LL | let _diag = sess.struct_err("untranslatable diagnostic");
|
||||
| ^^^^^^^^^^
|
||||
LL | let _diag = handler.struct_err("untranslatable diagnostic");
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: diagnostics should be created using translatable messages
|
||||
--> $DIR/diagnostics.rs:71:22
|
||||
--> $DIR/diagnostics.rs:71:25
|
||||
|
|
||||
LL | let _diag = sess.struct_err("untranslatable diagnostic");
|
||||
| ^^^^^^^^^^
|
||||
LL | let _diag = handler.struct_err("untranslatable diagnostic");
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user