Skip to content

Commit 62f8fde

Browse files
committed
---
yaml --- r: 36287 b: refs/heads/try2 c: 8069d2f h: refs/heads/master i: 36285: 6254125 36283: 42ad20f 36279: 6bb2387 36271: 5c9e65d 36255: 23eab43 36223: a3f1ef5 v: v3
1 parent dbf7d36 commit 62f8fde

File tree

121 files changed

+1223
-2285
lines changed

Some content is hidden

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

121 files changed

+1223
-2285
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 872cb5ee8b58b6c5298e8ee8a4b1e3365ffb1f22
8+
refs/heads/try2: 8069d2f266b5e5f21d9cc846b0b8b8daa1812dcc
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
1010
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try2/AUTHORS.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ Brian J. Burg <[email protected]>
2626
Brian Leibig <[email protected]>
2727
Chris Double <[email protected]>
2828
Chris Peterson <[email protected]>
29-
Chris Pressey <[email protected]>
3029
Damian Gryski <[email protected]>
3130
Damien Grassart <[email protected]>
3231
Daniel Brooks <[email protected]>

branches/try2/Makefile.in

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,6 @@ HSREQ$(1)_H_$(3) = \
341341
$$(HLIB$(1)_H_$(3))/$$(CFG_RUSTLLVM) \
342342
$$(HCORELIB_DEFAULT$(1)_H_$(3)) \
343343
$$(HSTDLIB_DEFAULT$(1)_H_$(3)) \
344-
$$(HLIBSYNTAX_DEFAULT$(1)_H_$(3)) \
345344
$$(HLIBRUSTC_DEFAULT$(1)_H_$(3)) \
346345
$$(MKFILE_DEPS)
347346

@@ -351,31 +350,17 @@ TSREQ$(1)_T_$(2)_H_$(3) = \
351350
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUNTIME) \
352351
$$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a
353352

354-
# Prerequisites for a working stageN compiler and libraries
353+
# Prerequisites for complete stageN targets
355354
SREQ$(1)_T_$(2)_H_$(3) = \
356355
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
357356
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \
358-
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB)
359-
360-
# Prerequisites for a working stageN compiler and libraries
361-
CSREQ$(1)_T_$(2)_H_$(3) = \
362-
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
363-
$$(HBIN$(1)_H_$(3))/fuzzer$$(X) \
364-
$$(HBIN$(1)_H_$(3))/cargo$$(X) \
365-
$$(HBIN$(1)_H_$(3))/rustdoc$$(X) \
366-
$$(HBIN$(1)_H_$(3))/rusti$$(X) \
367-
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBFUZZER) \
368-
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBCARGO) \
369-
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBRUSTDOC) \
370-
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBRUSTI) \
371-
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \
372357
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB) \
373358
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX) \
374359
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC) \
375360
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBFUZZER) \
376361
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBCARGO) \
377362
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTDOC) \
378-
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTI)
363+
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTI) \
379364

380365
ifeq ($(1),0)
381366
# Don't run the the stage0 compiler under valgrind - that ship has sailed
@@ -476,7 +461,15 @@ all: $(SREQ1$(CFG_HOST_TRIPLE)) $(GENERATED) docs
476461

477462
else
478463

479-
all: $(CSREQ3$(CFG_HOST_TRIPLE)) $(GENERATED) docs
464+
TSREQS := \
465+
$(foreach target,$(CFG_TARGET_TRIPLES), \
466+
$(SREQ3_T_$(target)_H_$(CFG_HOST_TRIPLE)))
467+
FUZZ := $(HBIN2_H_$(CFG_HOST_TRIPLE))/fuzzer$(X)
468+
CARGO := $(HBIN2_H_$(CFG_HOST_TRIPLE))/cargo$(X)
469+
RUSTDOC := $(HBIN2_H_$(CFG_HOST_TRIPLE))/rustdoc$(X)
470+
RUSTI := $(HBIN2_H_$(CFG_HOST_TRIPLE))/rusti$(X)
471+
472+
all: rustc $(GENERATED) docs $(FUZZ) $(CARGO) $(RUSTDOC) $(RUSTI)
480473

481474
endif
482475

branches/try2/configure

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -432,15 +432,6 @@ then
432432
fi
433433
fi
434434

435-
# Force freebsd to build with clang; gcc doesn't like us there
436-
if [ $CFG_OSTYPE = unknown-freebsd ]
437-
then
438-
step_msg "on FreeBSD, forcing use of clang"
439-
CFG_ENABLE_CLANG=1
440-
putvar CFG_ENABLE_CLANG
441-
fi
442-
443-
444435
if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ]
445436
then
446437
err "either clang or gcc is required"

branches/try2/doc/tutorial.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ If you've fulfilled those prerequisites, something along these lines
100100
should work.
101101

102102
~~~~ {.notrust}
103-
$ curl -O http://dl.rust-lang.org/dist/rust-0.4.tar.gz
103+
$ wget http://dl.rust-lang.org/dist/rust-0.4.tar.gz
104104
$ tar -xzf rust-0.4.tar.gz
105105
$ cd rust-0.4
106106
$ ./configure
@@ -490,7 +490,7 @@ const MY_STRUCTY_PASSWORD: Password = Password { value: MY_PASSWORD };
490490
## Operators
491491

492492
Rust's set of operators contains very few surprises. Arithmetic is done with
493-
`*`, `/`, `%`, `+`, and `-` (multiply, divide, take remainder, add, subtract). `-` is
493+
`*`, `/`, `%`, `+`, and `-` (multiply, divide, remainder, plus, minus). `-` is
494494
also a unary prefix operator that negates numbers. As in C, the bit operators
495495
`>>`, `<<`, `&`, `|`, and `^` are also supported.
496496

@@ -608,7 +608,7 @@ a wildcard pattern that matches any single value. The asterisk (`*`)
608608
is a different wildcard that can match one or more fields in an `enum`
609609
variant.
610610

611-
The patterns in a match arm are followed by a fat arrow, `=>`, then an
611+
The patterns in an match arm are followed by a fat arrow, `=>`, then an
612612
expression to evaluate. Each case is separated by commas. It's often
613613
convenient to use a block expression for each case, in which case the
614614
commas are optional.
@@ -865,7 +865,7 @@ fn area(sh: Shape) -> float {
865865
}
866866
~~~~
867867

868-
You can write a lone `_` to ignore an individual field, and can
868+
You can write a lone `_` to ignore an individual fields, and can
869869
ignore all fields of a variant like: `Circle(*)`. As in their
870870
introduction form, nullary enum patterns are written without
871871
parentheses.
@@ -1096,7 +1096,7 @@ All pointer types can be dereferenced with the `*` unary operator.
10961096
Managed boxes are pointers to heap-allocated, garbage collected
10971097
memory. Applying the unary `@` operator to an expression creates a
10981098
managed box. The resulting box contains the result of the
1099-
expression. Copying a managed box, as happens during assignment, only
1099+
expression. Copying a shared box, as happens during assignment, only
11001100
copies a pointer, never the contents of the box.
11011101

11021102
~~~~
@@ -1145,7 +1145,7 @@ Managed boxes never cross task boundaries.
11451145
In contrast with managed boxes, owned boxes have a single owning
11461146
memory slot and thus two owned boxes may not refer to the same
11471147
memory. All owned boxes across all tasks are allocated on a single
1148-
_exchange heap_, where their uniquely-owned nature allows tasks to
1148+
_exchange heap_, where their uniquely owned nature allows tasks to
11491149
exchange them efficiently.
11501150

11511151
Because owned boxes are uniquely owned, copying them requires allocating
@@ -1158,7 +1158,7 @@ let x = ~10;
11581158
let y = x; // error: copying a non-implicitly copyable type
11591159
~~~~
11601160

1161-
If you really want to copy an owned box you must say so explicitly.
1161+
If you really want to copy a unique box you must say so explicitly.
11621162

11631163
~~~~
11641164
let x = ~10;
@@ -1190,7 +1190,7 @@ become the sole owner of the box.
11901190

11911191
Rust borrowed pointers are a general purpose reference/pointer type,
11921192
similar to the C++ reference type, but guaranteed to point to valid
1193-
memory. In contrast with owned pointers, where the holder of an owned
1193+
memory. In contrast with owned pointers, where the holder of a unique
11941194
pointer is the owner of the pointed-to memory, borrowed pointers never
11951195
imply ownership. Pointers may be borrowed from any type, in which case
11961196
the pointer is guaranteed not to outlive the value it points to.
@@ -1210,14 +1210,14 @@ contains a point, but allocated in a different location:
12101210
~~~
12111211
# struct Point { x: float, y: float }
12121212
let on_the_stack : Point = Point {x: 3.0, y: 4.0};
1213-
let managed_box : @Point = @Point {x: 5.0, y: 1.0};
1214-
let owned_box : ~Point = ~Point {x: 7.0, y: 9.0};
1213+
let shared_box : @Point = @Point {x: 5.0, y: 1.0};
1214+
let unique_box : ~Point = ~Point {x: 7.0, y: 9.0};
12151215
~~~
12161216
12171217
Suppose we wanted to write a procedure that computed the distance
12181218
between any two points, no matter where they were stored. For example,
12191219
we might like to compute the distance between `on_the_stack` and
1220-
`managed_box`, or between `managed_box` and `owned_box`. One option is
1220+
`shared_box`, or between `shared_box` and `unique_box`. One option is
12211221
to define a function that takes two arguments of type point—that is,
12221222
it takes the points by value. But this will cause the points to be
12231223
copied when we call the function. For points, this is probably not so
@@ -1241,11 +1241,11 @@ Now we can call `compute_distance()` in various ways:
12411241
~~~
12421242
# struct Point{ x: float, y: float };
12431243
# let on_the_stack : Point = Point {x: 3.0, y: 4.0};
1244-
# let managed_box : @Point = @Point {x: 5.0, y: 1.0};
1245-
# let owned_box : ~Point = ~Point {x: 7.0, y: 9.0};
1244+
# let shared_box : @Point = @Point {x: 5.0, y: 1.0};
1245+
# let unique_box : ~Point = ~Point {x: 7.0, y: 9.0};
12461246
# fn compute_distance(p1: &Point, p2: &Point) -> float { 0f }
1247-
compute_distance(&on_the_stack, managed_box);
1248-
compute_distance(managed_box, owned_box);
1247+
compute_distance(&on_the_stack, shared_box);
1248+
compute_distance(shared_box, unique_box);
12491249
~~~
12501250
12511251
Here the `&` operator is used to take the address of the variable
@@ -1255,11 +1255,11 @@ value. We also call this _borrowing_ the local variable
12551255
`on_the_stack`, because we are created an alias: that is, another
12561256
route to the same data.
12571257
1258-
In the case of the boxes `managed_box` and `owned_box`, however, no
1258+
In the case of the boxes `shared_box` and `unique_box`, however, no
12591259
explicit action is necessary. The compiler will automatically convert
12601260
a box like `@point` or `~point` to a borrowed pointer like
12611261
`&point`. This is another form of borrowing; in this case, the
1262-
contents of the managed/owned box is being lent out.
1262+
contents of the shared/unique box is being lent out.
12631263
12641264
Whenever a value is borrowed, there are some limitations on what you
12651265
can do with the original. For example, if the contents of a variable

branches/try2/mk/install.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ PTR$(1)$(2) = $$(PREFIX_LIB)/rustc/$(1)
3333
PTB$(1)$(2) = $$(PTR$(1)$(2))/bin
3434
PTL$(1)$(2) = $$(PTR$(1)$(2))/$(CFG_LIBDIR)
3535

36-
install-target-$(1)-host-$(2): $$(CSREQ$$(ISTAGE)_T_$(1)_H_$(2))
36+
install-target-$(1)-host-$(2): $$(SREQ$$(ISTAGE)_T_$(1)_H_$(2))
3737
$$(Q)mkdir -p $$(PTL$(1)$(2))
3838
$$(Q)$$(call INSTALL,$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(CFG_RUNTIME))
3939
$$(Q)$$(call INSTALL_LIB, \
@@ -74,7 +74,7 @@ PHB = $(PREFIX_BIN)
7474
# Shorthand for the prefix bin directory
7575
PHL = $(PREFIX_LIB)
7676

77-
install-host: $(CSREQ$(ISTAGE)_T_$(CFG_HOST_TRIPLE)_H_$(CFG_HOST_TRIPLE))
77+
install-host: $(SREQ$(ISTAGE)_T_$(CFG_HOST_TRIPLE)_H_$(CFG_HOST_TRIPLE))
7878
$(Q)mkdir -p $(PREFIX_BIN)
7979
$(Q)mkdir -p $(PREFIX_LIB)
8080
$(Q)mkdir -p $(PREFIX_ROOT)/share/man/man1

branches/try2/mk/tests.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,7 @@ $(3)/test/rustctest.stage$(1)-$(2)$$(X): \
352352
$$(COMPILER_CRATE) \
353353
$$(COMPILER_INPUTS) \
354354
$$(SREQ$(1)_T_$(2)_H_$(3)) \
355-
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM) \
356-
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX)
355+
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM)
357356
@$$(call E, compile_and_link: $$@)
358357
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
359358

branches/try2/src/libcore/result.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@ pub pure fn to_either<T: Copy, U: Copy>(res: &Result<U, T>)
103103
* ok(parse_bytes(buf))
104104
* }
105105
*/
106-
pub fn chain<T, U, V>(res: Result<T, V>, op: fn(t: T)
106+
pub fn chain<T, U: Copy, V: Copy>(res: Result<T, V>, op: fn(t: T)
107107
-> Result<U, V>) -> Result<U, V> {
108108
match move res {
109109
Ok(move t) => op(move t),
110-
Err(move e) => Err(move e)
110+
Err(move e) => Err(e)
111111
}
112112
}
113113

@@ -119,13 +119,13 @@ pub fn chain<T, U, V>(res: Result<T, V>, op: fn(t: T)
119119
* immediately returned. This function can be used to pass through a
120120
* successful result while handling an error.
121121
*/
122-
pub fn chain_err<T, U, V>(
122+
pub fn chain_err<T: Copy, U: Copy, V: Copy>(
123123
res: Result<T, V>,
124124
op: fn(t: V) -> Result<T, U>)
125125
-> Result<T, U> {
126126
match move res {
127-
Ok(move t) => Ok(move t),
128-
Err(move v) => op(move v)
127+
Ok(move t) => Ok(t),
128+
Err(move v) => op(v)
129129
}
130130
}
131131

branches/try2/src/libfuzzer/fuzzer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ fn as_str(f: fn@(+x: io::Writer)) -> ~str {
225225
io::with_str_writer(f)
226226
}
227227

228-
fn check_variants_of_ast(crate: ast::crate, codemap: codemap::CodeMap,
228+
fn check_variants_of_ast(crate: ast::crate, codemap: @codemap::CodeMap,
229229
filename: &Path, cx: context) {
230230
let stolen = steal(crate, cx.mode);
231231
let extra_exprs = vec::filter(common_exprs(),
@@ -239,7 +239,7 @@ fn check_variants_of_ast(crate: ast::crate, codemap: codemap::CodeMap,
239239

240240
fn check_variants_T<T: Copy>(
241241
crate: ast::crate,
242-
codemap: codemap::CodeMap,
242+
codemap: @codemap::CodeMap,
243243
filename: &Path,
244244
thing_label: ~str,
245245
things: ~[T],

branches/try2/src/librustc/driver/driver.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ fn pretty_print_input(sess: Session, cfg: ast::crate_cfg, input: input,
354354
ppm_expanded | ppm_normal => pprust::no_ann()
355355
};
356356
let is_expanded = upto != cu_parse;
357-
let src = codemap::get_filemap(sess.codemap, source_name(input)).src;
357+
let src = sess.codemap.get_filemap(source_name(input)).src;
358358
do io::with_str_reader(*src) |rdr| {
359359
pprust::print_crate(sess.codemap, sess.parse_sess.interner,
360360
sess.span_diagnostic, crate,
@@ -574,7 +574,7 @@ fn build_session_options(binary: ~str,
574574

575575
fn build_session(sopts: @session::options,
576576
demitter: diagnostic::emitter) -> Session {
577-
let codemap = codemap::new_codemap();
577+
let codemap = @codemap::CodeMap::new();
578578
let diagnostic_handler =
579579
diagnostic::mk_handler(Some(demitter));
580580
let span_diagnostic_handler =
@@ -583,7 +583,7 @@ fn build_session(sopts: @session::options,
583583
}
584584

585585
fn build_session_(sopts: @session::options,
586-
cm: codemap::CodeMap,
586+
cm: @codemap::CodeMap,
587587
demitter: diagnostic::emitter,
588588
span_diagnostic_handler: diagnostic::span_handler)
589589
-> Session {

branches/try2/src/librustc/driver/session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ type Session_ = {targ_cfg: @config,
131131
opts: @options,
132132
cstore: metadata::cstore::CStore,
133133
parse_sess: parse_sess,
134-
codemap: codemap::CodeMap,
134+
codemap: @codemap::CodeMap,
135135
// For a library crate, this is always none
136136
mut main_fn: Option<(node_id, codemap::span)>,
137137
span_diagnostic: diagnostic::span_handler,

branches/try2/src/librustc/front/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ fn fold_foreign_mod(cx: ctxt, nm: ast::foreign_mod,
8383
fn fold_item_underscore(cx: ctxt, item: ast::item_,
8484
fld: fold::ast_fold) -> ast::item_ {
8585
let item = match item {
86-
ast::item_impl(a, b, c, methods) => {
86+
ast::item_impl(a, b, c, Some(methods)) => {
8787
let methods = methods.filter(|m| method_in_cfg(cx, *m) );
88-
ast::item_impl(a, b, c, methods)
88+
ast::item_impl(a, b, c, Some(methods))
8989
}
9090
ast::item_trait(a, b, ref methods) => {
9191
let methods = methods.filter(|m| trait_method_in_cfg(cx, m) );

branches/try2/src/librustc/front/core_inject.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ fn inject_libcore_ref(sess: Session,
3232

3333
let vi1 = @{node: ast::view_item_use(sess.ident_of(~"core"), ~[], n1),
3434
attrs: ~[],
35-
vis: ast::private,
35+
vis: ast::public,
3636
span: dummy_sp()};
3737
let vp = spanned(ast::view_path_glob(
3838
ident_to_path(dummy_sp(), sess.ident_of(~"core")),
3939
n2));
4040
let vi2 = @{node: ast::view_item_import(~[vp]),
4141
attrs: ~[],
42-
vis: ast::private,
42+
vis: ast::public,
4343
span: dummy_sp()};
4444

4545
let vis = vec::append(~[vi1, vi2], crate.node.module.view_items);

branches/try2/src/librustc/front/intrinsic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// NB: this file is include_str!'ed into the compiler, re-parsed
1+
// NB: this file is #include_str'ed into the compiler, re-parsed
22
// and injected into each crate the compiler builds. Keep it small.
33

44
mod intrinsic {

branches/try2/src/librustc/front/test.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,7 @@ type test_ctxt =
2929
fn modify_for_testing(sess: session::Session,
3030
crate: @ast::crate) -> @ast::crate {
3131

32-
// We generate the test harness when building in the 'test'
33-
// configuration, either with the '--test' or '--cfg test'
34-
// command line options.
35-
let should_test = attr::contains(crate.node.config,
36-
attr::mk_word_item(~"test"));
37-
38-
if should_test {
32+
if sess.opts.test {
3933
generate_test_harness(sess, crate)
4034
} else {
4135
strip_test_functions(crate)
@@ -71,15 +65,14 @@ fn strip_test_functions(crate: @ast::crate) -> @ast::crate {
7165
fn fold_mod(cx: test_ctxt, m: ast::_mod, fld: fold::ast_fold) -> ast::_mod {
7266

7367
// Remove any defined main function from the AST so it doesn't clash with
74-
// the one we're going to add. Only if compiling an executable.
68+
// the one we're going to add.
7569

7670
// FIXME (#2403): This is sloppy. Instead we should have some mechanism to
7771
// indicate to the translation pass which function we want to be main.
7872
fn nomain(cx: test_ctxt, item: @ast::item) -> Option<@ast::item> {
7973
match item.node {
8074
ast::item_fn(*) => {
81-
if item.ident == cx.sess.ident_of(~"main")
82-
&& !cx.sess.building_library {
75+
if item.ident == cx.sess.ident_of(~"main") {
8376
option::None
8477
} else { option::Some(item) }
8578
}

0 commit comments

Comments
 (0)