-
Notifications
You must be signed in to change notification settings - Fork 14k
Closed
Labels
A-prettyArea: Pretty printing (including `-Z unpretty`)Area: Pretty printing (including `-Z unpretty`)
Description
pub struct A;
pub fn f() {
let _a = A;
}
#[deriving(Clone)]
pub struct B;rustc --pretty=typed produces:
...
pub struct A;
pub fn f() { let _a = (A as A); }
#[deriving(Clone)]
pub struct B;
#[automatically_derived]
impl ::std::clone::Clone for B {
#[inline]
fn clone(&self) -> B {
(match (*(self as &B) as B) { B => (B as B) } as B)
}
}where all as is invalid e.g.
a.rs.rs:5:24: 5:30 error: non-scalar cast: `A` as `A`
a.rs.rs:5 pub fn f() { let _a = (A as A); }
^~~~~~
Metadata
Metadata
Assignees
Labels
A-prettyArea: Pretty printing (including `-Z unpretty`)Area: Pretty printing (including `-Z unpretty`)