Skip to content

Commit 32b0cd2

Browse files
committed
---
yaml --- r: 226170 b: refs/heads/snap-stage3 c: eefeba0 h: refs/heads/master v: v3
1 parent d9c12cb commit 32b0cd2

Some content is hidden

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

65 files changed

+396
-2466
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: e5d90d98402475b6e154ce216f9efcb80da1a747
3-
refs/heads/snap-stage3: a42e21d66e78ff821602beb521bc942d1c722f6c
3+
refs/heads/snap-stage3: eefeba08f8702481fdb38b915389d5470bc874d0
44
refs/heads/try: b53c0f93eedcdedd4fd89bccc5a3a09d1c5cd23e
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/snap-stage3/src/doc/reference.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2368,8 +2368,6 @@ The currently implemented features of the reference compiler are:
23682368
internally without imposing on callers
23692369
(i.e. making them behave like function calls in
23702370
terms of encapsulation).
2371-
* - `default_type_parameter_fallback` - Allows type parameter defaults to
2372-
influence type inference.
23732371

23742372
If a feature is promoted to a language feature, then all existing programs will
23752373
start to receive compilation warnings about `#![feature]` directives which enabled

branches/snap-stage3/src/doc/rust.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,6 @@ a > code {
221221
color: #428BCA;
222222
}
223223

224-
.section-header > a > code {
225-
color: #8D1A38;
226-
}
227-
228224
/* Code highlighting */
229225
pre.rust .kw { color: #8959A8; }
230226
pre.rust .kw-2, pre.rust .prelude-ty { color: #4271AE; }

branches/snap-stage3/src/doc/trpl/SUMMARY.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
* [Iterators](iterators.md)
1717
* [Concurrency](concurrency.md)
1818
* [Error Handling](error-handling.md)
19-
* [Choosing your Guarantees](choosing-your-guarantees.md)
2019
* [FFI](ffi.md)
2120
* [Borrow and AsRef](borrow-and-asref.md)
2221
* [Release Channels](release-channels.md)

branches/snap-stage3/src/doc/trpl/choosing-your-guarantees.md

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

branches/snap-stage3/src/libcore/char.rs

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,10 @@ pub fn from_u32(i: u32) -> Option<char> {
8484
if (i > MAX as u32) || (i >= 0xD800 && i <= 0xDFFF) {
8585
None
8686
} else {
87-
Some(unsafe { from_u32_unchecked(i) })
87+
Some(unsafe { transmute(i) })
8888
}
8989
}
9090

91-
/// Converts a `u32` to an `char`, not checking whether it is a valid unicode
92-
/// codepoint.
93-
#[inline]
94-
#[unstable(feature = "char_from_unchecked", reason = "recently added API")]
95-
pub unsafe fn from_u32_unchecked(i: u32) -> char {
96-
transmute(i)
97-
}
98-
9991
/// Converts a number to the character representing it.
10092
///
10193
/// # Return value
@@ -123,11 +115,12 @@ pub fn from_digit(num: u32, radix: u32) -> Option<char> {
123115
panic!("from_digit: radix is too high (maximum 36)");
124116
}
125117
if num < radix {
126-
let num = num as u8;
127-
if num < 10 {
128-
Some((b'0' + num) as char)
129-
} else {
130-
Some((b'a' + num - 10) as char)
118+
unsafe {
119+
if num < 10 {
120+
Some(transmute('0' as u32 + num))
121+
} else {
122+
Some(transmute('a' as u32 + num - 10))
123+
}
131124
}
132125
} else {
133126
None
@@ -325,13 +318,16 @@ impl Iterator for EscapeUnicode {
325318
Some('{')
326319
}
327320
EscapeUnicodeState::Value(offset) => {
328-
let c = from_digit(((self.c as u32) >> (offset * 4)) & 0xf, 16).unwrap();
321+
let v = match ((self.c as i32) >> (offset * 4)) & 0xf {
322+
i @ 0 ... 9 => '0' as i32 + i,
323+
i => 'a' as i32 + (i - 10)
324+
};
329325
if offset == 0 {
330326
self.state = EscapeUnicodeState::RightBrace;
331327
} else {
332328
self.state = EscapeUnicodeState::Value(offset - 1);
333329
}
334-
Some(c)
330+
Some(unsafe { transmute(v) })
335331
}
336332
EscapeUnicodeState::RightBrace => {
337333
self.state = EscapeUnicodeState::Done;

branches/snap-stage3/src/librustc/ast_map/mod.rs

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ pub enum Node<'ast> {
119119
NodeStructCtor(&'ast StructDef),
120120

121121
NodeLifetime(&'ast Lifetime),
122-
NodeTyParam(&'ast TyParam)
123122
}
124123

125124
/// Represents an entry and its parent NodeID.
@@ -143,7 +142,6 @@ enum MapEntry<'ast> {
143142
EntryBlock(NodeId, &'ast Block),
144143
EntryStructCtor(NodeId, &'ast StructDef),
145144
EntryLifetime(NodeId, &'ast Lifetime),
146-
EntryTyParam(NodeId, &'ast TyParam),
147145

148146
/// Roots for node trees.
149147
RootCrate,
@@ -177,8 +175,7 @@ impl<'ast> MapEntry<'ast> {
177175
NodePat(n) => EntryPat(p, n),
178176
NodeBlock(n) => EntryBlock(p, n),
179177
NodeStructCtor(n) => EntryStructCtor(p, n),
180-
NodeLifetime(n) => EntryLifetime(p, n),
181-
NodeTyParam(n) => EntryTyParam(p, n),
178+
NodeLifetime(n) => EntryLifetime(p, n)
182179
}
183180
}
184181

@@ -197,7 +194,6 @@ impl<'ast> MapEntry<'ast> {
197194
EntryBlock(id, _) => id,
198195
EntryStructCtor(id, _) => id,
199196
EntryLifetime(id, _) => id,
200-
EntryTyParam(id, _) => id,
201197
_ => return None
202198
})
203199
}
@@ -217,7 +213,6 @@ impl<'ast> MapEntry<'ast> {
217213
EntryBlock(_, n) => NodeBlock(n),
218214
EntryStructCtor(_, n) => NodeStructCtor(n),
219215
EntryLifetime(_, n) => NodeLifetime(n),
220-
EntryTyParam(_, n) => NodeTyParam(n),
221216
_ => return None
222217
})
223218
}
@@ -578,7 +573,6 @@ impl<'ast> Map<'ast> {
578573
Some(NodePat(pat)) => pat.span,
579574
Some(NodeBlock(block)) => block.span,
580575
Some(NodeStructCtor(_)) => self.expect_item(self.get_parent(id)).span,
581-
Some(NodeTyParam(ty_param)) => ty_param.span,
582576
_ => return None,
583577
};
584578
Some(sp)
@@ -821,14 +815,6 @@ impl<'ast> Visitor<'ast> for NodeCollector<'ast> {
821815
self.parent_node = parent_node;
822816
}
823817

824-
fn visit_generics(&mut self, generics: &'ast Generics) {
825-
for ty_param in generics.ty_params.iter() {
826-
self.insert(ty_param.id, NodeTyParam(ty_param));
827-
}
828-
829-
visit::walk_generics(self, generics);
830-
}
831-
832818
fn visit_trait_item(&mut self, ti: &'ast TraitItem) {
833819
let parent_node = self.parent_node;
834820
self.parent_node = ti.id;
@@ -1029,7 +1015,7 @@ impl<'a> NodePrinter for pprust::State<'a> {
10291015
NodePat(a) => self.print_pat(&*a),
10301016
NodeBlock(a) => self.print_block(&*a),
10311017
NodeLifetime(a) => self.print_lifetime(&*a),
1032-
NodeTyParam(_) => panic!("cannot print TyParam"),
1018+
10331019
// these cases do not carry enough information in the
10341020
// ast_map to reconstruct their full structure for pretty
10351021
// printing.
@@ -1137,9 +1123,6 @@ fn node_id_to_string(map: &Map, id: NodeId, include_id: bool) -> String {
11371123
format!("lifetime {}{}",
11381124
pprust::lifetime_to_string(&**l), id_str)
11391125
}
1140-
Some(NodeTyParam(ref ty_param)) => {
1141-
format!("typaram {:?}{}", ty_param, id_str)
1142-
}
11431126
None => {
11441127
format!("unknown node{}", id_str)
11451128
}

0 commit comments

Comments
 (0)