Skip to content

Commit 8955687

Browse files
author
reus
committed
---
yaml --- r: 66141 b: refs/heads/master c: 9b2d9a9 h: refs/heads/master i: 66139: 359ecd2 v: v3
1 parent ccdd6d7 commit 8955687

File tree

10 files changed

+27
-69
lines changed

10 files changed

+27
-69
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: de471a2eca15e6b9f3e4b81fc50d31b2ca9ee164
2+
refs/heads/master: 9b2d9a9539d77695e915ebed189575d1249e7064
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9

trunk/src/libextra/arc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*
2020
* ~~~ {.rust}
2121
* extern mod std;
22-
* use std::arc;
22+
* use extra::arc;
2323
* let numbers=vec::from_fn(100, |ind| (ind as float)*rand::random());
2424
* let shared_numbers=arc::ARC(numbers);
2525
*

trunk/src/libextra/base64.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ impl<'self> ToBase64 for &'self [u8] {
3636
* # Example
3737
*
3838
* ~~~ {.rust}
39-
* extern mod std;
40-
* use std::base64::ToBase64;
39+
* extern mod extra;
40+
* use extra::base64::ToBase64;
4141
*
4242
* fn main () {
4343
* let str = [52,32].to_base64();
@@ -99,8 +99,8 @@ impl<'self> ToBase64 for &'self str {
9999
* # Example
100100
*
101101
* ~~~ {.rust}
102-
* extern mod std;
103-
* use std::base64::ToBase64;
102+
* extern mod extra;
103+
* use extra::base64::ToBase64;
104104
*
105105
* fn main () {
106106
* let str = "Hello, World".to_base64();
@@ -127,9 +127,9 @@ impl<'self> FromBase64 for &'self [u8] {
127127
* # Example
128128
*
129129
* ~~~ {.rust}
130-
* extern mod std;
131-
* use std::base64::ToBase64;
132-
* use std::base64::FromBase64;
130+
* extern mod extra;
131+
* use extra::base64::ToBase64;
132+
* use extra::base64::FromBase64;
133133
*
134134
* fn main () {
135135
* let str = [52,32].to_base64();
@@ -207,9 +207,9 @@ impl<'self> FromBase64 for &'self str {
207207
* This converts a string literal to base64 and back.
208208
*
209209
* ~~~ {.rust}
210-
* extern mod std;
211-
* use std::base64::ToBase64;
212-
* use std::base64::FromBase64;
210+
* extern mod extra;
211+
* use extra::base64::ToBase64;
212+
* use extra::base64::FromBase64;
213213
* use core::str;
214214
*
215215
* fn main () {

trunk/src/libextra/future.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* ~~~ {.rust}
1818
* # fn fib(n: uint) -> uint {42};
1919
* # fn make_a_sandwich() {};
20-
* let mut delayed_fib = std::future::spawn (|| fib(5000) );
20+
* let mut delayed_fib = extra::future::spawn (|| fib(5000) );
2121
* make_a_sandwich();
2222
* println(fmt!("fib(5000) = %?", delayed_fib.get()))
2323
* ~~~

trunk/src/libextra/net_ip.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub struct ParseAddrErr {
5555
*
5656
* # Arguments
5757
*
58-
* * ip - a `std::net::ip::IpAddr`
58+
* * ip - a `extra::net::ip::IpAddr`
5959
*/
6060
pub fn format_addr(ip: &IpAddr) -> ~str {
6161
match *ip {
@@ -80,7 +80,7 @@ pub fn format_addr(ip: &IpAddr) -> ~str {
8080
* Get the associated port
8181
*
8282
* # Arguments
83-
* * ip - a `std::net::ip::IpAddr`
83+
* * ip - a `extra::net::ip::IpAddr`
8484
*/
8585
pub fn get_port(ip: &IpAddr) -> uint {
8686
match *ip {

trunk/src/librustc/back/abi.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,12 @@ pub static n_tydesc_fields: uint = 8u;
5757
pub static fn_field_code: uint = 0u;
5858
pub static fn_field_box: uint = 1u;
5959

60-
// The two fields of a trait object/trait instance: vtable and box.
61-
// The vtable contains the type descriptor as first element.
60+
// The three fields of a trait object/trait instance: vtable, box, and type
61+
// description.
6262
pub static trt_field_vtable: uint = 0u;
6363
pub static trt_field_box: uint = 1u;
64+
// This field is only present in unique trait objects, so it comes last.
65+
pub static trt_field_tydesc: uint = 2u;
6466

6567
pub static vec_elt_fill: uint = 0u;
6668

trunk/src/librustc/middle/trans/glue.rs

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ use middle::trans::type_::Type;
4040
use core::io;
4141
use core::libc::c_uint;
4242
use core::str;
43+
use core::vec;
4344
use extra::time;
4445
use syntax::ast;
4546

@@ -577,19 +578,11 @@ pub fn make_take_glue(bcx: block, v: ValueRef, t: ty::t) {
577578
bcx
578579
}
579580
ty::ty_trait(_, _, ty::UniqTraitStore, _) => {
580-
let lluniquevalue = GEPi(bcx, v, [0, abi::trt_field_box]);
581-
let llvtable = Load(bcx, GEPi(bcx, v, [0, abi::trt_field_vtable]));
582-
583-
// Cast the vtable to a pointer to a pointer to a tydesc.
584-
let llvtable = PointerCast(bcx, llvtable,
585-
bcx.ccx().tydesc_type.ptr_to().ptr_to());
586-
let lltydesc = Load(bcx, llvtable);
587-
call_tydesc_glue_full(bcx,
588-
lluniquevalue,
589-
lltydesc,
590-
abi::tydesc_field_take_glue,
591-
None);
592-
bcx
581+
let llval = GEPi(bcx, v, [0, abi::trt_field_box]);
582+
let lltydesc = Load(bcx, GEPi(bcx, v, [0, abi::trt_field_tydesc]));
583+
call_tydesc_glue_full(bcx, llval, lltydesc,
584+
abi::tydesc_field_take_glue, None);
585+
bcx
593586
}
594587
ty::ty_opaque_closure_ptr(ck) => {
595588
closure::make_opaque_cbox_take_glue(bcx, ck, v)

trunk/src/libstd/os.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1716,5 +1716,5 @@ mod tests {
17161716
assert!(!os::mkdir_recursive(&path, (S_IRUSR | S_IWUSR | S_IXUSR) as i32));
17171717
}
17181718

1719-
// More recursive_mkdir tests are in std::tempfile
1719+
// More recursive_mkdir tests are in extra::tempfile
17201720
}

trunk/src/libstd/str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* Strings are a packed UTF-8 representation of text, stored as null
1515
* terminated buffers of u8 bytes. Strings should be indexed in bytes,
1616
* for efficiency, but UTF-8 unsafe operations should be avoided. For
17-
* some heavy-duty uses, try std::rope.
17+
* some heavy-duty uses, try extra::rope.
1818
*/
1919

2020
use at_vec;

trunk/src/test/run-pass/owned-trait-objects.rs

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

0 commit comments

Comments
 (0)