Skip to content

Commit 30d5c85

Browse files
committed
---
yaml --- r: 235955 b: refs/heads/stable c: 3a12b4c h: refs/heads/master i: 235953: 97e8856 235951: f39f84c v: v3
1 parent e36e9d4 commit 30d5c85

File tree

99 files changed

+7322
-1067
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+7322
-1067
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: 78bf4b6ff68420a718e8b0ed6b3016d1cf395083
32+
refs/heads/stable: 3a12b4c4f805f66d223861d4be232112c2982a0e
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@
66
*.rs rust
77
src/etc/pkg/rust-logo.ico binary
88
src/etc/pkg/rust-logo.png binary
9+
src/rt/msvc/* -whitespace
10+
src/rt/valgrind/* -whitespace
911
*.woff binary

branches/stable/src/doc/trpl/compiler-plugins.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ fn expand_rn(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree])
6161
("I", 1)];
6262
6363
let text = match args {
64-
[TtToken(_, token::Ident(s, _))] => s.to_string(),
64+
[TtToken(_, token::Ident(s, _))] => token::get_ident(s).to_string(),
6565
_ => {
6666
cx.span_err(sp, "argument should be a single identifier");
6767
return DummyResult::any(sp);
@@ -186,7 +186,8 @@ impl LintPass for Pass {
186186
}
187187
188188
fn check_item(&mut self, cx: &Context, it: &ast::Item) {
189-
if it.ident.name == "lintme" {
189+
let name = token::get_ident(it.ident);
190+
if name.get() == "lintme" {
190191
cx.span_lint(TEST_LINT, it.span, "item is named 'lintme'");
191192
}
192193
}

branches/stable/src/libcollections/str.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ impl str {
425425
since = "1.0.0")]
426426
#[unstable(feature = "unicode",
427427
reason = "this functionality may only be provided by libunicode")]
428+
#[inline]
428429
pub fn width(&self, is_cjk: bool) -> usize {
429430
UnicodeStr::width(self, is_cjk)
430431
}
@@ -459,6 +460,7 @@ impl str {
459460
with the existence of the char_indices iterator or \
460461
this method may want to be replaced with checked \
461462
slicing")]
463+
#[inline]
462464
pub fn is_char_boundary(&self, index: usize) -> bool {
463465
core_str::StrExt::is_char_boundary(self, index)
464466
}
@@ -514,6 +516,7 @@ impl str {
514516
/// }
515517
/// ```
516518
#[stable(feature = "rust1", since = "1.0.0")]
519+
#[inline]
517520
pub unsafe fn slice_unchecked(&self, begin: usize, end: usize) -> &str {
518521
core_str::StrExt::slice_unchecked(self, begin, end)
519522
}
@@ -522,6 +525,7 @@ impl str {
522525
///
523526
/// Same as `slice_unchecked`, but works with `&mut str` instead of `&str`.
524527
#[unstable(feature = "str_slice_mut", reason = "recently added")]
528+
#[inline]
525529
pub unsafe fn slice_mut_unchecked(&mut self, begin: usize, end: usize) -> &mut str {
526530
core_str::StrExt::slice_mut_unchecked(self, begin, end)
527531
}
@@ -556,6 +560,7 @@ impl str {
556560
#[deprecated(since = "1.3.0",
557561
reason = "can be implemented with char_indices and \
558562
hasn't seen enough use to justify inclusion")]
563+
#[inline]
559564
pub fn slice_chars(&self, begin: usize, end: usize) -> &str {
560565
core_str::StrExt::slice_chars(self, begin, end)
561566
}
@@ -608,6 +613,7 @@ impl str {
608613
reason = "often replaced by char_indices, this method may \
609614
be removed in favor of just char_at() or eventually \
610615
removed altogether")]
616+
#[inline]
611617
pub fn char_range_at(&self, start: usize) -> CharRange {
612618
core_str::StrExt::char_range_at(self, start)
613619
}
@@ -665,6 +671,7 @@ impl str {
665671
reason = "often replaced by char_indices, this method may \
666672
be removed in favor of just char_at_reverse() or \
667673
eventually removed altogether")]
674+
#[inline]
668675
pub fn char_range_at_reverse(&self, start: usize) -> CharRange {
669676
core_str::StrExt::char_range_at_reverse(self, start)
670677
}
@@ -691,6 +698,7 @@ impl str {
691698
future; it is normally replaced by chars/char_indices \
692699
iterators or by getting the first char from a \
693700
subslice")]
701+
#[inline]
694702
pub fn char_at(&self, i: usize) -> char {
695703
core_str::StrExt::char_at(self, i)
696704
}
@@ -716,6 +724,7 @@ impl str {
716724
reason = "see char_at for more details, but reverse semantics \
717725
are also somewhat unclear, especially with which \
718726
cases generate panics")]
727+
#[inline]
719728
pub fn char_at_reverse(&self, i: usize) -> char {
720729
core_str::StrExt::char_at_reverse(self, i)
721730
}
@@ -749,6 +758,7 @@ impl str {
749758
reason = "awaiting conventions about shifting and slices and \
750759
may not be warranted with the existence of the chars \
751760
and/or char_indices iterators")]
761+
#[inline]
752762
pub fn slice_shift_char(&self) -> Option<(char, &str)> {
753763
core_str::StrExt::slice_shift_char(self)
754764
}
@@ -810,6 +820,7 @@ impl str {
810820
/// '\u{1f1e8}', '\u{1f1ed}', ' ', '한']);
811821
/// ```
812822
#[stable(feature = "rust1", since = "1.0.0")]
823+
#[inline]
813824
pub fn chars(&self) -> Chars {
814825
core_str::StrExt::chars(self)
815826
}
@@ -825,6 +836,7 @@ impl str {
825836
/// assert_eq!(v, b);
826837
/// ```
827838
#[stable(feature = "rust1", since = "1.0.0")]
839+
#[inline]
828840
pub fn char_indices(&self) -> CharIndices {
829841
core_str::StrExt::char_indices(self)
830842
}
@@ -839,6 +851,7 @@ impl str {
839851
/// assert_eq!(v, b"bors".to_vec());
840852
/// ```
841853
#[stable(feature = "rust1", since = "1.0.0")]
854+
#[inline]
842855
pub fn bytes(&self) -> Bytes {
843856
core_str::StrExt::bytes(self)
844857
}
@@ -855,6 +868,7 @@ impl str {
855868
/// assert_eq!(v, ["Mary", "had", "a", "little", "lamb"]);
856869
/// ```
857870
#[stable(feature = "split_whitespace", since = "1.1.0")]
871+
#[inline]
858872
pub fn split_whitespace(&self) -> SplitWhitespace {
859873
UnicodeStr::split_whitespace(self)
860874
}
@@ -877,6 +891,7 @@ impl str {
877891
#[unstable(feature = "str_words",
878892
reason = "the precise algorithm to use is unclear")]
879893
#[allow(deprecated)]
894+
#[inline]
880895
pub fn words(&self) -> Words {
881896
UnicodeStr::words(self)
882897
}
@@ -903,6 +918,7 @@ impl str {
903918
/// assert_eq!(v, ["foo", "bar", "", "baz"]);
904919
/// ```
905920
#[stable(feature = "rust1", since = "1.0.0")]
921+
#[inline]
906922
pub fn lines(&self) -> Lines {
907923
core_str::StrExt::lines(self)
908924
}
@@ -930,6 +946,7 @@ impl str {
930946
/// assert_eq!(v, ["foo", "bar", "", "baz"]);
931947
/// ```
932948
#[stable(feature = "rust1", since = "1.0.0")]
949+
#[inline]
933950
pub fn lines_any(&self) -> LinesAny {
934951
core_str::StrExt::lines_any(self)
935952
}

branches/stable/src/libcore/slice.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -300,12 +300,11 @@ impl<T> SliceExt for [T] {
300300

301301
#[inline]
302302
fn split_at_mut(&mut self, mid: usize) -> (&mut [T], &mut [T]) {
303-
let len = self.len();
304-
let ptr = self.as_mut_ptr();
305-
assert!(mid <= len);
306303
unsafe {
307-
(from_raw_parts_mut(ptr, mid),
308-
from_raw_parts_mut(ptr.offset(mid as isize), len - mid))
304+
let self2: &mut [T] = mem::transmute_copy(&self);
305+
306+
(ops::IndexMut::index_mut(self, ops::RangeTo { end: mid } ),
307+
ops::IndexMut::index_mut(self2, ops::RangeFrom { start: mid } ))
309308
}
310309
}
311310

branches/stable/src/liblibc/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ pub mod types {
10091009
use types::os::arch::posix88::{uid_t};
10101010

10111011
pub type nlink_t = u16;
1012-
pub type blksize_t = u32;
1012+
pub type blksize_t = i32;
10131013
pub type blkcnt_t = i64;
10141014
pub type fflags_t = u32;
10151015
#[repr(C)]
@@ -1035,7 +1035,7 @@ pub mod types {
10351035
pub st_lspare: int32_t,
10361036
pub st_birthtime: time_t,
10371037
pub st_birthtime_nsec: c_long,
1038-
pub __unused: [u8; 8],
1038+
pub __unused: [uint8_t; 2],
10391039
}
10401040

10411041
#[repr(C)]
@@ -1103,7 +1103,7 @@ pub mod types {
11031103
use types::os::arch::posix88::{uid_t};
11041104

11051105
pub type nlink_t = u16;
1106-
pub type blksize_t = u32;
1106+
pub type blksize_t = i64;
11071107
pub type blkcnt_t = i64;
11081108
pub type fflags_t = u32;
11091109
#[repr(C)]
@@ -1129,6 +1129,7 @@ pub mod types {
11291129
pub st_lspare: int32_t,
11301130
pub st_birthtime: time_t,
11311131
pub st_birthtime_nsec: c_long,
1132+
pub __unused: [uint8_t; 2],
11321133
}
11331134

11341135
#[repr(C)]

branches/stable/src/librustc/ast_map/mod.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ impl PathElem {
4747

4848
impl fmt::Display for PathElem {
4949
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
50-
write!(f, "{}", self.name())
50+
let slot = token::get_name(self.name());
51+
write!(f, "{}", slot)
5152
}
5253
}
5354

@@ -1072,18 +1073,18 @@ fn node_id_to_string(map: &Map, id: NodeId, include_id: bool) -> String {
10721073
match ii.node {
10731074
ConstImplItem(..) => {
10741075
format!("assoc const {} in {}{}",
1075-
ii.ident,
1076+
token::get_ident(ii.ident),
10761077
map.path_to_string(id),
10771078
id_str)
10781079
}
10791080
MethodImplItem(..) => {
10801081
format!("method {} in {}{}",
1081-
ii.ident,
1082+
token::get_ident(ii.ident),
10821083
map.path_to_string(id), id_str)
10831084
}
10841085
TypeImplItem(_) => {
10851086
format!("assoc type {} in {}{}",
1086-
ii.ident,
1087+
token::get_ident(ii.ident),
10871088
map.path_to_string(id),
10881089
id_str)
10891090
}
@@ -1102,13 +1103,13 @@ fn node_id_to_string(map: &Map, id: NodeId, include_id: bool) -> String {
11021103

11031104
format!("{} {} in {}{}",
11041105
kind,
1105-
ti.ident,
1106+
token::get_ident(ti.ident),
11061107
map.path_to_string(id),
11071108
id_str)
11081109
}
11091110
Some(NodeVariant(ref variant)) => {
11101111
format!("variant {} in {}{}",
1111-
variant.node.name,
1112+
token::get_ident(variant.node.name),
11121113
map.path_to_string(id), id_str)
11131114
}
11141115
Some(NodeExpr(ref expr)) => {

branches/stable/src/librustc/lint/context.rs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ use lint::builtin;
3434
use util::nodemap::FnvHashMap;
3535

3636
use std::cell::RefCell;
37-
use std::cmp;
3837
use std::mem;
3938
use syntax::ast_util::IdVisitingOperation;
4039
use syntax::attr::AttrMetaMethods;
@@ -67,9 +66,6 @@ pub struct LintStore {
6766
/// Map of registered lint groups to what lints they expand to. The bool
6867
/// is true if the lint group was added by a plugin.
6968
lint_groups: FnvHashMap<&'static str, (Vec<LintId>, bool)>,
70-
71-
/// Maximum level a lint can be
72-
lint_cap: Option<Level>,
7369
}
7470

7571
/// The targed of the `by_name` map, which accounts for renaming/deprecation.
@@ -98,10 +94,7 @@ impl LintStore {
9894
}
9995
}
10096

101-
fn set_level(&mut self, lint: LintId, mut lvlsrc: LevelSource) {
102-
if let Some(cap) = self.lint_cap {
103-
lvlsrc.0 = cmp::min(lvlsrc.0, cap);
104-
}
97+
fn set_level(&mut self, lint: LintId, lvlsrc: LevelSource) {
10598
if lvlsrc.0 == Allow {
10699
self.levels.remove(&lint);
107100
} else {
@@ -116,7 +109,6 @@ impl LintStore {
116109
by_name: FnvHashMap(),
117110
levels: FnvHashMap(),
118111
lint_groups: FnvHashMap(),
119-
lint_cap: None,
120112
}
121113
}
122114

@@ -235,13 +227,6 @@ impl LintStore {
235227
}
236228
}
237229
}
238-
239-
self.lint_cap = sess.opts.lint_cap;
240-
if let Some(cap) = self.lint_cap {
241-
for level in self.levels.iter_mut().map(|p| &mut (p.1).0) {
242-
*level = cmp::min(*level, cap);
243-
}
244-
}
245230
}
246231
}
247232

branches/stable/src/librustc/metadata/creader.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ use syntax::attr::AttrMetaMethods;
3333
use syntax::codemap::{self, Span, mk_sp, Pos};
3434
use syntax::parse;
3535
use syntax::parse::token::InternedString;
36+
use syntax::parse::token;
3637
use syntax::visit;
3738
use log;
3839

@@ -180,18 +181,19 @@ impl<'a> CrateReader<'a> {
180181
fn extract_crate_info(&self, i: &ast::Item) -> Option<CrateInfo> {
181182
match i.node {
182183
ast::ItemExternCrate(ref path_opt) => {
184+
let ident = token::get_ident(i.ident);
183185
debug!("resolving extern crate stmt. ident: {} path_opt: {:?}",
184-
i.ident, path_opt);
186+
ident, path_opt);
185187
let name = match *path_opt {
186188
Some(name) => {
187-
validate_crate_name(Some(self.sess), &name.as_str(),
189+
validate_crate_name(Some(self.sess), name.as_str(),
188190
Some(i.span));
189-
name.to_string()
191+
name.as_str().to_string()
190192
}
191-
None => i.ident.to_string(),
193+
None => ident.to_string(),
192194
};
193195
Some(CrateInfo {
194-
ident: i.ident.to_string(),
196+
ident: ident.to_string(),
195197
name: name,
196198
id: i.id,
197199
should_link: should_link(i),

0 commit comments

Comments
 (0)