Commit Graph

22517 Commits

Author SHA1 Message Date
Felix S. Klock II 4e543f7a93 fixed another test. 2013-09-20 03:15:21 +02:00
Felix S. Klock II 9627e80ce5 fix bug in test. 2013-09-20 03:09:57 +02:00
Felix S. Klock II 89b363de0c Resolves third bullet of #4691, and adds tests for it. Fix #4691. 2013-09-20 02:59:06 +02:00
Daniel Micay 9e3258e51f restore auto-detection of text files
We force the usage of LF line endings, but *only* in text files.
2013-09-19 19:06:05 -04:00
bors 570431fcac auto merge of #9342 : alexcrichton/rust/ignore-libuv-signal-tests, r=brson
They're causing syscalls to get interrupted, and std::io doesn't correctly
handle EINTR
2013-09-19 15:56:04 -07:00
Steven Fackler 963707f45d Clean up unused imports 2013-09-19 15:19:25 -07:00
Steven Fackler 48d5b4b8e1 Add Future::spawn_with 2013-09-19 15:19:25 -07:00
Steven Fackler ff85389344 Modernize extra::future API 2013-09-19 15:19:20 -07:00
Alex Crichton 5165ecde66 Ignore io::process tests
They're causing syscalls to get interrupted, and std::io doesn't correctly
handle EINTR
2013-09-19 15:17:29 -07:00
Benjamin Herr 567c567b2d lexer: further slight improvements to lexer errors 2013-09-19 23:08:06 +02:00
Steve Klabnik ad5f619d8a Update rustpkg manpage to add init.
I didn't update the manpage when I added the init command. Whoops.
2013-09-19 12:58:29 -07:00
Steve Klabnik 806105fea8 Fix usage for rustpkg init
When I took out the ability to make a new project by name, I forgot to
update the usage to reflect the changes.
2013-09-19 12:53:38 -07:00
bors 85c0fb7b8a auto merge of #9295 : alexcrichton/rust/fix-lang-items, r=thestinger
Also add a test to help prevent this from getting out of sync again.
2013-09-19 11:11:01 -07:00
Evgeny Sologubov fadc6cc4b0 pacified test/run-pass/core-run-destroy on Win7x64 2013-09-19 21:25:27 +04:00
bors 755f6229da auto merge of #9279 : erickt/rust/master, r=alexcrichton
`Some(5).or_{default,zero}` can be easily replaced with `Some(Some(5).unwrap_or_default())`.
2013-09-19 09:55:59 -07:00
Steven Fackler 2df5a13334 Removed future's destructor
It was only there to prevent Future from being copyable, but it's
noncopyable anyways since it contains a ~fn.
2013-09-19 09:06:42 -07:00
Lars Bergstrom 9051a35fc8 Clarify that snapshots are automatically retrieved. 2013-09-19 10:58:26 -05:00
bors 068e04231d auto merge of #9313 : brson/rust/relnotes, r=thestinger 2013-09-19 08:40:59 -07:00
NiccosSystem 5708b91969 Fix broken tutorial link 2013-09-19 17:18:40 +02:00
Benjamin Herr 8009c97a55 lexer: report problematic chars verbatim or as escape sequence
... instead of giving their numeric codepoint, following the lead of
fdaae34. So the error message for, say, '\_' mentions _ instead of 95,
and '\●' now mentions \u25cf.
2013-09-19 16:58:49 +02:00
Benjamin Herr 1019177958 lexer: show correct span on lexical errors
Previously, the lexer calling `rdr.fatal(...)` would report the span of
the last complete token, instead of a span within the erroneous token
(besides one span fixed in 1ac90bb).

This commit adds a wrapper around `rdr.fatal(...)` that sets the span
explicilty, so that all fatal errors in `libsyntax/parse/lexer.rs` now
report the offending code more precisely. A number of tests try to
verify that, though the `compile-fail` testing setup can only check that
the spans are on the right lines, and the "unterminated string/block
comment" errors can't have the line marked at all, so that's incomplete.

Closes #9149.
2013-09-19 16:58:11 +02:00
U-NOV2010\eugals 0c3b6ad6b8 will not copy trait_callee on stack if it's source expr is a plain borrowed ref 2013-09-19 18:34:30 +04:00
U-NOV2010\eugals dfa3f5fa8d minor Type::opaque_trait code cleanup 2013-09-19 18:34:26 +04:00
U-NOV2010\eugals 2927ab13df optimized trans_to_datum::auto_borrow_obj code generation in case some trivial cases where simple copying can be applied 2013-09-19 18:34:23 +04:00
bors da29a8e6be auto merge of #9299 : alexcrichton/rust/fmt-trailing-comma, r=huonw
This is more consistent with other parts of the language and it also makes it
easier to use in situations where format string is massive.
2013-09-19 07:06:04 -07:00
Chris Morgan d9874c0885 Rename the NaN and is_NaN methods to lowercase.
This is for consistency in naming conventions.

- ``std::num::Float::NaN()`` is changed to ``nan()``;
- ``std::num::Float.is_NaN()`` is changed to ``is_nan()``; and
- ``std::num::strconv::NumStrConv::NaN()`` is changed to ``nan()``.

Fixes #9319.
2013-09-19 23:59:51 +10:00
bors 99ec14dbb0 auto merge of #9267 : Kimundi/rust/master, r=huonw 2013-09-19 05:06:00 -07:00
Marvin Löbel 06d1dccf95 Turned extra::getopts functions into methods
Some minor api and doc adjustments
2013-09-19 12:32:18 +02:00
bors 4904bc33cc auto merge of #9292 : blake2-ppc/rust/borrow-ref-eq, r=huonw
std::borrow: Use raw pointer comparison for `ref_eq`

Compare as `*T` in `ref_eq` instead of casting to uint, to match what
std::ptr does.
2013-09-19 03:01:05 -07:00
bors a7cf7b7b0b auto merge of #9291 : jzelinskie/rust/remove-cond, r=alexcrichton
This is my first contribution, so please point out anything that I may have missed.

I consulted IRC and settled on `match () { ... }` for most of the replacements.
2013-09-19 00:31:05 -07:00
Tim Chevalier d84a22addf rustpkg: Register correct dependencies for built and installed files
as per #9112

Closes #9112
2013-09-18 22:48:37 -07:00
blake2-ppc f0630fdc8b doc: Fix the tutorial's link to rustpkg docs 2013-09-19 01:43:10 -04:00
bors 3c0013134c auto merge of #9280 : alexcrichton/rust/less-c++, r=brson
Some of the functions could be converted to rust, but the functions dealing with
signals were moved to rust_builtin.cpp instead (no reason to keep the original
file around for one function).

Closes #2674

Because less C++ is better C++!
2013-09-18 22:15:59 -07:00
Chris Morgan e2807a4565 Replace unreachable() calls with unreachable!().
This is the second of two parts of #8991, now possible as a new snapshot
has been made. (The first part implemented the unreachable!() macro; it
was #8992, 6b7b8f2682.)

``std::util::unreachable()`` is removed summarily; any code which used
it should now use the ``unreachable!()`` macro.

Closes #9312.

Closes #8991.
2013-09-19 15:04:03 +10:00
Alex Crichton c3ad785d83 Remove rust_run_program.cpp
Some of the functions could be converted to rust, but the functions dealing with
signals were moved to rust_builtin.cpp instead (no reason to keep the original
file around for one function).

Closes #2674
2013-09-18 20:58:56 -07:00
blake2-ppc bf0e2a6f57 doc: Update container tutorial with new names of methods and macros
`deque` -> `ringbuf`, mention `extra::dlist`.

fix reference to vector method `bsearch`. Also convert all output
in example code to use `print!`/`println!`
2013-09-18 23:17:07 -04:00
Brian Anderson 3bd0eb9f63 0.8 release notes 2013-09-18 20:16:02 -07:00
Daniel Micay d12e0305b1 clarify vector stub in the container tutorial
This also renames the section, as managed vectors cannot be resized
(since it would invalidate the other references).
2013-09-18 22:26:48 -04:00
bors 4dacd73651 auto merge of #9260 : alexcrichton/rust/libuv-processes, r=brson
This is a re-landing of #8645, except that the bindings are *not* being used to
power std::run just yet. Instead, this adds the bindings as standalone bindings
inside the rt::io::process module.

I made one major change from before, having to do with how pipes are
created/bound. It's much clearer now when you can read/write to a pipe, as
there's an explicit difference (different types) between an unbound and a bound
pipe. The process configuration now takes unbound pipes (and consumes ownership
of them), and will return corresponding pipe structures back if spawning is
successful (otherwise everything is destroyed normally).
2013-09-18 18:30:56 -07:00
bors 36cc41481c auto merge of #9263 : catamorphism/rust/rustpkg-issue-7879, r=brson
r? @brson Treating a package as the thing that can have other packages depend on it,
and depends on other packages, was wrong if a package has more than one
crate. Now, rustpkg knows about dependencies between crates in the same
package. This solves the problem reported in #7879 where rustpkg wrongly
discovered a circular dependency between thhe package and itself, and
recursed infinitely.

Closes #7879
2013-09-18 16:20:52 -07:00
Tim Chevalier e199790bac rustpkg: Make crates, not packages, the unit of rustpkg dependencies
Treating a package as the thing that can have other packages depend on it,
and depends on other packages, was wrong if a package has more than one
crate. Now, rustpkg knows about dependencies between crates in the same
package. This solves the problem reported in #7879 where rustpkg wrongly
discovered a circular dependency between thhe package and itself, and
recursed infinitely.

Closes #7879
2013-09-18 15:30:41 -07:00
bors 8f65529627 auto merge of #9284 : thestinger/rust/main, r=luqmana
the real entry point will now pass the user's main function directly to
the scheduler
2013-09-18 15:05:56 -07:00
Alex Crichton cb7756a81d Implement process bindings to libuv
This is a re-landing of #8645, except that the bindings are *not* being used to
power std::run just yet. Instead, this adds the bindings as standalone bindings
inside the rt::io::process module.

I made one major change from before, having to do with how pipes are
created/bound. It's much clearer now when you can read/write to a pipe, as
there's an explicit difference (different types) between an unbound and a bound
pipe. The process configuration now takes unbound pipes (and consumes ownership
of them), and will return corresponding pipe structures back if spawning is
successful (otherwise everything is destroyed normally).
2013-09-18 13:52:18 -07:00
Alex Crichton 040f1c06bc Allow trailing commas in format!
This is more consistent with other parts of the language and it also makes it
easier to use in situations where format string is massive.
2013-09-18 13:51:07 -07:00
bors d2b0b11aeb auto merge of #9296 : alexcrichton/rust/snapshots, r=cmr
huzzah!
2013-09-18 11:46:37 -07:00
Alex Crichton 817576ee70 Register new snapshots 2013-09-18 11:07:22 -07:00
bors b43ee6cd2e auto merge of #9277 : crabtw/rust/mips, r=brson
This patch fixes some errors of MIPS target, however, MIPS C ABI is still broken. I will send another PR to fix the problem.

Because MIPS target has no "generic" CPU name, I add --target-cpu and --target-feature to RUST_FLAGS. In order to workaround the "compact frame descriptions incompatible with DWARF2 .eh_frame" problem, the linker I used is CXX but not CC.
2013-09-18 09:15:56 -07:00
Alex Crichton 2f845a5e0a Renumber the lang items correctly
Also add a test to help prevent this from getting out of sync again.
2013-09-18 09:09:54 -07:00
bors e02313a172 auto merge of #9275 : blake2-ppc/rust/float-from-str, r=thestinger
std: Remove {float,f64,f32}::from_str in favor of from_str in the prelude

Like issue #9209, remove float::{from_str, from_str_radix} in favor of
the two corresponding traits. The same for modules f64 and f32.

New usage is:

    from_str::<float>("1.2e34")
2013-09-18 08:01:00 -07:00
bors 9e636f106d auto merge of #9272 : luqmana/rust/esln, r=catamorphism
Fixes #9270
2013-09-18 06:45:53 -07:00