| Age | Commit message (Collapse) | Author | Lines |
|
Those platforms don't support nanosecond precision, so adding 1
nanosecond does nothing.
|
|
|
|
Currently if you add a duration which should lead to 0 nanos and 1
additional second, we end up with no additional seconds, and 1000000000
nanos.
|
|
r? @steveklabnik
|
|
|
|
|
|
Fixes #29993.
|
|
Fixes #29993.
|
|
|
|
I believe that because Windows' unit of resolution is 100ns that this unit of
time will ensure that the assertions will hold true as it's representable in the
native format.
cc #29970
|
|
Part of #29338
|
|
Fixes #29993.
|
|
Fixes #30073. The input to `cfg!` is a meta attribute, but not _any_ meta attribute (e.g. `cfg!(allow(dead_code))` doesn't compile). But the macro_rules syntax can't quite express this, so I added a note to the doc.
|
|
Part of #29338
|
|
I believe that because Windows' unit of resolution is 100ns that this unit of
time will ensure that the assertions will hold true as it's representable in the
native format.
cc #29970
|
|
|
|
|
|
I don't reproduce it on severals hosts (virtual or real), so I can't
debug it. As Bitrig has disabled this test too, I will follow the same
here.
r? @alexcrichton
|
|
I don't reproduce it on severals hosts (virtual or real), so I can't
debug it. As Bitrig has disabled this test too, I will follow the same
here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
`socket_addr` was renamed to `local_addr` in 1.0beta.
See: f798674b86382929ca17c88de422a6e2fdb27f2a
r? @steveklabnik
|
|
`socket_addr` was renamed to `local_addr` in 1.0beta.
See: f798674b86382929ca17c88de422a6e2fdb27f2a
|
|
Part of https://github.com/rust-lang/rust/issues/29333
|
|
Typical algebra currently doesn't work on the types in std::time currently (see
[this comment][comment]), so tweak the tests to account for this property.
[comment]: https://github.com/rust-lang/rust/issues/29866#issuecomment-159093809
Closes #29970
|
|
Part of https://github.com/rust-lang/rust/issues/29333
|
|
r=alexcrichton
It seems that OS X El Capitan does not pass DYLD_* environment variables to child processes anymore. See this link: https://forums.developer.apple.com/thread/9233
The causes a test in `src/libstd/process.rs' to fail when those environment variables are not found in the child process. This PR skips those variables similar to how the Windows envars that start with `=` are skipped.
|
|
Typical algebra currently doesn't work on the types in std::time currently (see
[this comment][comment]), so tweak the tests to account for this property.
[comment]: https://github.com/rust-lang/rust/issues/29866#issuecomment-159093809
Closes #29970
|
|
Part of https://github.com/rust-lang/rust/issues/29935
The deprecation lint is still called "deprecated", so people can continue using `#[allow(deprecated)]` and similar things.
|
|
|
|
Fixes #29972.
|
|
On Windows: Previously these paths were silently truncated at these NUL
characters, now they fail with `ErrorKind::InvalidInput`.
|
|
This check is necessary, because the underlying API only reads strings
until the first NUL.
|
|
|
|
This tiny PR renames the result variable in HashSet's `intersection` example from `diff` to `intersection` and the same for `union`, which seem more appropriate.
|
|
|
|
This commit is an implementation of [RFC 1288][rfc] which adds two new unstable
types to the `std::time` module. The `Instant` type is used to represent
measurements of a monotonically increasing clock suitable for measuring time
withing a process for operations such as benchmarks or just the elapsed time to
do something. An `Instant` favors panicking when bugs are found as the bugs are
programmer errors rather than typical errors that can be encountered.
[rfc]: https://github.com/rust-lang/rfcs/pull/1288
The `SystemTime` type is used to represent a system timestamp and is not
monotonic. Very few guarantees are provided about this measurement of the system
clock, but a fixed point in time (`UNIX_EPOCH`) is provided to learn about the
relative distance from this point for any particular time stamp.
This PR takes the same implementation strategy as the `time` crate on crates.io,
namely:
| Platform | Instant | SystemTime |
|------------|--------------------------|--------------------------|
| Windows | QueryPerformanceCounter | GetSystemTimeAsFileTime |
| OSX | mach_absolute_time | gettimeofday |
| Unix | CLOCK_MONOTONIC | CLOCK_REALTIME |
These implementations can perhaps be refined over time, but they currently
satisfy the requirements of the `Instant` and `SystemTime` types while also
being portable across implementations and revisions of each platform.
cc #29866
|
|
On Windows: Previously these paths were silently truncated at these NUL
characters, now they fail with `ErrorKind::InvalidInput`.
|
|
|
|
Leading equals symbols are treated as part of the variable name, if
there is no other equality symbol or none at all, the environment string
is ignored.
|
|
This commit is an implementation of [RFC 1288][rfc] which adds two new unstable
types to the `std::time` module. The `Instant` type is used to represent
measurements of a monotonically increasing clock suitable for measuring time
withing a process for operations such as benchmarks or just the elapsed time to
do something. An `Instant` favors panicking when bugs are found as the bugs are
programmer errors rather than typical errors that can be encountered.
[rfc]: https://github.com/rust-lang/rfcs/pull/1288
The `SystemTime` type is used to represent a system timestamp and is not
monotonic. Very few guarantees are provided about this measurement of the system
clock, but a fixed point in time (`UNIX_EPOCH`) is provided to learn about the
relative distance from this point for any particular time stamp.
This PR takes the same implementation strategy as the `time` crate on crates.io,
namely:
| Platform | Instant | SystemTime |
|------------|--------------------------|--------------------------|
| Windows | QueryPerformanceCounter | GetSystemTimeAsFileTime |
| OSX | mach_absolute_time | gettimeofday |
| Unix | CLOCK_MONOTONIC | CLOCK_REALTIME |
These implementations can perhaps be refined over time, but they currently
satisfy the requirements of the `Instant` and `SystemTime` types while also
being portable across implementations and revisions of each platform.
|
|
What this patch does:
- Stability annotations are now based on "exported items" supplied by rustc_privacy and not "public items". Exported items are as accessible for external crates as directly public items and should be annotated with stability attributes.
- Trait impls require annotations now.
- Reexports require annotations now.
- Crates themselves didn't require annotations, now they do.
- Exported macros are annotated now, but these annotations are not used yet.
- Some useless annotations are detected and result in errors
- Finally, some small bugs are fixed - deprecation propagates from stable deprecated parents, items in blocks are traversed correctly (fixes https://github.com/rust-lang/rust/issues/29034) + some code cleanup.
|