about summary refs log tree commit diff
path: root/src/libtime
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-01-03 03:25:21 +0000
committerbors <bors@rust-lang.org>2015-01-03 03:25:21 +0000
commit9c3e6082e71618c088afd93f7a4a9a7708c9dcbd (patch)
tree7f0a4f049f87f845a99751add69cda3409a91c20 /src/libtime
parenta6b109723aa78154ffcfa4db80f3f36b76a9c0a7 (diff)
parentd9769ec3834b62318da892925dc24c8883bb1635 (diff)
downloadrust-9c3e6082e71618c088afd93f7a4a9a7708c9dcbd.tar.gz
rust-9c3e6082e71618c088afd93f7a4a9a7708c9dcbd.zip
auto merge of #20154 : P1start/rust/qualified-assoc-type-generics, r=nikomatsakis
This modifies `Parser::eat_lt` to always split up `<<`s, instead of doing so only when a lifetime name followed or the `force` parameter (now removed) was `true`. This is because `Foo<<TYPE` is now a valid start to a type, whereas previously only `Foo<<LIFETIME` was valid.

This is a [breaking-change]. Change code that looks like this:

```rust
let x = foo as bar << 13;
```

to use parentheses, like this:

```rust
let x = (foo as bar) << 13;
```

Closes #17362.
Diffstat (limited to 'src/libtime')
-rw-r--r--src/libtime/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libtime/lib.rs b/src/libtime/lib.rs
index bc5d0c21aae..b2aca684314 100644
--- a/src/libtime/lib.rs
+++ b/src/libtime/lib.rs
@@ -149,8 +149,8 @@ pub fn get_time() -> Timespec {
         // A FILETIME contains a 64-bit value representing the number of
         // hectonanosecond (100-nanosecond) intervals since 1601-01-01T00:00:00Z.
         // http://support.microsoft.com/kb/167296/en-us
-        let ns_since_1601 = ((time.dwHighDateTime as u64 << 32) |
-                             (time.dwLowDateTime  as u64 <<  0)) / 10;
+        let ns_since_1601 = (((time.dwHighDateTime as u64) << 32) |
+                             ((time.dwLowDateTime  as u64) <<  0)) / 10;
         let ns_since_1970 = ns_since_1601 - NANOSECONDS_FROM_1601_TO_1970;
 
         ((ns_since_1970 / 1000000) as i64,