Skip to content

Commit bd59a5b

Browse files
committed
---
yaml --- r: 235355 b: refs/heads/stable c: 9e96982 h: refs/heads/master i: 235353: 95906fe 235351: 27894e9 v: v3
1 parent d1037cf commit bd59a5b

File tree

15 files changed

+69
-229
lines changed

15 files changed

+69
-229
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: ad930f4145b73b031280795e394da815b10d9c4e
32+
refs/heads/stable: 9e9698213c84cc7318190208b10e787185ac4070
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/mk/cfg/i686-unknown-freebsd.mk

Lines changed: 0 additions & 22 deletions
This file was deleted.

branches/stable/src/libcollections/vec_deque.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ impl<T> VecDeque<T> {
108108
ptr::write(self.ptr.offset(off as isize), t);
109109
}
110110

111-
/// Returns true if and only if the buffer is at capacity
111+
/// Returns true iff the buffer is at capacity
112112
#[inline]
113113
fn is_full(&self) -> bool { self.cap - self.len() == 1 }
114114

branches/stable/src/libcore/fmt/builders.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,6 @@ impl<'a, 'b: 'a> DebugTuple<'a, 'b> {
175175
fn is_pretty(&self) -> bool {
176176
self.fmt.flags() & (1 << (FlagV1::Alternate as usize)) != 0
177177
}
178-
179-
/// Returns the wrapped `Formatter`.
180-
#[unstable(feature = "debug_builder_formatter", reason = "recently added")]
181-
pub fn formatter(&mut self) -> &mut fmt::Formatter<'b> {
182-
&mut self.fmt
183-
}
184178
}
185179

186180
struct DebugInner<'a, 'b: 'a> {

branches/stable/src/libcore/fmt/mod.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,19 +1488,20 @@ macro_rules! tuple {
14881488
impl<$($name:Debug),*> Debug for ($($name,)*) {
14891489
#[allow(non_snake_case, unused_assignments)]
14901490
fn fmt(&self, f: &mut Formatter) -> Result {
1491-
let mut builder = f.debug_tuple("");
1491+
try!(write!(f, "("));
14921492
let ($(ref $name,)*) = *self;
14931493
let mut n = 0;
14941494
$(
1495-
builder.field($name);
1495+
if n > 0 {
1496+
try!(write!(f, ", "));
1497+
}
1498+
try!(write!(f, "{:?}", *$name));
14961499
n += 1;
14971500
)*
1498-
14991501
if n == 1 {
1500-
try!(write!(builder.formatter(), ","));
1502+
try!(write!(f, ","));
15011503
}
1502-
1503-
builder.finish()
1504+
write!(f, ")")
15041505
}
15051506
}
15061507
peel! { $($name,)* }

branches/stable/src/libcore/num/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,7 @@ macro_rules! uint_impl {
11261126
acc
11271127
}
11281128

1129-
/// Returns `true` if and only if `self == 2^k` for some `k`.
1129+
/// Returns `true` iff `self == 2^k` for some `k`.
11301130
#[stable(feature = "rust1", since = "1.0.0")]
11311131
#[inline]
11321132
pub fn is_power_of_two(self) -> bool {

branches/stable/src/liblibc/lib.rs

Lines changed: 0 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -960,100 +960,6 @@ pub mod types {
960960
}
961961
}
962962

963-
#[cfg(target_arch = "x86")]
964-
pub mod arch {
965-
pub mod c95 {
966-
pub type c_char = i8;
967-
pub type c_schar = i8;
968-
pub type c_uchar = u8;
969-
pub type c_short = i16;
970-
pub type c_ushort = u16;
971-
pub type c_int = i32;
972-
pub type c_uint = u32;
973-
pub type c_long = i32;
974-
pub type c_ulong = u32;
975-
pub type c_float = f32;
976-
pub type c_double = f64;
977-
pub type size_t = u32;
978-
pub type ptrdiff_t = i32;
979-
pub type clock_t = i32;
980-
pub type time_t = i32;
981-
pub type suseconds_t = i32;
982-
pub type wchar_t = i32;
983-
}
984-
pub mod c99 {
985-
pub type c_longlong = i64;
986-
pub type c_ulonglong = u64;
987-
pub type intptr_t = i32;
988-
pub type uintptr_t = u32;
989-
pub type intmax_t = i64;
990-
pub type uintmax_t = u64;
991-
}
992-
pub mod posix88 {
993-
pub type off_t = i64;
994-
pub type dev_t = u32;
995-
pub type ino_t = u32;
996-
pub type pid_t = i32;
997-
pub type uid_t = u32;
998-
pub type gid_t = u32;
999-
pub type useconds_t = u32;
1000-
pub type mode_t = u16;
1001-
pub type ssize_t = i32;
1002-
}
1003-
pub mod posix01 {
1004-
use types::common::c95::{c_void};
1005-
use types::common::c99::{uint8_t, uint32_t, int32_t};
1006-
use types::os::arch::c95::{c_long, time_t};
1007-
use types::os::arch::posix88::{dev_t, gid_t, ino_t};
1008-
use types::os::arch::posix88::{mode_t, off_t};
1009-
use types::os::arch::posix88::{uid_t};
1010-
1011-
pub type nlink_t = u16;
1012-
pub type blksize_t = i32;
1013-
pub type blkcnt_t = i64;
1014-
pub type fflags_t = u32;
1015-
#[repr(C)]
1016-
#[derive(Copy, Clone)] pub struct stat {
1017-
pub st_dev: dev_t,
1018-
pub st_ino: ino_t,
1019-
pub st_mode: mode_t,
1020-
pub st_nlink: nlink_t,
1021-
pub st_uid: uid_t,
1022-
pub st_gid: gid_t,
1023-
pub st_rdev: dev_t,
1024-
pub st_atime: time_t,
1025-
pub st_atime_nsec: c_long,
1026-
pub st_mtime: time_t,
1027-
pub st_mtime_nsec: c_long,
1028-
pub st_ctime: time_t,
1029-
pub st_ctime_nsec: c_long,
1030-
pub st_size: off_t,
1031-
pub st_blocks: blkcnt_t,
1032-
pub st_blksize: blksize_t,
1033-
pub st_flags: fflags_t,
1034-
pub st_gen: uint32_t,
1035-
pub st_lspare: int32_t,
1036-
pub st_birthtime: time_t,
1037-
pub st_birthtime_nsec: c_long,
1038-
pub __unused: [uint8_t; 2],
1039-
}
1040-
1041-
#[repr(C)]
1042-
#[derive(Copy, Clone)] pub struct utimbuf {
1043-
pub actime: time_t,
1044-
pub modtime: time_t,
1045-
}
1046-
1047-
pub type pthread_attr_t = *mut c_void;
1048-
}
1049-
pub mod posix08 {
1050-
}
1051-
pub mod bsd44 {
1052-
}
1053-
pub mod extra {
1054-
}
1055-
}
1056-
1057963
#[cfg(target_arch = "x86_64")]
1058964
pub mod arch {
1059965
pub mod c95 {

branches/stable/src/librustc_back/target/i686_unknown_freebsd.rs

Lines changed: 0 additions & 29 deletions
This file was deleted.

branches/stable/src/librustc_back/target/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,6 @@ impl Target {
368368
arm_linux_androideabi,
369369
aarch64_linux_android,
370370

371-
i686_unknown_freebsd,
372371
x86_64_unknown_freebsd,
373372

374373
i686_unknown_dragonfly,

branches/stable/src/librustdoc/html/layout.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ r##"<!DOCTYPE html>
7272
<div class="search-container">
7373
<input class="search-input" name="search"
7474
autocomplete="off"
75-
placeholder="Click or press ‘S’ to search, ‘?’ for more options"
75+
placeholder="Click or press 'S' to search, '?' for more options..."
7676
type="search">
7777
</div>
7878
</form>
@@ -85,7 +85,7 @@ r##"<!DOCTYPE html>
8585
8686
<div id="help" class="hidden">
8787
<div class="shortcuts">
88-
<h1>Keyboard Shortcuts</h1>
88+
<h1>Keyboard shortcuts</h1>
8989
<dl>
9090
<dt>?</dt>
9191
<dd>Show this help dialog</dd>
@@ -100,7 +100,7 @@ r##"<!DOCTYPE html>
100100
</dl>
101101
</div>
102102
<div class="infos">
103-
<h1>Search Tricks</h1>
103+
<h1>Search tricks</h1>
104104
<p>
105105
Prefix searches with a type followed by a colon (e.g.
106106
<code>fn:</code>) to restrict the search to a given type.

branches/stable/src/librustdoc/html/static/main.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ tr.result span.primitive::after { content: ' (primitive type)'; font-style: ital
447447

448448
#help {
449449
background: #e9e9e9;
450+
border-radius: 4px;
450451
box-shadow: 0 0 6px rgba(0,0,0,.2);
451452
position: absolute;
452453
top: 300px;
@@ -460,7 +461,7 @@ tr.result span.primitive::after { content: ' (primitive type)'; font-style: ital
460461

461462
#help dt {
462463
float: left;
463-
border-radius: 4px;
464+
border-radius: 3px;
464465
border: 1px solid #bfbfbf;
465466
background: #fff;
466467
width: 23px;

branches/stable/src/librustdoc/html/static/main.js

Lines changed: 44 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -76,65 +76,62 @@
7676
highlightSourceLines(null);
7777
$(window).on('hashchange', highlightSourceLines);
7878

79-
// Gets the human-readable string for the virtual-key code of the
80-
// given KeyboardEvent, ev.
79+
// Helper function for Keyboard events,
80+
// Get's the char from the keypress event
8181
//
82-
// This function is meant as a polyfill for KeyboardEvent#key,
83-
// since it is not supported in Trident. We also test for
84-
// KeyboardEvent#keyCode because the handleShortcut handler is
85-
// also registered for the keydown event, because Blink doesn't fire
86-
// keypress on hitting the Escape key.
82+
// This method is used because e.wich === x is not
83+
// compatible with non-english keyboard layouts
8784
//
88-
// So I guess you could say things are getting pretty interoperable.
89-
function getVirtualKey(ev) {
90-
if ("key" in ev && typeof ev.key != "undefined")
91-
return ev.key;
92-
93-
var c = ev.charCode || ev.keyCode;
94-
if (c == 27)
95-
return "Escape";
96-
return String.fromCharCode(c);
85+
// Note: event.type must be keypress !
86+
function getChar(event) {
87+
if (event.which == null) {
88+
return String.fromCharCode(event.keyCode) // IE
89+
} else if (event.which!=0 && event.charCode!=0) {
90+
return String.fromCharCode(event.which) // the rest
91+
} else {
92+
return null // special key
93+
}
9794
}
9895

99-
function handleShortcut(ev) {
100-
if (document.activeElement.tagName == "INPUT")
96+
$(document).on('keypress', function handleKeyboardShortcut(e) {
97+
if (document.activeElement.tagName === 'INPUT') {
10198
return;
99+
}
102100

103-
switch (getVirtualKey(ev)) {
104-
case "Escape":
105-
if (!$("#help").hasClass("hidden")) {
106-
ev.preventDefault();
107-
$("#help").addClass("hidden");
108-
} else if (!$("#search").hasClass("hidden")) {
109-
ev.preventDefault();
110-
$("#search").addClass("hidden");
111-
$("#main").removeClass("hidden");
112-
}
113-
break;
114-
115-
case "s":
116-
case "S":
117-
ev.preventDefault();
118-
$(".search-input").focus();
119-
break;
120-
121-
case "?":
122-
if (ev.shiftKey && $("#help").hasClass("hidden")) {
123-
ev.preventDefault();
124-
$("#help").removeClass("hidden");
101+
if (getChar(e) === '?') {
102+
if (e.shiftKey && $('#help').hasClass('hidden')) {
103+
e.preventDefault();
104+
$('#help').removeClass('hidden');
125105
}
126-
break;
106+
} else if (getChar(e) === 's' || getChar(e) === 'S') {
107+
e.preventDefault();
108+
$('.search-input').focus();
109+
}
110+
}).on('keydown', function(e) {
111+
// The escape key event has to be captured with the keydown event.
112+
// Because keypressed has no keycode for the escape key
113+
// (and other special keys in general)...
114+
if (document.activeElement.tagName === 'INPUT') {
115+
return;
127116
}
128-
}
129117

130-
$(document).on("keypress", handleShortcut);
131-
$(document).on("keydown", handleShortcut);
132-
$(document).on("click", function(ev) {
133-
if (!$(ev.target).closest("#help").length) {
134-
$("#help").addClass("hidden");
118+
if (e.keyCode === 27) { // escape key
119+
if (!$('#help').hasClass('hidden')) {
120+
e.preventDefault();
121+
$('#help').addClass('hidden');
122+
} else if (!$('#search').hasClass('hidden')) {
123+
e.preventDefault();
124+
$('#search').addClass('hidden');
125+
$('#main').removeClass('hidden');
126+
}
127+
}
128+
}).on('click', function(e) {
129+
if (!$(e.target).closest('#help').length) {
130+
$('#help').addClass('hidden');
135131
}
136132
});
137133

134+
138135
$('.version-selector').on('change', function() {
139136
var i, match,
140137
url = document.location.href,
@@ -153,7 +150,6 @@
153150

154151
document.location.href = url;
155152
});
156-
157153
/**
158154
* A function to compute the Levenshtein distance between two strings
159155
* Licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported

branches/stable/src/librustdoc/html/static/playpen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ document.addEventListener('DOMContentLoaded', function() {
1717
}
1818

1919
var featureRegexp = new RegExp('^\s*#!\\[feature\\(\.*?\\)\\]');
20-
var elements = document.querySelectorAll('pre.rust');
20+
var elements = document.querySelectorAll('pre.rust-example-rendered');
2121

2222
Array.prototype.forEach.call(elements, function(el) {
2323
el.onmouseover = function(e) {

0 commit comments

Comments
 (0)