about summary refs log tree commit diff
path: root/src/libtime
AgeCommit message (Collapse)AuthorLines
2014-05-14libtime: Remove all uses of `~str` from `libtime`Patrick Walton-261/+267
2014-05-12Add the patch number to version strings. Closes #13289Brian Anderson-1/+1
2014-04-18Replace all ~"" with "".to_owned()Richo Healey-212/+212
2014-04-10libstd: Implement `StrBuf`, a new string buffer type like `Vec`, andPatrick Walton-2/+6
port all code over to use it.
2014-04-04Fix fallout from std::libc separationCorey Richardson-4/+4
2014-04-03Bump version to 0.11-preBrian Anderson-1/+1
This also changes some of the download links in the documentation to 'nightly'.
2014-04-03auto merge of #13286 : alexcrichton/rust/release, r=brsonbors-1/+1
Merging the 0.10 release into the master branch.
2014-03-31Make libtime fields publicSteven Fackler-13/+13
2014-03-31Bump version to 0.10Alex Crichton-1/+1
2014-03-28Convert most code to new inner attribute syntax.Brian Anderson-9/+9
Closes #2569
2014-03-22Add #[deny(deprecated_owned_vector)] to several modules.Huon Wilson-1/+1
2014-03-21test: Make manual changes to deal with the fallout from removal ofPatrick Walton-2/+2
`~[T]` in test, libgetopts, compiletest, librustdoc, and libnum.
2014-03-20Register new snapshotsAlex Crichton-1/+1
2014-03-20Removing imports of std::vec_ng::VecAlex Crichton-1/+0
It's now in the prelude.
2014-03-16Document the Tm struct and fieldsCadence Marseille-12/+43
2014-03-15log: Introduce liblog, the old std::loggingAlex Crichton-1/+2
This commit moves all logging out of the standard library into an external crate. This crate is the new crate which is responsible for all logging macros and logging implementation. A few reasons for this change are: * The crate map has always been a bit of a code smell among rust programs. It has difficulty being loaded on almost all platforms, and it's used almost exclusively for logging and only logging. Removing the crate map is one of the end goals of this movement. * The compiler has a fair bit of special support for logging. It has the __log_level() expression as well as generating a global word per module specifying the log level. This is unfairly favoring the built-in logging system, and is much better done purely in libraries instead of the compiler itself. * Initialization of logging is much easier to do if there is no reliance on a magical crate map being available to set module log levels. * If the logging library can be written outside of the standard library, there's no reason that it shouldn't be. It's likely that we're not going to build the highest quality logging library of all time, so third-party libraries should be able to provide just as high-quality logging systems as the default one provided in the rust distribution. With a migration such as this, the change does not come for free. There are some subtle changes in the behavior of liblog vs the previous logging macros: * The core change of this migration is that there is no longer a physical log-level per module. This concept is still emulated (it is quite useful), but there is now only a global log level, not a local one. This global log level is a reflection of the maximum of all log levels specified. The previously generated logging code looked like: if specified_level <= __module_log_level() { println!(...) } The newly generated code looks like: if specified_level <= ::log::LOG_LEVEL { if ::log::module_enabled(module_path!()) { println!(...) } } Notably, the first layer of checking is still intended to be "super fast" in that it's just a load of a global word and a compare. The second layer of checking is executed to determine if the current module does indeed have logging turned on. This means that if any module has a debug log level turned on, all modules with debug log levels get a little bit slower (they all do more expensive dynamic checks to determine if they're turned on or not). Semantically, this migration brings no change in this respect, but runtime-wise, this will have a perf impact on some code. * A `RUST_LOG=::help` directive will no longer print out a list of all modules that can be logged. This is because the crate map will no longer specify the log levels of all modules, so the list of modules is not known. Additionally, warnings can no longer be provided if a malformed logging directive was supplied. The new "hello world" for logging looks like: #[phase(syntax, link)] extern crate log; fn main() { debug!("Hello, world!"); }
2014-03-15Add rustdoc html crate infoSteven Fackler-0/+3
2014-03-14Implement TotalEq and TotalOrd for TimespecSteven Fackler-10/+1
There's a test making sure that Ord works, so the order dependence shouldn't be an issue
2014-03-14lint: add lint for use of a `~[T]`.Huon Wilson-0/+1
This is useless at the moment (since pretty much every crate uses `~[]`), but should help avoid regressions once completely removed from a crate.
2014-03-08Removed DeepClone. Issue #12698.Michael Darakananda-2/+2
2014-02-28std: Change assert_eq!() to use {} instead of {:?}Alex Crichton-4/+4
Formatting via reflection has been a little questionable for some time now, and it's a little unfortunate that one of the standard macros will silently use reflection when you weren't expecting it. This adds small bits of code bloat to libraries, as well as not always being necessary. In light of this information, this commit switches assert_eq!() to using {} in the error message instead of {:?}. In updating existing code, there were a few error cases that I encountered: * It's impossible to define Show for [T, ..N]. I think DST will alleviate this because we can define Show for [T]. * A few types here and there just needed a #[deriving(Show)] * Type parameters needed a Show bound, I often moved this to `assert!(a == b)` * `Path` doesn't implement `Show`, so assert_eq!() cannot be used on two paths. I don't think this is much of a regression though because {:?} on paths looks awful (it's a byte array). Concretely speaking, this shaved 10K off a 656K binary. Not a lot, but sometime significant for smaller binaries.
2014-02-21Move time out of extra (cc #8784)Arcterus-0/+1484