librustc: Remove cross-borrowing of Box<T> to &T from the language,
except where trait objects are involved. Part of issue #15349, though I'm leaving it open for trait objects. Cross borrowing for trait objects remains because it is needed until we have DST. This will break code like: fn foo(x: &int) { ... } let a = box 3i; foo(a); Change this code to: fn foo(x: &int) { ... } let a = box 3i; foo(&*a); [breaking-change]
This commit is contained in:
@@ -1862,7 +1862,7 @@ impl<'a> State<'a> {
|
||||
ast::SelfExplicit(ref typ, _) => {
|
||||
try!(word(&mut self.s, "self"));
|
||||
try!(self.word_space(":"));
|
||||
try!(self.print_type(*typ));
|
||||
try!(self.print_type(&**typ));
|
||||
}
|
||||
}
|
||||
return Ok(true);
|
||||
|
||||
Reference in New Issue
Block a user