- 27 5月, 2015 1 次提交
-
-
由 Johannes Oertel 提交于
The output of individual tests can be captured now so it's safe to use colorized output even when running tests in parallel. Closes #782.
-
- 16 5月, 2015 1 次提交
-
-
由 Alex Crichton 提交于
Helps prevent mixed content warnings if accessing docs over HTTPS. Closes #25459
-
- 14 5月, 2015 1 次提交
-
-
由 Alex Crichton 提交于
This commit is an implementation of [RFC 1040][rfc] which is a redesign of the currently-unstable `Duration` type. The API of the type has been scaled back to be more conservative and it also no longer supports negative durations. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1040-duration-reform.md The inner `duration` module of the `time` module has now been hidden (as `Duration` is reexported) and the feature name for this type has changed from `std_misc` to `duration`. All APIs accepting durations have also been audited to take a more flavorful feature name instead of `std_misc`. Closes #24874
-
- 09 5月, 2015 1 次提交
-
-
由 Barosl Lee 提交于
An automated script was run against the `.rs` and `.md` files, subsituting every occurrence of `task` with `thread`. In the `.rs` files, only the texts in the comment blocks were affected.
-
- 04 5月, 2015 1 次提交
-
-
由 Carol Nichols 提交于
-
- 02 5月, 2015 1 次提交
-
-
由 Huon Wilson 提交于
E.g. if `foo.rs` looks like #![feature(test)] extern crate test; #[bench] fn bar(b: &mut test::Bencher) { b.iter(|| { 1 }) } #[test] fn baz() {} #[bench] fn qux(b: &mut test::Bencher) { b.iter(|| { panic!() }) } Then $ rustc --test foo.rs $ ./foo running 3 tests test baz ... ok test qux ... FAILED test bar ... ok failures: ---- qux stdout ---- thread 'qux' panicked at 'explicit panic', bench.rs:17 failures: qux test result: FAILED. 2 passed; 1 failed; 0 ignored; 0 measured $ ./foo --bench ba running 2 tests test baz ... ignored test bar ... bench: 97 ns/iter (+/- 74) test result: ok. 0 passed; 0 failed; 1 ignored; 1 measured In particular, the two benchmark are being run as tests in the default mode. This helps for the main distribution, since benchmarks are only run with `PLEASE_BENCH=1`, which is rarely set (and never set on the test bots), and helps for code-coverage tools: benchmarks are run and so don't count as dead code. Fixes #15842.
-
- 22 4月, 2015 1 次提交
-
-
由 Alex Crichton 提交于
This commit removes all the old casting/generic traits from `std::num` that are no longer in use by the standard library. This additionally removes the old `strconv` module which has not seen much use in quite a long time. All generic functionality has been supplanted with traits in the `num` crate and the `strconv` module is supplanted with the [rust-strconv crate][rust-strconv]. [rust-strconv]: https://github.com/lifthrasiir/rust-strconv This is a breaking change due to the removal of these deprecated crates, and the alternative crates are listed above. [breaking-change]
-
- 21 4月, 2015 1 次提交
-
-
由 Tamir Duberstein 提交于
-
- 16 4月, 2015 1 次提交
-
-
由 Erick Tryzelaar 提交于
-
- 15 4月, 2015 1 次提交
-
-
由 Tamir Duberstein 提交于
`s/([^\(\s]+\.)len\(\) [(?:!=)>] 0/!$1is_empty()/g`
-
- 02 4月, 2015 3 次提交
-
-
由 Alex Crichton 提交于
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
for `Box<FnBox()>`. I found the alias was still handy because it is shorter than the fully written type. This is a [breaking-change]: convert code using `Invoke` to use `FnBox`, which is usually pretty straight-forward. Code using thunk mostly works if you change `Thunk::new => Box::new` and `foo.invoke(arg)` to `foo(arg)`.
-
- 01 4月, 2015 3 次提交
-
-
由 Niko Matsakis 提交于
-
由 Alex Crichton 提交于
This commit cleans out a large amount of deprecated APIs from the standard library and some of the facade crates as well, updating all users in the compiler and in tests as it goes along.
-
由 Aaron Turon 提交于
* Marks `#[stable]` the contents of the `std::convert` module. * Added methods `PathBuf::as_path`, `OsString::as_os_str`, `String::as_str`, `Vec::{as_slice, as_mut_slice}`. * Deprecates `OsStr::from_str` in favor of a new, stable, and more general `OsStr::new`. * Adds unstable methods `OsString::from_bytes` and `OsStr::{to_bytes, to_cstring}` for ergonomic FFI usage. [breaking-change]
-
- 30 3月, 2015 1 次提交
-
-
由 Andrew Paseltiner 提交于
-
- 28 3月, 2015 2 次提交
-
-
由 Richo Healey 提交于
-
由 Richo Healey 提交于
-
- 27 3月, 2015 2 次提交
-
-
由 Alex Crichton 提交于
Now that support has been removed, all lingering use cases are renamed.
-
由 Alex Crichton 提交于
-
- 25 3月, 2015 1 次提交
-
-
由 Nick Cameron 提交于
This permits all coercions to be performed in casts, but adds lints to warn in those cases. Part of this patch moves cast checking to a later stage of type checking. We acquire obligations to check casts as part of type checking where we previously checked them. Once we have type checked a function or module, then we check any cast obligations which have been acquired. That means we have more type information available to check casts (this was crucial to making coercions work properly in place of some casts), but it means that casts cannot feed input into type inference. [breaking change] * Adds two new lints for trivial casts and trivial numeric casts, these are warn by default, but can cause errors if you build with warnings as errors. Previously, trivial numeric casts and casts to trait objects were allowed. * The unused casts lint has gone. * Interactions between casting and type inference have changed in subtle ways. Two ways this might manifest are: - You may need to 'direct' casts more with extra type information, for example, in some cases where `foo as _ as T` succeeded, you may now need to specify the type for `_` - Casts do not influence inference of integer types. E.g., the following used to type check: ``` let x = 42; let y = &x as *const u32; ``` Because the cast would inform inference that `x` must have type `u32`. This no longer applies and the compiler will fallback to `i32` for `x` and thus there will be a type error in the cast. The solution is to add more type information: ``` let x: u32 = 42; let y = &x as *const u32; ```
-
- 24 3月, 2015 2 次提交
-
-
由 Aaron Turon 提交于
This commit: * Introduces `std::convert`, providing an implementation of RFC 529. * Deprecates the `AsPath`, `AsOsStr`, and `IntoBytes` traits, all in favor of the corresponding generic conversion traits. Consequently, various IO APIs now take `AsRef<Path>` rather than `AsPath`, and so on. Since the types provided by `std` implement both traits, this should cause relatively little breakage. * Deprecates many `from_foo` constructors in favor of `from`. * Changes `PathBuf::new` to take no argument (creating an empty buffer, as per convention). The previous behavior is now available as `PathBuf::from`. * De-stabilizes `IntoCow`. It's not clear whether we need this separate trait. Closes #22751 Closes #14433 [breaking-change]
-
由 Brian Anderson 提交于
-
- 20 3月, 2015 2 次提交
-
-
由 Steve Klabnik 提交于
As @alexcrichton says, this was really a libgreen thing, and isn't relevant now. As this removes a technically-public function, this is a [breaking-change] Conflicts: src/libtest/lib.rs
-
由 Steve Klabnik 提交于
We don't use 'task' anymore, these are now threads. Because this changes the name of a compiler option, this is [breaking-change]
-
- 17 3月, 2015 1 次提交
-
-
由 Alex Crichton 提交于
The [associated RFC][rfc] for possibly splitting out `flush` has been closed and as a result there are no more blockers for stabilizing this method, so this commit marks the method as such. [rfc]: https://github.com/rust-lang/rfcs/pull/950
-
- 15 3月, 2015 1 次提交
-
-
由 Simonas Kazlauskas 提交于
-
- 14 3月, 2015 2 次提交
-
-
由 Manish Goregaokar 提交于
This reverts commit bce7a6f4.
-
由 Alex Crichton 提交于
-
- 13 3月, 2015 1 次提交
-
-
由 Aaron Turon 提交于
This commit stabilizes essentially all of the new `std::path` API. The API itself is changed in a couple of ways (which brings it in closer alignment with the RFC): * `.` components are now normalized away, unless they appear at the start of a path. This in turn effects the semantics of e.g. asking for the file name of `foo/` or `foo/.`, both of which yield `Some("foo")` now. This semantics is what the original RFC specified, and is also desirable given early experience rolling out the new API. * The `parent` function now succeeds if, and only if, the path has at least one non-root/prefix component. This change affects `pop` as well. * The `Prefix` component now involves a separate `PrefixComponent` struct, to better allow for keeping both parsed and unparsed prefix data. In addition, the `old_path` module is now deprecated. Closes #23264 [breaking-change]
-
- 10 3月, 2015 1 次提交
-
-
由 Steven Fackler 提交于
-
- 07 3月, 2015 1 次提交
-
-
由 Alex Crichton 提交于
Right now the rust upgrade in cargo is blocked on fixing this overflow. If a this benchmark is run it will trigger an overflow error today: #[bench] fn foo(b: &mut test::Bencher) {} This commit adds a check on each iteration of the loop that the maximum multiplier (10) doesn't overflow, and if it does just return the results so far.
-
- 06 3月, 2015 2 次提交
-
-
由 Alex Crichton 提交于
This commit performs a stabilization pass over the `std::fs` module now that it's had some time to bake. The change was largely just adding `#[stable]` tags, but there are a few APIs that remain `#[unstable]`. The following apis are now marked `#[stable]`: * `std::fs` (the name) * `File` * `Metadata` * `ReadDir` * `DirEntry` * `OpenOptions` * `Permissions` * `File::{open, create}` * `File::{sync_all, sync_data}` * `File::set_len` * `File::metadata` * Trait implementations for `File` and `&File` * `OpenOptions::new` * `OpenOptions::{read, write, append, truncate, create}` * `OpenOptions::open` - this function was modified, however, to not attempt to reject cross-platform openings of directories. This means that some platforms will succeed in opening a directory and others will fail. * `Metadata::{is_dir, is_file, len, permissions}` * `Permissions::{readonly, set_readonly}` * `Iterator for ReadDir` * `DirEntry::path` * `remove_file` - like with `OpenOptions::open`, the extra windows code to remove a readonly file has been removed. This means that removing a readonly file will succeed on some platforms but fail on others. * `metadata` * `rename` * `copy` * `hard_link` * `soft_link` * `read_link` * `create_dir` * `create_dir_all` * `remove_dir` * `remove_dir_all` * `read_dir` The following apis remain `#[unstable]`. * `WalkDir` and `walk` - there are many methods by which a directory walk can be constructed, and it's unclear whether the current semantics are the right ones. For example symlinks are not handled super well currently. This is now behind a new `fs_walk` feature. * `File::path` - this is an extra abstraction which the standard library provides on top of what the system offers and it's unclear whether we should be doing so. This is now behind a new `file_path` feature. * `Metadata::{accessed, modified}` - we do not currently have a good abstraction for a moment in time which is what these APIs should likely be returning, so these remain `#[unstable]` for now. These are now behind a new `fs_time` feature * `set_file_times` - like with `Metadata::accessed`, we do not currently have the appropriate abstraction for the arguments here so this API remains unstable behind the `fs_time` feature gate. * `PathExt` - the precise set of methods on this trait may change over time and some methods may be removed. This API remains unstable behind the `path_ext` feature gate. * `set_permissions` - we may wish to expose a more granular ability to set the permissions on a file instead of just a blanket "set all permissions" method. This function remains behind the `fs` feature. The following apis are now `#[deprecated]` * The `TempDir` type is now entirely deprecated and is [located on crates.io][tempdir] as the `tempdir` crate with [its source][github] at rust-lang/tempdir. [tempdir]: https://crates.io/crates/tempdir [github]: https://github.com/rust-lang/tempdir The stability of some of these APIs has been questioned over the past few weeks in using these APIs, and it is intentional that the majority of APIs here are marked `#[stable]`. The `std::fs` module has a lot of room to grow and the material is [being tracked in a RFC issue][rfc-issue]. [rfc-issue]: https://github.com/rust-lang/rfcs/issues/939 [breaking-change]
-
由 awlnx 提交于
-
- 05 3月, 2015 2 次提交
-
-
由 Eduard Burtescu 提交于
-
由 Alex Crichton 提交于
This commit deprecates the majority of std::old_io::fs in favor of std::fs and its new functionality. Some functions remain non-deprecated but are now behind a feature gate called `old_fs`. These functions will be deprecated once suitable replacements have been implemented. The compiler has been migrated to new `std::fs` and `std::path` APIs where appropriate as part of this change.
-
- 04 3月, 2015 1 次提交
-
-
由 Eduard Burtescu 提交于
-
- 01 3月, 2015 1 次提交
-
-
由 Tshepang Lekhonkhobe 提交于
-
- 28 2月, 2015 1 次提交
-
-
由 Alex Crichton 提交于
Now that the `std::env` module has had some time to bake this commit marks most of its APIs as `#[stable]`. Some notable APIs that are **not** stable (and still use the same `env` feature gate) are: * `{set,get}_exit_status` - there are still questions about whether this is the right interface for setting/getting the exit status of a process. * `page_size` - this may change location in the future or perhaps name as well. This also effectively closes #22122 as the variants of `VarError` are `#[stable]` now. (this is done intentionally)
-