Commit Graph

86 Commits

Author SHA1 Message Date
Luqman Aden
38aca17c47 Remove libdebug and update tests. 2014-10-16 11:15:34 -04:00
bors
ff61b74a7d auto merge of #17467 : hatahet/rust/mybranch, r=alexcrichton
[breaking-change]
2014-10-13 00:22:39 +00:00
Ziad Hatahet
84ce372cee libtime: strftime and strptime return type changed to Result<String, ParseError>.
`strftime` currently returns a `String`. This does not indicate that
this function may return an error due to to a malformed format string.
This change introduces a `ParseError` enum which indicates the type of
error that occurred. The return type of `strptime` was also changed to
use this new enum instead of returning `Result<String, String>`. Now,
all instances where `strftime` was used need to have their return value
checked to see if it were valid or not.

[breaking-change]
2014-10-12 13:07:59 -07:00
Alex Crichton
dae48a07f3 Register new snapshots
Also convert a number of `static mut` to just a plain old `static` and remove
some unsafe blocks.
2014-10-10 22:09:49 -07:00
Brian Anderson
5c92a8e054 Use the same html_root_url for all docs 2014-10-09 10:50:13 -07:00
Brian Anderson
6beddcfd83 Revert "Update html_root_url for 0.12.0 release"
This reverts commit 2288f33230.
2014-10-09 10:34:34 -07:00
Brian Anderson
2288f33230 Update html_root_url for 0.12.0 release 2014-10-07 11:18:50 -07:00
bors
ff2616e847 auto merge of #17630 : sfackler/rust/cfg-warnings, r=brson
Closes #17490
2014-10-01 09:22:15 +00:00
Steven Fackler
448c8bf24e Fix libtime 2014-09-30 12:52:46 -07:00
Patrick Walton
416144b827 librustc: Forbid .. in range patterns.
This breaks code that looks like:

    match foo {
        1..3 => { ... }
    }

Instead, write:

    match foo {
        1...3 => { ... }
    }

Closes #17295.

[breaking-change]
2014-09-30 09:11:26 -07:00
Steven Fackler
65cca7c8b1 Deprecate #[ignore(cfg(...))]
Replace `#[ignore(cfg(a, b))]` with `#[cfg_attr(all(a, b), ignore)]`
2014-09-23 23:49:20 -07:00
Aaron Turon
fc525eeb4e Fallout from renaming 2014-09-16 14:37:48 -07:00
bors
8d5e64f3bc auto merge of #16981 : kmcallister/rust/ctypes-warning, r=alexcrichton 2014-09-04 13:01:00 +00:00
Keegan McAllister
7f676b8699 Fix some non-FFI-safe types in externs 2014-09-03 19:01:15 -07:00
Ruud van Asseldonk
0b4912b9af libtime: Fix adding negative duration to Timespec. 2014-09-03 21:28:54 +02:00
Ruud van Asseldonk
d20de6d5c5 libtime: Use Duration in Timespec arithmetic. 2014-08-29 18:54:36 +02:00
Nick Cameron
52ef46251e Rebasing changes 2014-08-26 16:07:32 +12:00
Nick Cameron
34d607f9c9 Use the slice repr for ~[T] 2014-08-26 12:37:45 +12:00
Ruud van Asseldonk
62b1fbe7de libtime: Implement Add and Sub for Timespec. 2014-08-18 13:12:56 +02:00
Daniel Brooks
cbf407c8d0 time::Tm should impl Eq in addition to PartialEq 2014-08-02 10:25:32 -07:00
bors
020b91b436 auto merge of #16164 : anguslees/rust/rfc3999, r=alexcrichton
Fixes #16158
2014-08-02 08:36:09 +00:00
Angus Lees
17d5c64941 Change strptime::match_strs to use borrowed rather than owned strings
Also modernise a few constructs in match_strs().
2014-08-01 15:39:00 +10:00
Angus Lees
4d52e436c4 Correct RFC reference in time::Tm::rfc3339 docs
Fixes #16158
2014-08-01 14:08:04 +10:00
bors
8d43e4474a auto merge of #15867 : cmr/rust/rewrite-lexer4, r=alexcrichton 2014-07-22 07:16:17 +00:00
Corey Richardson
188d889aaf ignore-lexer-test to broken files and remove some tray hyphens
I blame @ChrisMorgan for the hyphens.
2014-07-21 10:59:58 -07:00
Adolfo Ochagavía
584fbde5d1 Fix errors 2014-07-15 20:34:16 +02:00
Adolfo Ochagavía
05baf9b10c Deprecate str::from_char
Use `String::from_char` or `.to_str` instead

[breaking-change]
2014-07-15 19:55:18 +02:00
Adolfo Ochagavía
211f1caa29 Deprecate str::from_utf8_owned
Use `String::from_utf8` instead

[breaking-change]
2014-07-15 19:55:17 +02:00
Brian Anderson
fa2d220567 Update doc URLs for version bump 2014-07-11 11:21:57 -07:00
Alex Crichton
0c71e0c596 Register new snapshots
Closes #15544
2014-07-09 10:57:58 -07:00
Richo Healey
12c334a77b std: Rename the ToStr trait to ToString, and to_str to to_string.
[breaking-change]
2014-07-08 13:01:43 -07:00
Alex Crichton
e44c2b9bbc Add #[crate_name] attributes as necessary 2014-07-05 12:45:42 -07:00
bors
9766b493fc auto merge of #15369 : omasanori/rust/asctime, r=alexcrichton
In C, `ctime(t)` is equivalent to `asctime(localtime(t))`, so the result should depend on the local timezone. Current `ctime` is compatible with `asctime` in C, not `ctime`.

This commit renames `ctime` to `asctime` and adds `ctime` which converts the time to the local timezone before formatting it.

This commit also fixes the documentation of them. Current documentation of `ctime` says it returns "a string of the current time." However, it actually returns a string of the time represented as `self`, not the time when it is called.
2014-07-04 06:41:17 +00:00
bors
5b11610ced auto merge of #15343 : alexcrichton/rust/0.11.0-release, r=brson 2014-07-04 01:21:19 +00:00
OGINO Masanori
0c5b627232 Fix minor issues in the documentation of libtime.
- When the timezone is UTC, the "zone" field of the RFC 822 format is
  "GMT" (or "UT"), not "UTC."

- Although the name of `rfc3999` refers to RFC 3999, the documentation
  of it refers only to ISO 8601. This commit adds a description of the
  relation between ISO 8601 and RFC 3999.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-07-03 12:54:52 -07:00
OGINO Masanori
4530f8b2ef Rename ctime to asctime and add *proper* ctime.
In C, `ctime(t)` is equivalent to `asctime(localtime(t))`, so the result
should depend on the local timezone. Current `ctime` is compatible with
`asctime` in C, not `ctime`.

This commit renames `ctime` to `asctime` and adds `ctime` which converts
the time to the local timezone before formatting it.

This commit also fixes the documentation of them. Current documentation
of `ctime` says it returns "a string of the current time." However, it
actually returns a string of the time represented as `self`, not the
time when it is called.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-07-04 00:18:30 +09:00
Alex Crichton
ff1dd44b40 Merge remote-tracking branch 'origin/master' into 0.11.0-release
Conflicts:
	src/libstd/lib.rs
2014-07-02 11:08:21 -07:00
Brian Anderson
d21336ee0a rustc: Remove &str indexing from the language.
Being able to index into the bytes of a string encourages
poor UTF-8 hygiene. To get a view of `&[u8]` from either
a `String` or `&str` slice, use the `as_bytes()` method.

Closes #12710.

[breaking-change]
2014-07-01 19:12:29 -07:00
Alex Crichton
0dfc90ab15 Rename all raw pointers as necessary 2014-06-28 11:53:58 -07:00
Alex Crichton
aa1163b92d Update to 0.11.0 2014-06-27 12:50:16 -07:00
Brian Anderson
77657baf2c Mark all crates except std as experimental 2014-06-17 22:13:36 -07:00
bors
2ef910f71a auto merge of #14715 : vhbit/rust/ios-pr2, r=alexcrichton 2014-06-16 06:32:03 +00:00
Alex Crichton
f20b1293fc Register new snapshots 2014-06-14 10:28:09 -07:00
Valerii Hiora
a49b765f9a Basic iOS support 2014-06-12 21:15:14 +03:00
Alex Crichton
3316b1eb7c rustc: Remove ~[T] from the language
The following features have been removed

* box [a, b, c]
* ~[a, b, c]
* box [a, ..N]
* ~[a, ..N]
* ~[T] (as a type)
* deprecated_owned_vector lint

All users of ~[T] should move to using Vec<T> instead.
2014-06-11 15:02:17 -07:00
Alex Crichton
b1c9ce9c6f sync: Move underneath libstd
This commit is the final step in the libstd facade, #13851. The purpose of this
commit is to move libsync underneath the standard library, behind the facade.
This will allow core primitives like channels, queues, and atomics to all live
in the same location.

There were a few notable changes and a few breaking changes as part of this
movement:

* The `Vec` and `String` types are reexported at the top level of libcollections
* The `unreachable!()` macro was copied to libcore
* The `std::rt::thread` module was moved to librustrt, but it is still
  reexported at the same location.
* The `std::comm` module was moved to libsync
* The `sync::comm` module was moved under `sync::comm`, and renamed to `duplex`.
  It is now a private module with types/functions being reexported under
  `sync::comm`. This is a breaking change for any existing users of duplex
  streams.
* All concurrent queues/deques were moved directly under libsync. They are also
  all marked with #![experimental] for now if they are public.
* The `task_pool` and `future` modules no longer live in libsync, but rather
  live under `std::sync`. They will forever live at this location, but they may
  move to libsync if the `std::task` module moves as well.

[breaking-change]
2014-06-11 10:00:43 -07:00
Keegan McAllister
ffb2f12ed8 Use phase(plugin) in bootstrap crates
Do this to avoid warnings on post-stage0 builds.
2014-06-09 14:29:30 -07:00
Alex Crichton
e5bbbca33e rustdoc: Submit examples to play.rust-lang.org
This grows a new option inside of rustdoc to add the ability to submit examples
to an external website. If the `--markdown-playground-url` command line option
or crate doc attribute `html_playground_url` is present, then examples will have
a button on hover to submit the code to the playground specified.

This commit enables submission of example code to play.rust-lang.org. The code
submitted is that which is tested by rustdoc, not necessarily the exact code
shown in the example.

Closes #14654
2014-06-06 20:00:16 -07:00
Adolfo Ochagavía
501b904bb7 Change to_str().to_string() to just to_str() 2014-06-06 09:56:59 +02:00
Alex Crichton
bba701c59d std: Drop Total from Total{Eq,Ord}
This completes the last stage of the renaming of the comparison hierarchy of
traits. This change renames TotalEq to Eq and TotalOrd to Ord.

In the future the new Eq/Ord will be filled out with their appropriate methods,
but for now this change is purely a renaming change.

[breaking-change]
2014-06-01 10:31:27 -07:00