Skip to content

Commit 3876d2c

Browse files
committed
---
yaml --- r: 111166 b: refs/heads/snap-stage3 c: 9d546d6 h: refs/heads/master v: v3
1 parent 1949cbc commit 3876d2c

Some content is hidden

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

74 files changed

+879
-1691
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 296e60be6b027a52de58251848037a92f23a0878
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 02081e7c41d5780ae59fd8e6f68193a8fe737ced
4+
refs/heads/snap-stage3: 9d546d60c190ffe4c5ac69c128b59d0a2bed021c
55
refs/heads/try: 38201d7c6bf0c32b0e5bdc8ecd63976ebc1b3a4c
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/doc/complement-cheatsheet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ let x: int = 42;
2929
let y: ~str = format!("{:t}", x); // binary
3030
let y: ~str = format!("{:o}", x); // octal
3131
let y: ~str = format!("{:x}", x); // lowercase hexadecimal
32-
let y: ~str = format!("{:X}", x); // uppercase hexadecimal
32+
let y: ~str = format!("{:X}", x); // uppercase hexidecimal
3333
~~~
3434

3535
**String to int, in non-base-10**

branches/snap-stage3/src/doc/guide-ffi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ Besides classical synchronization mechanisms like mutexes, one possibility in
337337
Rust is to use channels (in `std::comm`) to forward data from the C thread
338338
that invoked the callback into a Rust task.
339339

340-
If an asynchronous callback targets a special object in the Rust address space
340+
If an asychronous callback targets a special object in the Rust address space
341341
it is also absolutely necessary that no more callbacks are performed by the
342342
C library after the respective Rust object gets destroyed.
343343
This can be achieved by unregistering the callback in the object's

branches/snap-stage3/src/doc/guide-lifetimes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ points at a static constant).
561561

562562
Lifetimes can be named and referenced. For example, the special lifetime
563563
`'static`, which does not go out of scope, can be used to create global
564-
variables and communicate between tasks (see the manual for use cases).
564+
variables and communicate between tasks (see the manual for usecases).
565565

566566
## Parameter Lifetimes
567567

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ Now here's the exciting part:
226226
because `numbers` is an owned type,
227227
when it is sent across the channel,
228228
it is actually *moved*,
229-
transferring ownership of `numbers` between tasks.
229+
transfering ownership of `numbers` between tasks.
230230
This ownership transfer is *very fast* -
231231
in this case simply copying a pointer -
232232
while also ensuring that the original owning task cannot create data races by continuing to read or write to `numbers` in parallel with the new owner.
@@ -318,7 +318,7 @@ fn main() {
318318
This is almost exactly the same,
319319
except that this time `numbers` is first put into an `Arc`.
320320
`Arc::new` creates the `Arc`,
321-
`.clone()` makes another `Arc` that refers to the same contents.
321+
`.clone()` makes another `Arc` that referrs to the same contents.
322322
So we clone the `Arc` for each task,
323323
send that clone down the channel,
324324
and then use it to print out a number.

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

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ Raw string literals do not process any escapes. They start with the character
295295
`U+0022` (double-quote) character. The _raw string body_ is not defined in the
296296
EBNF grammar above: it can contain any sequence of Unicode characters and is
297297
terminated only by another `U+0022` (double-quote) character, followed by the
298-
same number of `U+0023` (`#`) characters that preceded the opening `U+0022`
298+
same number of `U+0023` (`#`) characters that preceeded the opening `U+0022`
299299
(double-quote) character.
300300

301301
All Unicode characters contained in the raw string body represent themselves,
@@ -1214,22 +1214,6 @@ struct Cookie;
12141214
let c = [Cookie, Cookie, Cookie, Cookie];
12151215
~~~~
12161216

1217-
By using the `struct_inherit` feature gate, structures may use single inheritance. A Structure may only
1218-
inherit from a single other structure, called the _super-struct_. The inheriting structure (sub-struct)
1219-
acts as if all fields in the super-struct were present in the sub-struct. Fields declared in a sub-struct
1220-
must not have the same name as any field in any (transitive) super-struct. All fields (both declared
1221-
and inherited) must be specified in any initializers. Inheritance between structures does not give
1222-
subtyping or coercion. The super-struct and sub-struct must be defined in the same crate. The super-struct
1223-
must be declared using the `virtual` keyword.
1224-
For example:
1225-
1226-
~~~~ {.ignore}
1227-
virtual struct Sup { x: int }
1228-
struct Sub : Sup { y: int }
1229-
let s = Sub {x: 10, y: 11};
1230-
let sx = s.x;
1231-
~~~~
1232-
12331217
### Enumerations
12341218

12351219
An _enumeration_ is a simultaneous definition of a nominal [enumerated type](#enumerated-types) as well as a set of *constructors*,
@@ -2256,7 +2240,7 @@ fn main() {
22562240
Certain aspects of Rust may be implemented in the compiler, but they're not
22572241
necessarily ready for every-day use. These features are often of "prototype
22582242
quality" or "almost production ready", but may not be stable enough to be
2259-
considered a full-fledged language feature.
2243+
considered a full-fleged language feature.
22602244

22612245
For this reason, Rust recognizes a special crate-level attribute of the form:
22622246

@@ -4005,7 +3989,7 @@ dependencies will be used:
40053989
could only be found in an `rlib` format. Remember that `staticlib` formats
40063990
are always ignored by `rustc` for crate-linking purposes.
40073991

4008-
2. If a static library is being produced, all upstream dependencies are
3992+
2. If a static library is being produced, all upstream dependecies are
40093993
required to be available in `rlib` formats. This requirement stems from the
40103994
same reasons that a dynamic library must have all dynamic dependencies.
40113995

branches/snap-stage3/src/librustc/front/config.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,6 @@ fn fold_struct(cx: &Context, def: &ast::StructDef) -> @ast::StructDef {
151151
@ast::StructDef {
152152
fields: fields.collect(),
153153
ctor_id: def.ctor_id,
154-
super_struct: def.super_struct.clone(),
155-
is_virtual: def.is_virtual,
156154
}
157155
}
158156

branches/snap-stage3/src/librustc/front/feature_gate.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
5555
("default_type_params", Active),
5656
("quote", Active),
5757
("linkage", Active),
58-
("struct_inherit", Active),
5958

6059
// These are used to test this portion of the compiler, they don't actually
6160
// mean anything
@@ -191,22 +190,11 @@ impl<'a> Visitor<()> for Context<'a> {
191190
}
192191
}
193192

194-
ast::ItemStruct(struct_definition, _) => {
193+
ast::ItemStruct(..) => {
195194
if attr::contains_name(i.attrs.as_slice(), "simd") {
196195
self.gate_feature("simd", i.span,
197196
"SIMD types are experimental and possibly buggy");
198197
}
199-
match struct_definition.super_struct {
200-
Some(ref path) => self.gate_feature("struct_inherit", path.span,
201-
"struct inheritance is experimental \
202-
and possibly buggy"),
203-
None => {}
204-
}
205-
if struct_definition.is_virtual {
206-
self.gate_feature("struct_inherit", i.span,
207-
"struct inheritance (`virtual` keyword) is \
208-
experimental and possibly buggy");
209-
}
210198
}
211199

212200
_ => {}

branches/snap-stage3/src/librustc/lib/llvm.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,6 @@ pub mod llvm {
709709
pub fn LLVMSetGC(Fn: ValueRef, Name: *c_char);
710710
pub fn LLVMAddFunctionAttr(Fn: ValueRef, PA: c_uint);
711711
pub fn LLVMAddFunctionAttrString(Fn: ValueRef, Name: *c_char);
712-
pub fn LLVMRemoveFunctionAttrString(Fn: ValueRef, Name: *c_char);
713712
pub fn LLVMGetFunctionAttr(Fn: ValueRef) -> c_ulonglong;
714713

715714
pub fn LLVMAddReturnAttribute(Fn: ValueRef, PA: c_uint);

branches/snap-stage3/src/librustc/metadata/common.rs

Lines changed: 58 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ pub static tag_path_len: uint = 0x25;
9292
pub static tag_path_elem_mod: uint = 0x26;
9393
pub static tag_path_elem_name: uint = 0x27;
9494
pub static tag_item_field: uint = 0x28;
95-
pub static tag_item_field_origin: uint = 0x29;
9695

9796
pub static tag_item_variances: uint = 0x2a;
9897
/*
@@ -103,43 +102,43 @@ pub static tag_item_variances: uint = 0x2a;
103102
both, tag_item_trait_method and tag_item_impl_method have to be two
104103
different tags.
105104
*/
106-
pub static tag_item_impl_method: uint = 0x30;
107-
pub static tag_item_trait_method_explicit_self: uint = 0x31;
105+
pub static tag_item_impl_method: uint = 0x2c;
106+
pub static tag_item_trait_method_explicit_self: uint = 0x2d;
108107

109108

110109
// Reexports are found within module tags. Each reexport contains def_ids
111110
// and names.
112-
pub static tag_items_data_item_reexport: uint = 0x38;
113-
pub static tag_items_data_item_reexport_def_id: uint = 0x39;
114-
pub static tag_items_data_item_reexport_name: uint = 0x3a;
111+
pub static tag_items_data_item_reexport: uint = 0x2f;
112+
pub static tag_items_data_item_reexport_def_id: uint = 0x30;
113+
pub static tag_items_data_item_reexport_name: uint = 0x31;
115114

116115
// used to encode crate_ctxt side tables
117116
#[deriving(Eq)]
118117
#[repr(uint)]
119-
pub enum astencode_tag { // Reserves 0x40 -- 0x5f
120-
tag_ast = 0x40,
121-
122-
tag_tree = 0x41,
123-
124-
tag_id_range = 0x42,
125-
126-
tag_table = 0x43,
127-
tag_table_id = 0x44,
128-
tag_table_val = 0x45,
129-
tag_table_def = 0x46,
130-
tag_table_node_type = 0x47,
131-
tag_table_node_type_subst = 0x48,
132-
tag_table_freevars = 0x49,
133-
tag_table_tcache = 0x4a,
134-
tag_table_param_defs = 0x4b,
135-
tag_table_mutbl = 0x4c,
136-
tag_table_last_use = 0x4d,
137-
tag_table_spill = 0x4e,
138-
tag_table_method_map = 0x4f,
139-
tag_table_vtable_map = 0x50,
140-
tag_table_adjustments = 0x51,
141-
tag_table_moves_map = 0x52,
142-
tag_table_capture_map = 0x53
118+
pub enum astencode_tag { // Reserves 0x32 -- 0x45
119+
tag_ast = 0x32,
120+
121+
tag_tree = 0x33,
122+
123+
tag_id_range = 0x34,
124+
125+
tag_table = 0x35,
126+
tag_table_id = 0x36,
127+
tag_table_val = 0x37,
128+
tag_table_def = 0x38,
129+
tag_table_node_type = 0x39,
130+
tag_table_node_type_subst = 0x3a,
131+
tag_table_freevars = 0x3b,
132+
tag_table_tcache = 0x3c,
133+
tag_table_param_defs = 0x3d,
134+
tag_table_mutbl = 0x3e,
135+
tag_table_last_use = 0x3f,
136+
tag_table_spill = 0x40,
137+
tag_table_method_map = 0x41,
138+
tag_table_vtable_map = 0x42,
139+
tag_table_adjustments = 0x43,
140+
tag_table_moves_map = 0x44,
141+
tag_table_capture_map = 0x45
143142
}
144143
static first_astencode_tag: uint = tag_ast as uint;
145144
static last_astencode_tag: uint = tag_table_capture_map as uint;
@@ -152,9 +151,9 @@ impl astencode_tag {
152151
}
153152
}
154153

155-
pub static tag_item_trait_method_sort: uint = 0x60;
154+
pub static tag_item_trait_method_sort: uint = 0x46;
156155

157-
pub static tag_item_impl_type_basename: uint = 0x61;
156+
pub static tag_item_impl_type_basename: uint = 0x47;
158157

159158
// Language items are a top-level directory (for speed). Hierarchy:
160159
//
@@ -163,42 +162,42 @@ pub static tag_item_impl_type_basename: uint = 0x61;
163162
// - tag_lang_items_item_id: u32
164163
// - tag_lang_items_item_node_id: u32
165164

166-
pub static tag_lang_items: uint = 0x70;
167-
pub static tag_lang_items_item: uint = 0x71;
168-
pub static tag_lang_items_item_id: uint = 0x72;
169-
pub static tag_lang_items_item_node_id: uint = 0x73;
165+
pub static tag_lang_items: uint = 0x48;
166+
pub static tag_lang_items_item: uint = 0x49;
167+
pub static tag_lang_items_item_id: uint = 0x4a;
168+
pub static tag_lang_items_item_node_id: uint = 0x4b;
170169

171-
pub static tag_item_unnamed_field: uint = 0x74;
172-
pub static tag_items_data_item_visibility: uint = 0x76;
170+
pub static tag_item_unnamed_field: uint = 0x4c;
171+
pub static tag_items_data_item_visibility: uint = 0x4e;
173172

174-
pub static tag_item_method_tps: uint = 0x79;
175-
pub static tag_item_method_fty: uint = 0x7a;
173+
pub static tag_item_method_tps: uint = 0x51;
174+
pub static tag_item_method_fty: uint = 0x52;
176175

177-
pub static tag_mod_child: uint = 0x7b;
178-
pub static tag_misc_info: uint = 0x7c;
179-
pub static tag_misc_info_crate_items: uint = 0x7d;
176+
pub static tag_mod_child: uint = 0x53;
177+
pub static tag_misc_info: uint = 0x54;
178+
pub static tag_misc_info_crate_items: uint = 0x55;
180179

181-
pub static tag_item_method_provided_source: uint = 0x7e;
182-
pub static tag_item_impl_vtables: uint = 0x7f;
180+
pub static tag_item_method_provided_source: uint = 0x56;
181+
pub static tag_item_impl_vtables: uint = 0x57;
183182

184-
pub static tag_impls: uint = 0x80;
185-
pub static tag_impls_impl: uint = 0x81;
183+
pub static tag_impls: uint = 0x58;
184+
pub static tag_impls_impl: uint = 0x59;
186185

187-
pub static tag_items_data_item_inherent_impl: uint = 0x82;
188-
pub static tag_items_data_item_extension_impl: uint = 0x83;
186+
pub static tag_items_data_item_inherent_impl: uint = 0x5a;
187+
pub static tag_items_data_item_extension_impl: uint = 0x5b;
189188

190-
pub static tag_region_param_def: uint = 0x84;
191-
pub static tag_region_param_def_ident: uint = 0x85;
192-
pub static tag_region_param_def_def_id: uint = 0x86;
189+
pub static tag_region_param_def: uint = 0x5c;
190+
pub static tag_region_param_def_ident: uint = 0x5d;
191+
pub static tag_region_param_def_def_id: uint = 0x5e;
193192

194-
pub static tag_native_libraries: uint = 0x87;
195-
pub static tag_native_libraries_lib: uint = 0x88;
196-
pub static tag_native_libraries_name: uint = 0x89;
197-
pub static tag_native_libraries_kind: uint = 0x8a;
193+
pub static tag_native_libraries: uint = 0x5f;
194+
pub static tag_native_libraries_lib: uint = 0x60;
195+
pub static tag_native_libraries_name: uint = 0x61;
196+
pub static tag_native_libraries_kind: uint = 0x62;
198197

199-
pub static tag_macro_registrar_fn: uint = 0x8b;
200-
pub static tag_exported_macros: uint = 0x8c;
201-
pub static tag_macro_def: uint = 0x8d;
198+
pub static tag_macro_registrar_fn: uint = 0x63;
199+
pub static tag_exported_macros: uint = 0x64;
200+
pub static tag_macro_def: uint = 0x65;
202201

203202
#[deriving(Clone, Show)]
204203
pub struct LinkMeta {

branches/snap-stage3/src/librustc/metadata/decoder.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -975,27 +975,21 @@ pub fn get_struct_fields(intr: Rc<IdentInterner>, cdata: Cmd, id: ast::NodeId)
975975
// FIXME #6993: name should be of type Name, not Ident
976976
let name = item_name(&*intr, an_item);
977977
let did = item_def_id(an_item, cdata);
978-
let tagdoc = reader::get_doc(an_item, tag_item_field_origin);
979-
let origin_id = translate_def_id(cdata, reader::with_doc_data(tagdoc, parse_def_id));
980978
result.push(ty::field_ty {
981979
name: name.name,
982-
id: did,
983-
vis: struct_field_family_to_visibility(f),
984-
origin: origin_id,
980+
id: did, vis:
981+
struct_field_family_to_visibility(f),
985982
});
986983
}
987984
true
988985
});
989986
reader::tagged_docs(item, tag_item_unnamed_field, |an_item| {
990987
let did = item_def_id(an_item, cdata);
991-
let tagdoc = reader::get_doc(an_item, tag_item_field_origin);
992988
let f = item_family(an_item);
993-
let origin_id = translate_def_id(cdata, reader::with_doc_data(tagdoc, parse_def_id));
994989
result.push(ty::field_ty {
995990
name: special_idents::unnamed_field.name,
996991
id: did,
997992
vis: struct_field_family_to_visibility(f),
998-
origin: origin_id,
999993
});
1000994
true
1001995
});

0 commit comments

Comments
 (0)