Summary
should compile
Reproducer
I tried this code:
#![feature(no_core, lang_items)]
#![no_core]
#[lang = "sized"]
pub trait Sized {}
impl u32 {
pub const BITS: u32 = 32;
}
fn from_u64(mut v: u64) -> u64 {
let mut sz: u64 = 0;
while v > 0 {
v >>= <u32>::BITS;
sz += 1;
}
sz
}
fn main() {
let _ = from_u64(5);
}
Does the code make use of any (1.49) nightly feature ?
Godbolt link
No response
Actual behavior
The current behavior is...
test.rs:14:9: error: mismatched types, expected ‘u64’ but got ‘u32’ [E0308]
14 | v >>= ::BITS;
| ^ ~
Expected behavior
I expected to see...
GCC Version
HEAD
Summary
should compile
Reproducer
I tried this code:
Does the code make use of any (1.49) nightly feature ?
Godbolt link
No response
Actual behavior
The current behavior is...
test.rs:14:9: error: mismatched types, expected ‘u64’ but got ‘u32’ [E0308]
14 | v >>= ::BITS;
| ^ ~
Expected behavior
I expected to see...
GCC Version
HEAD