Skip to content

Commit 326be3e

Browse files
committed
---
yaml --- r: 38900 b: refs/heads/incoming c: 9f15237 h: refs/heads/master v: v3
1 parent e7efd33 commit 326be3e

File tree

160 files changed

+1865
-1390
lines changed

Some content is hidden

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

160 files changed

+1865
-1390
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 3d5418789064fdb463e872a4e651af1c628a3650
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
9-
refs/heads/incoming: 062ac8cb97fef80a370ef884c468c66c4c9d30e3
9+
refs/heads/incoming: 9f1523793735e2d75d6c620f0cc9741b59c47f5c
1010
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/Makefile.in

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,16 +216,15 @@ STDLIB_INPUTS := $(wildcard $(addprefix $(S)src/libstd/, \
216216
# rustc crate variables
217217
######################################################################
218218

219-
COMPILER_CRATE := $(S)src/rustc/rustc.rc
220-
COMPILER_INPUTS := $(filter-out $(S)src/rustc/driver/rustc.rs, \
221-
$(wildcard $(addprefix $(S)src/rustc/, \
222-
rustc.rc *.rs */*.rs */*/*.rs */*/*/*.rs)))
219+
COMPILER_CRATE := $(S)src/librustc/rustc.rc
220+
COMPILER_INPUTS := $(wildcard $(addprefix $(S)src/librustc/, \
221+
rustc.rc *.rs */*.rs */*/*.rs */*/*/*.rs))
223222

224223
LIBSYNTAX_CRATE := $(S)src/libsyntax/syntax.rc
225224
LIBSYNTAX_INPUTS := $(wildcard $(addprefix $(S)src/libsyntax/, \
226225
syntax.rc *.rs */*.rs */*/*.rs))
227226

228-
RUSTC_INPUTS := $(S)src/rustc/driver/rustc.rs
227+
DRIVER_CRATE := $(S)src/driver/driver.rs
229228

230229
######################################################################
231230
# LLVM macros
@@ -356,7 +355,12 @@ SREQ$(1)_T_$(2)_H_$(3) = \
356355
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
357356
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \
358357
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB) \
359-
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC)
358+
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX) \
359+
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC) \
360+
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBFUZZER) \
361+
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBCARGO) \
362+
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTDOC) \
363+
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTI) \
360364

361365
ifeq ($(1),0)
362366
# Don't run the the stage0 compiler under valgrind - that ship has sailed

branches/incoming/doc/tutorial.md

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -751,25 +751,6 @@ match mypoint {
751751
}
752752
~~~
753753

754-
Structs are the only type in Rust that may have user-defined
755-
destructors, defined with `drop` blocks. Inside a `drop`, the name
756-
`self` refers to the struct's value.
757-
758-
~~~
759-
struct TimeBomb {
760-
explosivity: uint,
761-
762-
drop {
763-
for iter::repeat(self.explosivity) {
764-
io::println(fmt!("blam!"));
765-
}
766-
}
767-
}
768-
~~~
769-
770-
> ***Note***: This destructor syntax is temporary. Eventually destructors
771-
> will be defined for any type using [traits](#traits).
772-
773754
## Enums
774755

775756
Enums are datatypes that have several alternate representations. For
@@ -1909,8 +1890,8 @@ traits are automatically derived and implemented for all applicable
19091890
types by the compiler, and may not be overridden:
19101891

19111892
* `Copy` - Types that can be copied: either implicitly, or explicitly with the
1912-
`copy` operator. All types are copyable unless they are classes
1913-
with destructors or otherwise contain classes with destructors.
1893+
`copy` operator. All types are copyable unless they have destructors or
1894+
contain types with destructors.
19141895

19151896
* `Send` - Sendable (owned) types. All types are sendable unless they
19161897
contain managed boxes, managed closures, or otherwise managed
@@ -1922,6 +1903,28 @@ types by the compiler, and may not be overridden:
19221903
> ***Note:*** These three traits were referred to as 'kinds' in earlier
19231904
> iterations of the language, and often still are.
19241905
1906+
There is also a special trait known as `Drop`. This trait defines one method
1907+
called `finalize`, which is automatically called when value of the a type that
1908+
implements this trait is destroyed, either because the value went out of scope
1909+
or because the garbage collector reclaimed it.
1910+
1911+
~~~
1912+
struct TimeBomb {
1913+
explosivity: uint,
1914+
}
1915+
1916+
impl TimeBomb : Drop {
1917+
fn finalize() {
1918+
for iter::repeat(self.explosivity) {
1919+
io::println("blam!");
1920+
}
1921+
}
1922+
}
1923+
~~~
1924+
1925+
It is illegal to call `finalize` directly. Only code inserted by the compiler
1926+
may call it.
1927+
19251928
## Declaring and implementing traits
19261929

19271930
A trait consists of a set of methods, without bodies, or may be empty,

branches/incoming/mk/install.mk

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ install-target-$(1)-host-$(2): $$(SREQ$$(ISTAGE)_T_$(1)_H_$(2))
4444
$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(LIBRUSTC_GLOB))
4545
$$(Q)$$(call INSTALL_LIB, \
4646
$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(LIBSYNTAX_GLOB))
47+
$$(Q)$$(call INSTALL_LIB, \
48+
$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(LIBFUZZER_GLOB))
49+
$$(Q)$$(call INSTALL_LIB, \
50+
$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(LIBCARGO_GLOB))
51+
$$(Q)$$(call INSTALL_LIB, \
52+
$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(LIBRUSTDOC_GLOB))
53+
$$(Q)$$(call INSTALL_LIB, \
54+
$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(LIBRUSTI_GLOB))
4755
$$(Q)$$(call INSTALL,$$(TL$(1)$(2)),$$(PTL$(1)$(2)),libmorestack.a)
4856

4957
endef
@@ -72,19 +80,20 @@ install-host: $(SREQ$(ISTAGE)_T_$(CFG_HOST_TRIPLE)_H_$(CFG_HOST_TRIPLE))
7280
$(Q)mkdir -p $(PREFIX_ROOT)/share/man/man1
7381
$(Q)$(call INSTALL,$(HB2),$(PHB),rustc$(X))
7482
$(Q)$(call INSTALL,$(HB2),$(PHB),fuzzer$(X))
75-
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_LIBFUZZER))
7683
$(Q)$(call INSTALL,$(HB2),$(PHB),cargo$(X))
77-
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_LIBCARGO))
78-
$(Q)$(call INSTALL,$(HB2),$(PHB),rusti$(X))
7984
$(Q)$(call INSTALL,$(HB2),$(PHB),rustdoc$(X))
85+
$(Q)$(call INSTALL,$(HB2),$(PHB),rusti$(X))
86+
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_LIBRUSTC))
87+
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_LIBFUZZER))
88+
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_LIBCARGO))
8089
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_LIBRUSTDOC))
8190
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_LIBRUSTI))
82-
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_RUNTIME))
8391
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(CORELIB_GLOB))
8492
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(STDLIB_GLOB))
8593
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(LIBRUSTC_GLOB))
8694
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(LIBSYNTAX_GLOB))
8795
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(LIBRUSTI_GLOB))
96+
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_RUNTIME))
8897
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_RUSTLLVM))
8998
$(Q)$(call INSTALL,$(S)/man, \
9099
$(PREFIX_ROOT)/share/man/man1,rustc.1)
@@ -100,9 +109,11 @@ uninstall:
100109
$(Q)rm -f $(PHB)/cargo$(X)
101110
$(Q)rm -f $(PHB)/rusti$(X)
102111
$(Q)rm -f $(PHB)/rustdoc$(X)
112+
$(Q)rm -f $(PHB)/fuzzer$(X)
103113
$(Q)rm -f $(PHL)/$(CFG_RUSTLLVM)
104114
$(Q)rm -f $(PHL)/$(CFG_LIBFUZZER)
105115
$(Q)rm -f $(PHL)/$(CFG_LIBCARGO)
116+
$(Q)rm -f $(PHL)/$(CFG_LIBRUSTC)
106117
$(Q)rm -f $(PHL)/$(CFG_LIBRUSTDOC)
107118
$(Q)rm -f $(PHL)/$(CFG_LIBRUSTI)
108119
$(Q)rm -f $(PHL)/$(CFG_RUNTIME)
@@ -111,6 +122,9 @@ uninstall:
111122
$(call HOST_LIB_FROM_HL_GLOB,$(STDLIB_GLOB)) \
112123
$(call HOST_LIB_FROM_HL_GLOB,$(LIBRUSTC_GLOB)) \
113124
$(call HOST_LIB_FROM_HL_GLOB,$(LIBSYNTAX_GLOB)) \
125+
$(call HOST_LIB_FROM_HL_GLOB,$(LIBCARGO_GLOB)) \
126+
$(call HOST_LIB_FROM_HL_GLOB,$(LIBFUZZER_GLOB)) \
127+
$(call HOST_LIB_FROM_HL_GLOB,$(LIBRUSTDOC_GLOB)) \
114128
$(call HOST_LIB_FROM_HL_GLOB,$(LIBRUSTI_GLOB)) \
115129
; \
116130
do rm -f $$i ; \

branches/incoming/mk/target.mk

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,22 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM): \
2424
@$$(call E, cp: $$@)
2525
$$(Q)cp $$< $$@
2626

27-
$$(TBIN$(1)_T_$(2)_H_$(3))/rustc$$(X): \
28-
$$(RUSTC_INPUTS) \
29-
$$(TLIBRUSTC_DEFAULT$(1)_T_$(2)_H_$(3))
30-
@$$(call E, compile_and_link: $$@)
31-
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$<
32-
ifdef CFG_ENABLE_PAX_FLAGS
33-
@$$(call E, apply PaX flags: $$@)
34-
@"$(CFG_PAXCTL)" -cm "$$@"
35-
endif
36-
3727
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC): \
3828
$$(COMPILER_CRATE) $$(COMPILER_INPUTS) \
3929
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX)
4030
@$$(call E, compile_and_link: $$@)
4131
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< && touch $$@
4232

33+
$$(TBIN$(1)_T_$(2)_H_$(3))/rustc$$(X): \
34+
$$(DRIVER_CRATE) \
35+
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC)
36+
@$$(call E, compile_and_link: $$@)
37+
$$(STAGE$(1)_T_$(2)_H_$(3)) --cfg rustc -o $$@ $$<
38+
ifdef CFG_ENABLE_PAX_FLAGS
39+
@$$(call E, apply PaX flags: $$@)
40+
@"$(CFG_PAXCTL)" -cm "$$@"
41+
endif
42+
4343
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX): \
4444
$$(LIBSYNTAX_CRATE) $$(LIBSYNTAX_INPUTS) \
4545
$$(TSREQ$(1)_T_$(2)_H_$(3)) \

0 commit comments

Comments
 (0)