Parse fully-qualified associated types in generics without whitespace
This breaks code that looks like this:
let x = foo as bar << 13;
Change such code to look like this:
let x = (foo as bar) << 13;
Closes #17362.
[breaking-change]
This commit is contained in:
parent
7e11b22713
commit
d9769ec383
10 changed files with 53 additions and 59 deletions
|
|
@ -55,10 +55,10 @@ pub enum InAddr {
|
|||
pub fn ip_to_inaddr(ip: IpAddr) -> InAddr {
|
||||
match ip {
|
||||
Ipv4Addr(a, b, c, d) => {
|
||||
let ip = (a as u32 << 24) |
|
||||
(b as u32 << 16) |
|
||||
(c as u32 << 8) |
|
||||
(d as u32 << 0);
|
||||
let ip = ((a as u32) << 24) |
|
||||
((b as u32) << 16) |
|
||||
((c as u32) << 8) |
|
||||
((d as u32) << 0);
|
||||
In4Addr(libc::in_addr {
|
||||
s_addr: Int::from_be(ip)
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue