Skip to content

Commit 7d5cdd4

Browse files
committed
---
yaml --- r: 68591 b: refs/heads/auto c: 2f27d43 h: refs/heads/master i: 68589: 8cfec0f 68587: 7fa0605 68583: 0e71cd4 68575: 9321238 v: v3
1 parent 4f205d5 commit 7d5cdd4

File tree

4 files changed

+7
-50
lines changed

4 files changed

+7
-50
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: a2db7c15ce9f586164cabb15d83fb3f6bbeb3cf5
17+
refs/heads/auto: 2f27d4316663dfecd47396d3655458602df28d29
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/doc/tutorial.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ If you've fulfilled those prerequisites, something along these lines
9999
should work.
100100

101101
~~~~ {.notrust}
102-
$ curl -O http://static.rust-lang.org/dist/rust-0.7.tar.gz
103-
$ tar -xzf rust-0.7.tar.gz
104-
$ cd rust-0.7
102+
$ curl -O http://static.rust-lang.org/dist/rust-0.6.tar.gz
103+
$ tar -xzf rust-0.6.tar.gz
104+
$ cd rust-0.6
105105
$ ./configure
106106
$ make && make install
107107
~~~~
@@ -119,8 +119,8 @@ API-documentation tool; `rustpkg`, the Rust package manager;
119119
interface for them, and for a few common command line scenarios.
120120

121121
[wiki-start]: https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust
122-
[tarball]: http://static.rust-lang.org/dist/rust-0.7.tar.gz
123-
[win-exe]: http://static.rust-lang.org/dist/rust-0.7-install.exe
122+
[tarball]: http://static.rust-lang.org/dist/rust-0.6.tar.gz
123+
[win-exe]: http://static.rust-lang.org/dist/rust-0.6-install.exe
124124

125125
## Compiling your first program
126126

branches/auto/src/librustc/middle/trans/machine.rs

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ use lib::llvm::{ValueRef};
1414
use lib::llvm::False;
1515
use lib::llvm::llvm;
1616
use middle::trans::common::*;
17-
use middle::trans::type_of;
18-
use middle::ty;
19-
use util::ppaux::ty_to_str;
2017

2118
use middle::trans::type_::Type;
2219

@@ -116,42 +113,3 @@ pub fn llalign_of(cx: &CrateContext, ty: Type) -> ValueRef {
116113
llvm::LLVMAlignOf(ty.to_ref()), cx.int_type.to_ref(), False);
117114
}
118115
}
119-
120-
// Computes the size of the data part of an enum.
121-
pub fn static_size_of_enum(cx: &mut CrateContext, t: ty::t) -> uint {
122-
if cx.enum_sizes.contains_key(&t) {
123-
return cx.enum_sizes.get_copy(&t);
124-
}
125-
126-
debug!("static_size_of_enum %s", ty_to_str(cx.tcx, t));
127-
128-
match ty::get(t).sty {
129-
ty::ty_enum(tid, ref substs) => {
130-
// Compute max(variant sizes).
131-
let mut max_size = 0;
132-
let variants = ty::enum_variants(cx.tcx, tid);
133-
for variants.iter().advance |variant| {
134-
if variant.args.len() == 0 {
135-
loop;
136-
}
137-
138-
let lltypes = variant.args.map(|&variant_arg| {
139-
let substituted = ty::subst(cx.tcx, substs, variant_arg);
140-
type_of::sizing_type_of(cx, substituted)
141-
});
142-
143-
debug!("static_size_of_enum: variant %s type %s",
144-
cx.tcx.sess.str_of(variant.name),
145-
cx.tn.type_to_str(Type::struct_(lltypes, false)));
146-
147-
let this_size = llsize_of_real(cx, Type::struct_(lltypes, false));
148-
if max_size < this_size {
149-
max_size = this_size;
150-
}
151-
}
152-
cx.enum_sizes.insert(t, max_size);
153-
return max_size;
154-
}
155-
_ => cx.sess.bug("static_size_of_enum called on non-enum")
156-
}
157-
}

branches/auto/src/librustc/middle/trans/type_of.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ pub fn type_of_non_gc_box(cx: &mut CrateContext, t: ty::t) -> Type {
104104
//
105105
// (2) It won't make any recursive calls to determine the structure of the
106106
// type behind pointers. This can help prevent infinite loops for
107-
// recursive types. For example, `static_size_of_enum()` relies on this
108-
// behavior.
107+
// recursive types. For example, enum types rely on this behavior.
109108

110109
pub fn sizing_type_of(cx: &mut CrateContext, t: ty::t) -> Type {
111110
match cx.llsizingtypes.find_copy(&t) {

0 commit comments

Comments
 (0)