Skip to content

Remove all final references to die! Issue 4524 #4933

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 120 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
64fedfb
Fix sample program to compile in modern rust
mcpherrinm Feb 7, 2013
46df798
Merge branch 'master' of https://github.com/mozilla/rust
mcpherrinm Feb 8, 2013
fd98ea8
Fix for issue 2174
Thiez Feb 8, 2013
8d0c1cb
Added related FIXME for 3260
Thiez Feb 9, 2013
a32c5c7
oldmap: get rid of legacy _ref suffixes
thestinger Feb 8, 2013
0127828
oldmap: separate out the methods that need Copy
thestinger Feb 9, 2013
94fd95a
oldmap: rm unneeded unsafe
thestinger Feb 9, 2013
0a062b5
Remove trailing whitespace
mcpherrinm Feb 9, 2013
d30fdbb
libsyntax/attr.rs: switch from oldmap to LinearSet
thestinger Feb 9, 2013
4e6994d
librustc/back/rpath.rs: oldmap -> LinearSet
thestinger Feb 9, 2013
ebd20b7
Rename dec/inc_weak_task_count to inc/dec_live_count and remove regis…
z0w0 Feb 9, 2013
8ebdb3d
Issue #4830 fix
sp0 Feb 9, 2013
6bfbdad
Add debug info tests
bleibig Feb 9, 2013
7659614
fix typos in sample code, add enum to json encoder, add test case
jbclements Feb 7, 2013
fe82374
json bugfixes
jbclements Feb 7, 2013
394f8ee
tidy
jbclements Feb 7, 2013
0e9495b
json bugfix
jbclements Feb 7, 2013
f91160b
json add enum encoder test case
jbclements Feb 8, 2013
c952c04
re-special-case Option in JSON encoding
jbclements Feb 8, 2013
7736ed6
json tidy
jbclements Feb 9, 2013
7fe6b1b
auto merge of #4853 : Thiez/rust/incoming, r=catamorphism
bors Feb 9, 2013
d6442e9
auto merge of #4854 : thestinger/rust/oldmap, r=catamorphism
bors Feb 9, 2013
2fc1f41
auto merge of #4827 : mcpherrinm/rust/master, r=catamorphism
bors Feb 10, 2013
9d7014e
auto merge of #4861 : sethpink/rust/incoming, r=catamorphism
bors Feb 10, 2013
3742b62
Omit discriminant from nullary univariant enums.
jld Jan 7, 2013
4f84376
core: Remove GenericChan/Port from prelude. Closes #4762
z0w0 Feb 10, 2013
0f04df8
auto merge of #4866 : jld/rust/enum-unitlike, r=graydon
bors Feb 10, 2013
e93a58d
rust-mode.el uses the 'cl macros, so it should actually require them
jld Feb 10, 2013
c05954a
added issue for reference in FIXME
jbclements Feb 10, 2013
3a813e2
etc: rework of how libuv is integrated into the build
olsonjeffery Jan 30, 2013
dfcdb6e
rt/std: update of libuv API glue for libuv submodule update
olsonjeffery Jan 30, 2013
a38b166
build: tweak rt.mk, as per graydon.. CFLAGS had to stay
olsonjeffery Feb 2, 2013
4942fe9
build: point libuv at olsonjeffery/libuv, temporarily
olsonjeffery Feb 4, 2013
a74296a
build: ifdef for mingw/non-mingw builds
olsonjeffery Feb 2, 2013
73507c1
std: strip sillyness from debug comment in iotask teardown
olsonjeffery Feb 5, 2013
1cbbb58
build: change libuv to point at joyent's repo and make unpatched buil…
olsonjeffery Feb 8, 2013
a3516ae
build: add link flag for freebsd libuv build
olsonjeffery Feb 8, 2013
99ff74c
make Option's iter method use a lifetime
thestinger Feb 10, 2013
85d7b3c
mk: Typo
brson Feb 10, 2013
79e9b6d
mk: Run debuginfo tests by default, but only if gdb is available
brson Feb 10, 2013
4696fb3
std: fix libuv structs on macos
olsonjeffery Feb 10, 2013
fed5df8
libcore: LinearMap doesn't need to pass around the bucket vec
erickt Feb 10, 2013
849644b
core: rename hashmap test functions
erickt Feb 10, 2013
4fb4a4b
core: add LinearMap::find_or_insert{,_with}
erickt Feb 10, 2013
48b2141
Add NumCast trait for generic numeric type casts
brendanzab Feb 11, 2013
f9c15de
treemap: use an &mut parameter for skew and split
thestinger Feb 11, 2013
195a969
treemap: avoid swap_unwrap in insert
thestinger Feb 11, 2013
33ae058
core: Fix files that needed GenericChan/Port from prelude
z0w0 Feb 11, 2013
b0f58f6
avoid explicit reborrow in heir_swap
thestinger Feb 11, 2013
f9c7ba0
treemap: cut down on swap_unwrap in remove
thestinger Feb 11, 2013
f2a8a71
Use topmost span for macro expansion location. Fixes behaviour of fil…
cyndis Feb 11, 2013
d48bc26
Add test for using line! in a macro
cyndis Feb 11, 2013
ca030b4
Update copyright years
cyndis Feb 11, 2013
faef933
Merge pull request #4873 from jld/rust-mode-wants-cl-when
brson Feb 11, 2013
744e5ad
Merge remote-tracking branch 'cyndis/expansion-span'
brson Feb 11, 2013
8ed1c15
Fix license block
brson Feb 11, 2013
822813d
Add Mikko Perttunen to AUTHORS
brson Feb 11, 2013
b126c74
Merge remote-tracking branch 'thestinger/treemap'
brson Feb 12, 2013
0db527e
core: Fix dec/inc_kernel_live_count mixup
z0w0 Feb 12, 2013
9701517
std: Fix uv_tcp_t size on i686-apple-darwin
brson Feb 12, 2013
a8f039a
librustc: Make monomorphic newtype structs work cross-crate
pcwalton Feb 12, 2013
9877d98
core: Rewrite last_os_error in Rust for unix and provide access to er…
luqmana Feb 12, 2013
625fac3
core: Rewrite last_os_error in Rust for windows as well.
luqmana Feb 12, 2013
70185fd
rt: remove last_os_error and adjust tests.
luqmana Feb 12, 2013
44b80ed
Long lines.
luqmana Feb 12, 2013
2180fe2
rt: remove last_os_error from rustrt.def.in
luqmana Feb 12, 2013
1d82d8d
Revert "librustc: Make monomorphic newtype structs work cross-crate"
graydon Feb 12, 2013
1c487b1
auto merge of #4867 : z0w0/rust/pruneprelude, r=catamorphism
bors Feb 12, 2013
210fa2d
auto merge of #4874 : thestinger/rust/option, r=catamorphism
bors Feb 12, 2013
21a0d52
auto merge of #4876 : brson/rust/debuginfo, r=brson
bors Feb 12, 2013
bc2d147
auto merge of #4858 : z0w0/rust/rm_weak_task_count, r=graydon
bors Feb 12, 2013
91c59f5
auto merge of #4880 : erickt/rust/hashmap-cleanup, r=catamorphism
bors Feb 12, 2013
a165f88
librustc: Speed up moves a lot. r=nmatsakis
pcwalton Feb 13, 2013
6727c6f
auto merge of #4881 : bjz/rust/incoming, r=catamorphism
bors Feb 13, 2013
46d2be1
added rather elaborate test framework
jbclements Feb 13, 2013
1a394e5
auto merge of #4896 : pcwalton/rust/move-speedup, r=pcwalton
bors Feb 13, 2013
ab25349
Adjust borrow checker algorithm to address #4856 unsoundness,
nikomatsakis Feb 9, 2013
27b3e01
auto merge of #4914 : nikomatsakis/rust/issue-4856, r=nikomatsakis
bors Feb 13, 2013
6016214
auto merge of #4900 : luqmana/rust/core_os_errors, r=graydon
bors Feb 13, 2013
e07623d
librustc: Make monomorphic newtype structs work cross-crate
pcwalton Feb 12, 2013
e58c812
Partially de-vec-mut librustc
bstrie Feb 8, 2013
2d2ed07
RIMOV core::run
bstrie Feb 12, 2013
3a3f7b8
RIMOV core::rand
bstrie Feb 12, 2013
808ccd3
RIMOV core::io
bstrie Feb 12, 2013
4de76ae
RIMOV core::hash
bstrie Feb 12, 2013
e6c82c0
RIMOV core::vec
bstrie Feb 12, 2013
c42a367
Add Brendan Zabarauskas to AUTHORS
catamorphism Feb 13, 2013
e92e3e4
Add forgotten authors Jesse Jones, Mark Vian, and Trinick
catamorphism Feb 13, 2013
d06e6e7
auto merge of #4892 : pcwalton/rust/xc-newtype-structs, r=pcwalton
bors Feb 13, 2013
9df11ae
retabbing
jbclements Feb 13, 2013
389125a
core: add min and max to cmp, re-export various places.
graydon Jan 16, 2013
73280b0
core: add abs to num.
graydon Jan 16, 2013
ebe9963
std: add stats.
graydon Jan 16, 2013
e5aa399
rustc and std: teach about #[bench], modernize to use quote_expr! some.
graydon Feb 13, 2013
7393fde
auto merge of #4515 : graydon/rust/bench-harness, r=graydon
bors Feb 13, 2013
d67e144
rt: get rid of rust_fn and replace with fn_env_pair plus a little cle…
luqmana Feb 13, 2013
c22d0af
rt: take into account alignment for debug_opaque. Closes #2667
luqmana Feb 13, 2013
2c19856
rt: Fix alignment in debug_opaque
luqmana Feb 13, 2013
5e6d787
auto merge of #4840 : jbclements/rust/add-json-enum-encoding, r=catam…
bors Feb 13, 2013
6d09fc2
removed reference to crate file keywords
jbclements Feb 8, 2013
25c4676
Commenting, test cases, cleanup
jbclements Feb 4, 2013
17d3a55
@mut fix
jbclements Feb 9, 2013
819c6d1
deriving-eq all over ast
jbclements Feb 7, 2013
0419e36
finish deriving_eq in ast
jbclements Feb 7, 2013
16da4e1
use node_id for indexing in ast_to_ty_cache
jbclements Feb 7, 2013
ded95d2
deriving_eq for tokens and binops
jbclements Feb 9, 2013
9d962d8
add test case
jbclements Feb 13, 2013
d5bf3b8
auto merge of #4908 : bstrie/rust/rimov3, r=pcwalton
bors Feb 13, 2013
754718c
libsyntax: Pretty print using the new impl syntax. r=brson
pcwalton Feb 11, 2013
f9d789f
cleanup, fix test case
jbclements Feb 13, 2013
c51ecc3
auto merge of #4884 : pcwalton/rust/pretty-print-new-impl-syntax, r=p…
bors Feb 13, 2013
4445b38
Remove die!, raplace invocations with fail! Issue #4524 pt 3
Feb 12, 2013
0ae74be
auto merge of #4905 : brson/rust/issue4524, r=brson
bors Feb 14, 2013
6efa354
auto merge of #4922 : jbclements/rust/add-deriving-eq-to-asts, r=cata…
bors Feb 14, 2013
5a4695d
update tutorial and manual to use new `impl Trait for Type` syntax
cpeterso Feb 14, 2013
216e85f
libcore: Move the numeric operations out of Num. r=brson
pcwalton Feb 13, 2013
6366e74
auto merge of #4910 : pcwalton/rust/num-simplification, r=pcwalton
bors Feb 14, 2013
f06f68d
auto merge of #4915 : luqmana/rust/rt-cleanup, r=pcwalton
bors Feb 14, 2013
36edd25
auto merge of #4925 : cpeterso/rust/docs-impl-trait-for-type, r=pcwalton
bors Feb 14, 2013
4699ac6
Remove all final references to die!
Feb 14, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
url = git://github.com/brson/llvm.git
[submodule "src/libuv"]
path = src/libuv
url = git://github.com/graydon/libuv.git
url = git://github.com/joyent/libuv.git
5 changes: 5 additions & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Benjamin Peterson <[email protected]>
Bilal Husain <[email protected]>
Bill Fallon <[email protected]>
Brendan Eich <[email protected]>
Brendan Zabarauskas <[email protected]>
Brian Anderson <[email protected]>
Brian J. Burg <[email protected]>
Brian Leibig <[email protected]>
Expand Down Expand Up @@ -80,6 +81,7 @@ Jeff Muizelaar <[email protected]>
Jeff Olson <[email protected]>
Jeffrey Yasskin <[email protected]>
Jens Nockert <[email protected]>
Jesse Jones <[email protected]>
Jesse Ruderman <[email protected]>
Jim Blandy <[email protected]>
Jimmy Lu <[email protected]>
Expand All @@ -105,6 +107,7 @@ Mahmut Bulut <[email protected]>
Margaret Meyerhofer <[email protected]>
Marijn Haverbeke <[email protected]>
Mark Lacey <[email protected]>
Mark Vian <[email protected]>
Martin DeMello <[email protected]>
Marvin Löbel <[email protected]>
Matt Brubeck <[email protected]>
Expand All @@ -114,6 +117,7 @@ Michael Arntzenius <[email protected]>
Michael Bebenita <[email protected]>
Michael Neumann <[email protected]>
Michael Sullivan <[email protected]>
Mikko Perttunen <[email protected]>
Nick Desaulniers <[email protected]>
Niko Matsakis <[email protected]>
Or Brostovski <[email protected]>
Expand Down Expand Up @@ -148,6 +152,7 @@ Tim Taubert <[email protected]>
Tom Lee <[email protected]>
Tomoki Aonuma <[email protected]>
Tony Young <[email protected]>
Trinick <[email protected]>
Tycho Sci <[email protected]>
Tyler Bindon <[email protected]>
Viktor Dahl <[email protected]>
Expand Down
4 changes: 3 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ probe CFG_PDFLATEX pdflatex
probe CFG_XETEX xetex
probe CFG_LUATEX luatex
probe CFG_NODE nodejs node
probe CFG_GDB gdb
if [ "$CFG_OSTYPE" = "unknown-linux-gnu" ]
then
probe CFG_PAXCTL paxctl /sbin/paxctl
Expand Down Expand Up @@ -578,7 +579,7 @@ do
make_dir rt/$t
for i in \
isaac linenoise sync test arch/i386 arch/x86_64 \
libuv libuv/src/ares libuv/src/eio libuv/src/ev
libuv
do
make_dir rt/$t/$i
done
Expand Down Expand Up @@ -619,6 +620,7 @@ do
make_dir $h/test/bench
make_dir $h/test/perf
make_dir $h/test/pretty
make_dir $h/test/debug-info
make_dir $h/test/doc-tutorial
make_dir $h/test/doc-tutorial-ffi
make_dir $h/test/doc-tutorial-macros
Expand Down
32 changes: 13 additions & 19 deletions doc/rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,7 @@ grammar as double-quoted strings. Other tokens have exact rules given.

### Keywords

The keywords in [crate files](#crate-files) are the following strings:

~~~~~~~~ {.keyword}
mod priv pub use
~~~~~~~~

The keywords in [source files](#source-files) are the following strings:
The keywords are the following strings:

~~~~~~~~ {.keyword}
as assert
Expand Down Expand Up @@ -1215,7 +1209,7 @@ to pointers to the trait name, used as a type.

~~~~
# trait Shape { }
# impl int: Shape { }
# impl Shape for int { }
# let mycircle = 0;

let myshape: Shape = @mycircle as @Shape;
Expand All @@ -1239,7 +1233,7 @@ For example:
trait Num {
static pure fn from_int(n: int) -> Self;
}
impl float: Num {
impl Num for float {
static pure fn from_int(n: int) -> float { n as float }
}
let x: float = Num::from_int(42);
Expand Down Expand Up @@ -1275,8 +1269,8 @@ Likewise, supertrait methods may also be called on trait objects.
~~~ {.xfail-test}
# trait Shape { fn area() -> float; }
# trait Circle : Shape { fn radius() -> float; }
# impl int: Shape { fn area() -> float { 0.0 } }
# impl int: Circle { fn radius() -> float { 0.0 } }
# impl Shape for int { fn area() -> float { 0.0 } }
# impl Circle for int { fn radius() -> float { 0.0 } }
# let mycircle = 0;

let mycircle: Circle = @mycircle as @Circle;
Expand All @@ -1298,7 +1292,7 @@ Implementations are defined with the keyword `impl`.

type Circle = {radius: float, center: Point};

impl Circle: Shape {
impl Shape for Circle {
fn draw(s: Surface) { do_draw_circle(s, self); }
fn bounding_box() -> BoundingBox {
let r = self.radius;
Expand All @@ -1309,9 +1303,9 @@ impl Circle: Shape {
~~~~

It is possible to define an implementation without referring to a trait.
The methods in such an implementation can only be used statically
(as direct calls on the values of the type that the implementation targets).
In such an implementation, the type after the colon is omitted.
The methods in such an implementation can only be used
as direct calls on the values of the type that the implementation targets.
In such an implementation, the trait type and `for` after `impl` are omitted.
Such implementations are limited to nominal types (enums, structs),
and the implementation must appear in the same module or a sub-module as the `self` type.

Expand All @@ -1326,10 +1320,10 @@ Implementation parameters are written after after the `impl` keyword.
~~~~
# trait Seq<T> { }

impl<T> ~[T]: Seq<T> {
impl<T> Seq<T> for ~[T] {
...
}
impl u32: Seq<bool> {
impl Seq<bool> for u32 {
/* Treat the integer as a sequence of bits */
}
~~~~
Expand Down Expand Up @@ -2807,7 +2801,7 @@ trait Printable {
fn to_str() -> ~str;
}

impl int: Printable {
impl Printable for int {
fn to_str() -> ~str { int::to_str(self) }
}

Expand Down Expand Up @@ -2850,7 +2844,7 @@ trait Printable {
fn make_string() -> ~str;
}

impl ~str: Printable {
impl Printable for ~str {
fn make_string() -> ~str { copy self }
}
~~~~~~~~
Expand Down
33 changes: 16 additions & 17 deletions doc/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -1909,7 +1909,7 @@ struct TimeBomb {
explosivity: uint
}

impl TimeBomb : Drop {
impl Drop for TimeBomb {
fn finalize(&self) {
for iter::repeat(self.explosivity) {
io::println("blam!");
Expand Down Expand Up @@ -1943,11 +1943,11 @@ and `&str`.

~~~~
# trait Printable { fn print(&self); }
impl int: Printable {
impl Printable for int {
fn print(&self) { io::println(fmt!("%d", *self)) }
}

impl &str: Printable {
impl Printable for &str {
fn print(&self) { io::println(*self) }
}

Expand All @@ -1966,7 +1966,7 @@ trait Seq<T> {
fn iter(&self, b: fn(v: &T));
}

impl<T> ~[T]: Seq<T> {
impl<T> Seq<T> for ~[T] {
fn len(&self) -> uint { vec::len(*self) }
fn iter(&self, b: fn(v: &T)) {
for vec::each(*self) |elt| { b(elt); }
Expand All @@ -1978,7 +1978,7 @@ The implementation has to explicitly declare the type parameter that
it binds, `T`, before using it to specify its trait type. Rust
requires this declaration because the `impl` could also, for example,
specify an implementation of `Seq<int>`. The trait type (appearing
after the colon in the `impl`) *refers* to a type, rather than
between `impl` and `for`) *refers* to a type, rather than
defining one.

The type parameters bound by a trait are in scope in each of the
Expand All @@ -2000,7 +2000,7 @@ trait Eq {
}

// In an impl, `self` refers just to the value of the receiver
impl int: Eq {
impl Eq for int {
fn equals(&self, other: &int) -> bool { *other == *self }
}
~~~~
Expand All @@ -2021,10 +2021,10 @@ trait Shape { static fn new(area: float) -> Self; }
struct Circle { radius: float }
struct Square { length: float }

impl Circle: Shape {
impl Shape for Circle {
static fn new(area: float) -> Circle { Circle { radius: sqrt(area / pi) } }
}
impl Square: Shape {
impl Shape for Square {
static fn new(area: float) -> Square { Square { length: sqrt(area) } }
}

Expand Down Expand Up @@ -2084,7 +2084,7 @@ However, consider this function:

~~~~
# type Circle = int; type Rectangle = int;
# impl int: Drawable { fn draw(&self) {} }
# impl Drawable for int { fn draw(&self) {} }
# fn new_circle() -> int { 1 }
trait Drawable { fn draw(&self); }

Expand Down Expand Up @@ -2120,9 +2120,8 @@ value to an object:
# fn new_rectangle() -> Rectangle { true }
# fn draw_all(shapes: &[@Drawable]) {}

impl Circle: Drawable { fn draw(&self) { ... } }

impl Rectangle: Drawable { fn draw(&self) { ... } }
impl Drawable for Circle { fn draw(&self) { ... } }
impl Drawable for Rectangle { fn draw(&self) { ... } }

let c: @Circle = @new_circle();
let r: @Rectangle = @new_rectangle();
Expand All @@ -2140,7 +2139,7 @@ for example, an `@Circle` may not be cast to an `~Drawable`.
~~~
# type Circle = int; type Rectangle = int;
# trait Drawable { fn draw(&self); }
# impl int: Drawable { fn draw(&self) {} }
# impl Drawable for int { fn draw(&self) {} }
# fn new_circle() -> int { 1 }
# fn new_rectangle() -> int { 2 }
// A managed object
Expand Down Expand Up @@ -2180,10 +2179,10 @@ Now, we can implement `Circle` on a type only if we also implement `Shape`.
# use float::sqrt;
# fn square(x: float) -> float { x * x }
struct CircleStruct { center: Point, radius: float }
impl CircleStruct: Circle {
impl Circle for CircleStruct {
fn radius(&self) -> float { sqrt(self.area() / pi) }
}
impl CircleStruct: Shape {
impl Shape for CircleStruct {
fn area(&self) -> float { pi * square(self.radius) }
}
~~~~
Expand Down Expand Up @@ -2215,8 +2214,8 @@ Likewise, supertrait methods may also be called on trait objects.
# use float::sqrt;
# struct Point { x: float, y: float }
# struct CircleStruct { center: Point, radius: float }
# impl CircleStruct: Circle { fn radius(&self) -> float { sqrt(self.area() / pi) } }
# impl CircleStruct: Shape { fn area(&self) -> float { pi * square(self.radius) } }
# impl Circle for CircleStruct { fn radius(&self) -> float { sqrt(self.area() / pi) } }
# impl Shape for CircleStruct { fn area(&self) -> float { pi * square(self.radius) } }

let concrete = @CircleStruct{center:Point{x:3f,y:4f},radius:5f};
let mycircle: Circle = concrete as @Circle;
Expand Down
Loading