Commit Graph

23512 Commits

Author SHA1 Message Date
Noufal Ibrahim
759c0168a1 Create epub versions of tutorial and ref manual.
Pandoc can create epub verions of the markdown files. Since the docs
are lengthy, epubs are handy to have around. Two rules to create epub
versions of the reference manual and the main tutorial are added here.

Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
2013-11-03 18:39:36 +05:30
bors
1bbd4afb4a auto merge of #10181 : brson/rust/managed_boxes, r=thestinger 2013-10-31 20:36:17 -07:00
bors
d04a58cf2d auto merge of #9740 : alexcrichton/rust/concat, r=cmr
This extension can be used to concatenate string literals at compile time. C has
this useful ability when placing string literals lexically next to one another,
but this needs to be handled at the syntax extension level to recursively expand
macros.

The major use case for this is something like:

    macro_rules! mylog( ($fmt:expr $($arg:tt)*) => {
        error2!(concat!(file!(), ":", line!(), " - ", $fmt) $($arg)*);
    })

Where the mylog macro will automatically prepend the filename/line number to the
beginning of every log message.
2013-10-31 17:51:26 -07:00
bors
23df6f9775 auto merge of #10206 : brson/rust/configure, r=brson 2013-10-31 15:36:36 -07:00
Brian Anderson
424e91a47d Fix fallback configuration flags 2013-10-31 15:27:54 -07:00
Alex Crichton
a49e65c2ed Implement a concat!() format extension
This extension can be used to concatenate string literals at compile time. C has
this useful ability when placing string literals lexically next to one another,
but this needs to be handled at the syntax extension level to recursively expand
macros.

The major use case for this is something like:

    macro_rules! mylog( ($fmt:expr $($arg:tt)*) => {
        error2!(concat!(file!(), ":", line!(), " - ", $fmt) $($arg)*);
    })

Where the mylog macro will automatically prepend the filename/line number to the
beginning of every log message.
2013-10-31 13:46:10 -07:00
Brian Anderson
6a33cc244a Make managed_boxes feature gate error less opinionated 2013-10-31 10:45:03 -07:00
bors
b2f62acaeb auto merge of #10167 : briantdawn/rust/master, r=cmr
To keep consistency with the word "borrowing" I suppose an alternate way to write this could be "Having an object borrow an immutable pointer freezes it and prevents mutation".
2013-10-31 10:31:56 -07:00
bors
e976de32dc auto merge of #10193 : osaut/rust/Fix_install, r=huonw
Fix missing parentheses coming from a previous substitution '$(PREFIX_ROOT)' to  '$(CFG_MANDIR' on 1c4a348b07
2013-10-31 07:46:50 -07:00
bors
c7d5a52144 auto merge of #10189 : alexcrichton/rust/inner-statics, r=cmr
Closes #9186
2013-10-31 04:46:34 -07:00
Olivier Saut
a6cd20bff9 Fix missing parenthesis in a previous substitution '$(PREFIX_ROOT)' to '$(CFG_MANDIR' on 1c4a348b07 2013-10-31 11:33:02 +01:00
bors
55eed055cf auto merge of #10180 : alexcrichton/rust/flush-default, r=brson
Closes #9126
2013-10-31 02:16:40 -07:00
bors
68bf48e044 auto merge of #10166 : brson/rust/meta, r=alexcrichton
This doesn't fix #623 but works around it by limiting the grammar.
2013-10-30 23:41:22 -07:00
bors
c888fc6db2 auto merge of #10164 : brson/rust/configure, r=brson
Rebase of #9990
2013-10-30 21:06:33 -07:00
Alex Crichton
0db50056ae Forbid type parameters in inner statics
Closes #9186
2013-10-30 19:52:00 -07:00
bors
f73a48e9fd auto merge of #10120 : Kimundi/rust/remove_sys, r=alexcrichton
- `begin_unwind` and `fail!` is now generic over any `T: Any + Send`.
- Every value you fail with gets boxed as an `~Any`.
- Because of implementation issues, `&'static str` and `~str` are still
  handled specially behind the scenes.
- Changed the big macro source string in libsyntax to a raw string
  literal, and enabled doc comments there.
2013-10-30 18:31:26 -07:00
Alex Crichton
452e5cdf11 Make Writer::flush a no-op default method
Closes #9126
2013-10-30 15:17:11 -07:00
Brian Anderson
6ef1ab99c1 syntax: Forbid non-string literals in meta items. #623 2013-10-30 14:06:22 -07:00
bors
6789a77fa0 auto merge of #10172 : pythonesque/rust/issue-9890, r=thestinger 2013-10-30 13:26:29 -07:00
Marvin Löbel
54f4dcd76a Prepared std::sys for removal, and made begin_unwind simpler
- `begin_unwind` is now generic over any `T: Any + Send`.
- Every value you fail with gets boxed as an `~Any`.
- Because of implementation details, `&'static str` and `~str` are still
  handled specially behind the scenes.
- Changed the big macro source string in libsyntax to a raw string
  literal, and enabled doc comments there.
2013-10-30 21:19:18 +01:00
Joshua Yanovski
eee892c4be Special-casing iter_vec_raw to use a counter for zero-size types (Closes #9890). 2013-10-30 04:48:53 -07:00
bors
623daf66a9 auto merge of #10123 : klutzy/rust/fix-7507, r=alexcrichton
This patch fixes rustc to emit explicit error if LHS of assignment is
not allowed.

Fixes #7507
Fixes #7508
2013-10-30 04:36:26 -07:00
bors
a0e6e0e9b7 auto merge of #10168 : reedlepee123/rust/priv_fields, r=brson
....rs #8180
2013-10-30 03:31:20 -07:00
klutzy
cab00457fe test: Add test for LHS expression check 2013-10-30 16:45:20 +09:00
klutzy
47abdbd0fe rustc: Check LHS expression of assignment
Fixes #7507
Fixes #7508
2013-10-30 16:45:20 +09:00
bors
5e1a691125 auto merge of #9613 : jld/rust/enum-discrim-size.r0, r=alexcrichton
Allows an enum with a discriminant to use any of the primitive integer types to store it.  By default the smallest usable type is chosen, but this can be overridden with an attribute: `#[repr(int)]` etc., or `#[repr(C)]` to match the target's C ABI for the equivalent C enum.

Also adds a lint pass for using non-FFI safe enums in extern declarations, checks that specified discriminants can be stored in the specified type if any, and fixes assorted code that was assuming int.
2013-10-30 00:31:23 -07:00
Jed Davis
86a710e454 Fix check-fast breakage in new enum test. 2013-10-30 00:13:17 -07:00
bors
e42e378f32 auto merge of #10163 : brson/rust/rtcxx, r=alexcrichton 2013-10-29 21:26:20 -07:00
bors
cd1661df29 auto merge of #10161 : brson/rust/upcall, r=alexcrichton 2013-10-29 20:16:28 -07:00
bors
e4938aabbb auto merge of #10149 : chris-morgan/rust/2013-10-29-vim-updates, r=erickt
- Syntax updates for the regular prelude changes.
- Fix an issue with the indentation of the second line of wrapped function arguments.
2013-10-29 19:07:55 -07:00
reedlepee
d10106e919 changed all the impl<T> to impl<T: Send> in rt::comm.rs and libstd::comm.rs #8180 2013-10-30 06:45:12 +05:30
bors
13e5ce337f auto merge of #10160 : alexcrichton/rust/snapshots, r=pcwalton
Notably this deletes `std::rt::uv`
2013-10-29 18:01:50 -07:00
Brian
986fb3c617 Fixed incorrect usage of 'Borrowing'. 2013-10-30 00:47:42 +00:00
Brian Anderson
fce9d7fc37 rt: Remove array_list.h 2013-10-29 17:06:55 -07:00
Brian Anderson
4a318d6e0f rt: Remove rust_thread::detach 2013-10-29 17:02:37 -07:00
Brian Anderson
24a69ddbbc rt: Remove four unused upcalls 2013-10-29 16:49:38 -07:00
bors
c7853c9ad2 auto merge of #10145 : TeXitoi/rust/issues-2913, r=bstrie
The old version didn't follow shootout's directives: no memory were
deallocated.  At the same time, parallelisation of the computation.

fix #2913
2013-10-29 16:26:25 -07:00
Heather
b9504f9931 support for GNU configure syntax corrections: patch from brson 2013-10-29 16:22:57 -07:00
Heather
1c4a348b07 Correct prefix / CFG_PREFIX work in configure / install.mk 2013-10-29 16:22:57 -07:00
Heather
8a593a8bdb support for GNU configure syntax 2013-10-29 16:22:08 -07:00
Alex Crichton
e203f30bc7 Register new snapshots 2013-10-29 15:56:16 -07:00
bors
611c94d984 auto merge of #10134 : reedlepee123/rust/priv_fields, r=brson 2013-10-29 15:11:30 -07:00
bors
886819cca1 auto merge of #10140 : brson/rust/comm, r=alexcrichton
Just putting this public trait into the correct module.
2013-10-29 13:37:08 -07:00
bors
67d7be0ff1 auto merge of #10136 : hatahet/rust/master, r=alexcrichton
Fixes #10077
2013-10-29 12:02:59 -07:00
bors
fed48cc861 auto merge of #10132 : pcwalton/rust/proc, r=pcwalton
the feature gate for `once fn` if used with the `~` sigil.

r? @brson
2013-10-29 10:52:25 -07:00
Patrick Walton
7e77bf1769 librustc: Implement the proc type as sugar for ~once fn and proc
notation for closures, and disable the feature gate for `once fn` if
used with the `~` sigil.
2013-10-29 10:34:17 -07:00
bors
52f42f1638 auto merge of #10058 : alexcrichton/rust/uv-crate, r=brson
This is one of the final steps needed to complete #9128. It still needs a little bit of polish before closing that issue, but it's in a pretty much "done" state now.

The idea here is that the entire event loop implementation using libuv is now housed in `librustuv` as a completely separate library. This library is then injected (via `extern mod rustv`) into executable builds (similarly to how libstd is injected, tunable via `#[no_uv]`) to bring in the "rust blessed event loop implementation."

Codegen-wise, there is a new `event_loop_factory` language item which is tagged on a function with 0 arguments returning `~EventLoop`. This function's symbol is then inserted into the crate map for an executable crate, and if there is no definition of the `event_loop_factory` language item then the value is null.

What this means is that embedding rust as a library in another language just got a little harder. Libraries don't have crate maps, which means that there's no way to find the event loop implementation to spin up the runtime. That being said, it's always possible to build the runtime manually. This request also makes more runtime components public which should probably be public anyway. This new public-ness should allow custom scheduler setups everywhere regardless of whether you follow the `rt::start `path.
2013-10-29 09:36:47 -07:00
Jed Davis
c0190a9cfb Prevent unoptimized rustpkg tests from running out of stack.
The actual fix would be to make rustpkg use `rustc::monitor` so it picks
up anything special that rustc needs, but for now let's keep the tests
from breaking.
2013-10-29 09:09:20 -07:00
Jed Davis
49f851c2c9 Fix type_of for enums to not lose data in some cases when immediate.
The previous implementation, when combined with small discriminants and
immediate types, caused problems for types like `Either<u8, i16>` which
are now small enough to be immediate and can have fields intersecting
the highest-alignment variant's alignment padding (which LLVM doesn't
preserve).  So let's not do that.
2013-10-29 09:09:20 -07:00
Jed Davis
ac4644d7de Add another discriminant-size-related test, this time with fields. 2013-10-29 09:09:20 -07:00