Skip to content

Commit 950f569

Browse files
committed
Fix compilation errors.
1 parent 9c11113 commit 950f569

File tree

8 files changed

+13
-39
lines changed

8 files changed

+13
-39
lines changed

Cargo.lock

-9
Original file line numberDiff line numberDiff line change
@@ -5090,14 +5090,6 @@ dependencies = [
50905090
"serde_json",
50915091
]
50925092

5093-
[[package]]
5094-
name = "term"
5095-
version = "0.0.0"
5096-
dependencies = [
5097-
"core",
5098-
"std",
5099-
]
5100-
51015093
[[package]]
51025094
name = "term"
51035095
version = "0.6.1"
@@ -5150,7 +5142,6 @@ dependencies = [
51505142
"panic_unwind",
51515143
"proc_macro",
51525144
"std",
5153-
"term 0.0.0",
51545145
]
51555146

51565147
[[package]]

library/test/src/console.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use super::{
1313
formatters::{JsonFormatter, JunitFormatter, OutputFormatter, PrettyFormatter, TerseFormatter},
1414
helpers::{concurrency::get_concurrency, metrics::MetricMap},
1515
options::{Options, OutputFormat},
16-
run_tests,
16+
run_tests, term,
1717
test_result::TestResult,
1818
time::{TestExecTime, TestSuiteExecTime},
1919
types::{NamePadding, TestDesc, TestDescAndFn},

library/test/src/formatters/pretty.rs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use super::OutputFormatter;
44
use crate::{
55
bench::fmt_bench_samples,
66
console::{ConsoleTestState, OutputLocation},
7+
term,
78
test_result::TestResult,
89
time,
910
types::TestDesc,

library/test/src/formatters/terse.rs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use super::OutputFormatter;
44
use crate::{
55
bench::fmt_bench_samples,
66
console::{ConsoleTestState, OutputLocation},
7+
term,
78
test_result::TestResult,
89
time,
910
types::NamePadding,

library/test/src/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#![crate_name = "test"]
2121
#![unstable(feature = "test", issue = "50297")]
2222
#![doc(test(attr(deny(warnings))))]
23-
#![cfg_attr(unix, feature(libc))]
23+
#![feature(libc)]
2424
#![feature(rustc_private)]
2525
#![feature(nll)]
2626
#![feature(available_concurrency)]
@@ -80,6 +80,7 @@ mod formatters;
8080
mod helpers;
8181
mod options;
8282
pub mod stats;
83+
mod term;
8384
mod test_result;
8485
mod time;
8586
mod types;

library/test/src/term/mod.rs renamed to library/test/src/term.rs

+2-22
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,18 @@
1-
//! Terminal formatting library.
1+
//! Terminal formatting module.
22
//!
3-
//! This crate provides the `Terminal` trait, which abstracts over an [ANSI
3+
//! This module provides the `Terminal` trait, which abstracts over an [ANSI
44
//! Terminal][ansi] to provide color printing, among other things. There are two
55
//! implementations, the `TerminfoTerminal`, which uses control characters from
66
//! a [terminfo][ti] database, and `WinConsole`, which uses the [Win32 Console
77
//! API][win].
88
//!
9-
//! # Examples
10-
//!
11-
//! ```no_run
12-
//! # #![feature(rustc_private)]
13-
//! extern crate term;
14-
//! use std::io::prelude::*;
15-
//!
16-
//! fn main() {
17-
//! let mut t = term::stdout().unwrap();
18-
//!
19-
//! t.fg(term::color::GREEN).unwrap();
20-
//! write!(t, "hello, ").unwrap();
21-
//!
22-
//! t.fg(term::color::RED).unwrap();
23-
//! writeln!(t, "world!").unwrap();
24-
//!
25-
//! assert!(t.reset().unwrap());
26-
//! }
279
//! ```
2810
//!
2911
//! [ansi]: https://en.wikipedia.org/wiki/ANSI_escape_code
3012
//! [win]: https://docs.microsoft.com/en-us/windows/console/character-mode-applications
3113
//! [ti]: https://en.wikipedia.org/wiki/Terminfo
3214
33-
#![doc(html_playground_url = "https://play.rust-lang.org/", test(attr(deny(warnings))))]
3415
#![deny(missing_docs)]
35-
#![cfg_attr(windows, feature(libc))]
3616

3717
use std::io::prelude::*;
3818
use std::io::{self, Stderr, Stdout};

library/test/src/term/terminfo/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ use std::fs::File;
88
use std::io::{self, prelude::*, BufReader};
99
use std::path::Path;
1010

11-
use crate::color;
12-
use crate::Attr;
13-
use crate::Terminal;
11+
use super::color;
12+
use super::Attr;
13+
use super::Terminal;
1414

1515
use parm::{expand, Param, Variables};
1616
use parser::compiled::{msys_terminfo, parse};

library/test/src/term/win.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
use std::io;
66
use std::io::prelude::*;
77

8-
use crate::color;
9-
use crate::Attr;
10-
use crate::Terminal;
8+
use super::color;
9+
use super::Attr;
10+
use super::Terminal;
1111

1212
/// A Terminal implementation that uses the Win32 Console API.
1313
pub struct WinConsole<T> {

0 commit comments

Comments
 (0)