Skip to content

Commit ff64b61

Browse files
committed
---
yaml --- r: 273503 b: refs/heads/beta c: ceaf5df h: refs/heads/master i: 273501: c87ed49 273499: 663da1c 273495: 8ad77d6 273487: 54fa17f 273471: 9f6f705
1 parent 7babed6 commit ff64b61

File tree

7 files changed

+7
-118
lines changed

7 files changed

+7
-118
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 38c6593592fbe760aeef1960f4ad2e8ec314143a
26+
refs/heads/beta: ceaf5dfdc11a092128fad4b7d1289c9766a4059e
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/doc/book/drop.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ BOOM times 100!!!
5555
BOOM times 1!!!
5656
```
5757

58-
The TNT goes off before the firecracker does, because it was declared
58+
The `tnt` goes off before the `firecracker` does, because it was declared
5959
afterwards. Last in, first out.
6060

6161
So what is `Drop` good for? Generally, `Drop` is used to clean up any resources

branches/beta/src/libcore/clone.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,6 @@
1818
//! them cheap and safe to copy. For other types copies must be made
1919
//! explicitly, by convention implementing the `Clone` trait and calling
2020
//! the `clone` method.
21-
//!
22-
//! Basic usage example:
23-
//!
24-
//! ```
25-
//! let s = String::new(); // String type implements Clone
26-
//! let copy = s.clone(); // so we can clone it
27-
//! ```
28-
//!
29-
//! To easily implement the Clone trait, you can also use
30-
//! `#[derive(Clone)]`. Example:
31-
//!
32-
//! ```
33-
//! #[derive(Clone)] // we add the Clone trait to Morpheus struct
34-
//! struct Morpheus {
35-
//! blue_pill: f32,
36-
//! red_pill: i64,
37-
//! }
38-
//!
39-
//! fn main() {
40-
//! let f = Morpheus { blue_pill: 0.0, red_pill: 0 };
41-
//! let copy = f.clone(); // and now we can clone it!
42-
//! }
43-
//! ```
4421
4522
#![stable(feature = "rust1", since = "1.0.0")]
4623

branches/beta/src/libstd/io/stdio.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ fn handle_ebadf<T>(r: io::Result<T>, default: T) -> io::Result<T> {
141141
///
142142
/// Each handle is a shared reference to a global buffer of input data to this
143143
/// process. A handle can be `lock`'d to gain full access to [`BufRead`] methods
144-
/// (e.g. `.lines()`). Reads to this handle are otherwise locked with respect
145-
/// to other reads.
144+
/// (e.g. `.lines()`). Writes to this handle are otherwise locked with respect
145+
/// to other writes.
146146
///
147147
/// This handle implements the `Read` trait, but beware that concurrent reads
148148
/// of `Stdin` must be executed with care.

branches/beta/src/libstd/time/mod.rs

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,6 @@
99
// except according to those terms.
1010

1111
//! Temporal quantification.
12-
//!
13-
//! Example:
14-
//!
15-
//! ```
16-
//! use std::time::Duration;
17-
//!
18-
//! let five_seconds = Duration::new(5, 0);
19-
//! // both declarations are equivalent
20-
//! assert_eq!(Duration::new(5, 0), Duration::from_secs(5));
21-
//! ```
2212
2313
#![stable(feature = "time", since = "1.3.0")]
2414

@@ -50,22 +40,6 @@ mod duration;
5040
/// no method to get "the number of seconds" from an instant. Instead, it only
5141
/// allows measuring the duration between two instants (or comparing two
5242
/// instants).
53-
///
54-
/// Example:
55-
///
56-
/// ```no_run
57-
/// use std::time::{Duration, Instant};
58-
/// use std::thread::sleep;
59-
///
60-
/// fn main() {
61-
/// let now = Instant::now();
62-
///
63-
/// // we sleep for 2 seconds
64-
/// sleep(Duration::new(2, 0));
65-
/// // it prints '2'
66-
/// println!("{}", now.elapsed().as_secs());
67-
/// }
68-
/// ```
6943
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
7044
#[stable(feature = "time2", since = "1.8.0")]
7145
pub struct Instant(time::Instant);
@@ -89,30 +63,6 @@ pub struct Instant(time::Instant);
8963
/// information about a `SystemTime`. By calculating the duration from this
9064
/// fixed point in time, a `SystemTime` can be converted to a human-readable time,
9165
/// or perhaps some other string representation.
92-
///
93-
/// Example:
94-
///
95-
/// ```no_run
96-
/// use std::time::{Duration, SystemTime};
97-
/// use std::thread::sleep;
98-
///
99-
/// fn main() {
100-
/// let now = SystemTime::now();
101-
///
102-
/// // we sleep for 2 seconds
103-
/// sleep(Duration::new(2, 0));
104-
/// match now.elapsed() {
105-
/// Ok(elapsed) => {
106-
/// // it prints '2'
107-
/// println!("{}", elapsed.as_secs());
108-
/// }
109-
/// Err(e) => {
110-
/// // an error occured!
111-
/// println!("Error: {:?}", e);
112-
/// }
113-
/// }
114-
/// }
115-
/// ```
11666
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
11767
#[stable(feature = "time2", since = "1.8.0")]
11868
pub struct SystemTime(time::SystemTime);

branches/beta/src/libsyntax/errors/json.rs

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// FIXME spec the JSON output properly.
2121

2222

23-
use codemap::{Span, MultiSpan, CodeMap};
23+
use codemap::{MultiSpan, CodeMap};
2424
use diagnostics::registry::Registry;
2525
use errors::{Level, DiagnosticBuilder, SubDiagnostic, RenderSpan, CodeSuggestion};
2626
use errors::emitter::Emitter;
@@ -99,16 +99,6 @@ struct DiagnosticSpan {
9999
/// 1-based, character offset.
100100
column_start: usize,
101101
column_end: usize,
102-
/// Source text from the start of line_start to the end of line_end.
103-
text: Vec<DiagnosticSpanLine>,
104-
}
105-
106-
#[derive(RustcEncodable)]
107-
struct DiagnosticSpanLine {
108-
text: String,
109-
/// 1-based, character offset in self.text.
110-
highlight_start: usize,
111-
highlight_end: usize,
112102
}
113103

114104
#[derive(RustcEncodable)]
@@ -190,7 +180,6 @@ impl DiagnosticSpan {
190180
line_end: end.line,
191181
column_start: start.col.0 + 1,
192182
column_end: end.col.0 + 1,
193-
text: DiagnosticSpanLine::from_span(span, je),
194183
}
195184
}).collect()
196185
}
@@ -213,7 +202,6 @@ impl DiagnosticSpan {
213202
line_end: end.line,
214203
column_start: 0,
215204
column_end: end.col.0 + 1,
216-
text: DiagnosticSpanLine::from_span(span, je),
217205
}
218206
}).collect()
219207
}
@@ -229,39 +217,13 @@ impl DiagnosticSpan {
229217
line_end: end.line,
230218
column_start: 0,
231219
column_end: 0,
232-
text: DiagnosticSpanLine::from_span(span, je),
233220
}
234221
}).collect()
235222
}
236223
}
237224
}
238225
}
239226

240-
impl DiagnosticSpanLine {
241-
fn from_span(span: &Span, je: &JsonEmitter) -> Vec<DiagnosticSpanLine> {
242-
let lines = match je.cm.span_to_lines(*span) {
243-
Ok(lines) => lines,
244-
Err(_) => {
245-
debug!("unprintable span");
246-
return Vec::new();
247-
}
248-
};
249-
250-
let mut result = Vec::new();
251-
let fm = &*lines.file;
252-
253-
for line in &lines.lines {
254-
result.push(DiagnosticSpanLine {
255-
text: fm.get_line(line.line_index).unwrap().to_owned(),
256-
highlight_start: line.start_col.0 + 1,
257-
highlight_end: line.end_col.0 + 1,
258-
});
259-
}
260-
261-
result
262-
}
263-
}
264-
265227
impl DiagnosticCode {
266228
fn map_opt_string(s: Option<String>, je: &JsonEmitter) -> Option<DiagnosticCode> {
267229
s.map(|s| {

branches/beta/src/test/run-make/json-errors/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ all:
66
cp foo.rs $(TMPDIR)
77
cd $(TMPDIR)
88
-$(RUSTC) -Z unstable-options --error-format=json foo.rs 2>$(LOG)
9-
grep -q '{"message":"unresolved name `y`","code":{"code":"E0425","explanation":"\\nAn unresolved name was used. Example of erroneous codes.*"},"level":"error","spans":\[{"file_name":"foo.rs","byte_start":496,"byte_end":497,"line_start":12,"line_end":12,"column_start":18,"column_end":19,"text":\[{"text":" let x = 42 + y;","highlight_start":18,"highlight_end":19}\]}\],"children":\[\]}' $(LOG)
10-
grep -q '{"message":".*","code":{"code":"E0277","explanation":"\\nYou tried.*"},"level":"error","spans":\[{.*}\],"children":\[{"message":"the .*","code":null,"level":"help","spans":\[{"file_name":"foo.rs","byte_start":504,"byte_end":516,"line_start":14,"line_end":14,"column_start":0,"column_end":0,"text":\[{.*}\]}\],"children":\[\]},{"message":" <u8 as core::ops::Add>","code":null,"level":"help",' $(LOG)
9+
grep -q '{"message":"unresolved name `y`","code":{"code":"E0425","explanation":"\\nAn unresolved name was used. Example of erroneous codes.*"},"level":"error","spans":\[{"file_name":"foo.rs","byte_start":496,"byte_end":497,"line_start":12,"line_end":12,"column_start":18,"column_end":19}\],"children":\[\]}' $(LOG)
10+
grep -q '{"message":".*","code":{"code":"E0277","explanation":"\\nYou tried.*"},"level":"error","spans":\[{.*}\],"children":\[{"message":"the .*","code":null,"level":"help","spans":\[{"file_name":"foo.rs","byte_start":504,"byte_end":516,"line_start":14,"line_end":14,"column_start":0,"column_end":0}\],"children":\[\]},{"message":" <u8 as core::ops::Add>","code":null,"level":"help",' $(LOG)

0 commit comments

Comments
 (0)