Skip to content

Commit c1d6969

Browse files
committed
---
yaml --- r: 79553 b: refs/heads/master c: 82b6ef6 h: refs/heads/master i: 79551: 543e350 v: v3
1 parent 33aff93 commit c1d6969

File tree

5 files changed

+157
-73
lines changed

5 files changed

+157
-73
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: f87578d9fbf37f76fc1ccd3eb92ef24f8b2a0b31
2+
refs/heads/master: 82b6ef66c22ac876cfc319eae7010648468919b9
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: eae327032c775813eeb101233a4f7df24eab0a6a
55
refs/heads/try: ac820906c0e53eab79a98ee64f7231f57c3887b4

trunk/doc/rust.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3385,9 +3385,11 @@ The path to a module consists of the crate name, any parent modules,
33853385
then the module itself, all separated by double colons (`::`). The
33863386
optional log level can be appended to the module path with an equals
33873387
sign (`=`) followed by the log level, from 1 to 4, inclusive. Level 1
3388-
is the error level, 2 is warning, 3 info, and 4 debug. Any logs
3389-
less than or equal to the specified level will be output. If not
3390-
specified then log level 4 is assumed.
3388+
is the error level, 2 is warning, 3 info, and 4 debug. You can also
3389+
use the symbolic constants `error`, `warn`, `info`, and `debug`. Any
3390+
logs less than or equal to the specified level will be output. If not
3391+
specified then log level 4 is assumed. However, debug messages are
3392+
only available if `--cfg=debug` is passed to `rustc`.
33913393

33923394
As an example, to see all the logs generated by the compiler, you would set
33933395
`RUST_LOG` to `rustc`, which is the crate name (as specified in its `link`

trunk/mk/rt.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ export PYTHONPATH := $(PYTHONPATH):$$(S)src/gyp/pylib
178178

179179
$$(LIBUV_MAKEFILE_$(1)_$(2)):
180180
(cd $(S)src/libuv/ && \
181-
./gyp_uv -f make -Dtarget_arch=$$(LIBUV_ARCH_$(1)) -D ninja \
181+
$$(CFG_PYTHON) ./gyp_uv -f make -Dtarget_arch=$$(LIBUV_ARCH_$(1)) -D ninja \
182182
-Goutput_dir=$$(@D) --generator-output $$(@D))
183183

184184
# XXX: Shouldn't need platform-specific conditions here

trunk/src/libstd/repr.rs

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ impl<'self> ReprVisitor<'self> {
178178
pub fn write_escaped_slice(&mut self, slice: &str) {
179179
self.writer.write(['"' as u8]);
180180
for ch in slice.iter() {
181-
self.write_escaped_char(ch, true);
181+
self.write_escaped_char(ch);
182182
}
183183
self.writer.write(['"' as u8]);
184184
}
@@ -230,26 +230,14 @@ impl<'self> ReprVisitor<'self> {
230230
v.fill, inner)
231231
}
232232

233-
fn write_escaped_char(&mut self, ch: char, is_str: bool) {
233+
fn write_escaped_char(&mut self, ch: char) {
234234
match ch {
235235
'\t' => self.writer.write("\\t".as_bytes()),
236236
'\r' => self.writer.write("\\r".as_bytes()),
237237
'\n' => self.writer.write("\\n".as_bytes()),
238238
'\\' => self.writer.write("\\\\".as_bytes()),
239-
'\'' => {
240-
if is_str {
241-
self.writer.write("'".as_bytes())
242-
} else {
243-
self.writer.write("\\'".as_bytes())
244-
}
245-
}
246-
'"' => {
247-
if is_str {
248-
self.writer.write("\\\"".as_bytes())
249-
} else {
250-
self.writer.write("\"".as_bytes())
251-
}
252-
}
239+
'\'' => self.writer.write("\\'".as_bytes()),
240+
'"' => self.writer.write("\\\"".as_bytes()),
253241
'\x20'..'\x7e' => self.writer.write([ch as u8]),
254242
_ => {
255243
do char::escape_unicode(ch) |c| {
@@ -286,7 +274,7 @@ impl<'self> TyVisitor for ReprVisitor<'self> {
286274
fn visit_char(&mut self) -> bool {
287275
do self.get::<char> |this, &ch| {
288276
this.writer.write(['\'' as u8]);
289-
this.write_escaped_char(ch, false);
277+
this.write_escaped_char(ch);
290278
this.writer.write(['\'' as u8]);
291279
}
292280
}
@@ -696,11 +684,6 @@ fn test_repr() {
696684
exact_test(&(10u64, ~"hello"),
697685
"(10u64, ~\"hello\")");
698686

699-
exact_test(&'\'', "'\\''");
700-
exact_test(&'"', "'\"'");
701-
exact_test(&("'"), "\"'\"");
702-
exact_test(&("\""), "\"\\\"\"");
703-
704687
exact_test(&println, "fn(&str)");
705688
exact_test(&swap::<int>, "fn(&mut int, &mut int)");
706689
exact_test(&is_alphabetic, "fn(char) -> bool");

0 commit comments

Comments
 (0)