Skip to content

Commit 94c8aa6

Browse files
committed
Print to stderr and bless
1 parent c04a2cc commit 94c8aa6

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

src/librustc_errors/annotate_rs_emitter.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,10 @@ impl AnnotateRsEmitterWriter {
204204
if let Some(snippet) = converter.to_annotation_snippet() {
205205
let dl = DisplayList::from(snippet);
206206
let dlf = DisplayListFormatter::new(true);
207-
print!("{}", dlf.format(&dl));
207+
// FIXME(#59346): Figure out if we can _always_ print to stderr or not.
208+
// `emitter.rs` has the `Destination` enum that lists various possible output
209+
// destinations.
210+
eprint!("{}", dlf.format(&dl));
208211
};
209212
}
210213
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// compile-flags: --error-format human-annotate-rs
22

33
pub fn main() {
4-
let x: Iter;
4+
let x: Iter; //~ ERROR cannot find type `Iter` in this scope
55
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
error[E0412]: cannot find type `Iter` in this scope
2+
--> $DIR/missing-type.rs:4:11
3+
|
4+
4 | let x: Iter;
5+
| ^^^^ not found in this scope
6+
|

0 commit comments

Comments
 (0)