Try to fix a build regression before it happens
This commit is contained in:
parent
f14671131e
commit
e784712f09
@ -309,19 +309,24 @@ impl UseTree {
|
||||
}
|
||||
}
|
||||
|
||||
let mut done = false;
|
||||
if aliased_self {
|
||||
match self.path.last() {
|
||||
match self.path.last_mut() {
|
||||
Some(UseSegment::Ident(_, ref mut old_rename)) => {
|
||||
assert!(old_rename.is_none());
|
||||
if let UseSegment::Slf(Some(rename)) = last {
|
||||
if let UseSegment::Slf(Some(rename)) = last.clone() {
|
||||
*old_rename = Some(rename);
|
||||
return self;
|
||||
done = true;
|
||||
}
|
||||
}
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
||||
if done {
|
||||
return self;
|
||||
}
|
||||
|
||||
// Normalise foo::{bar} -> foo::bar
|
||||
if let UseSegment::List(ref list) = last {
|
||||
if list.len() == 1 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user