Add a test for #2126

This commit is contained in:
topecongiro 2017-11-08 08:25:09 +09:00
parent 036917b691
commit d2d5ebe4da
2 changed files with 38 additions and 0 deletions

View file

@ -170,3 +170,19 @@ impl Settings {
let mut file = File::create(&settings_path).chain_err(|| ErrorKind::WriteError(settings_path.clone()))?; let mut file = File::create(&settings_path).chain_err(|| ErrorKind::WriteError(settings_path.clone()))?;
} }
} }
fn issue2126() {
{
{
{
{
{
let x = self.span_from(sub_span.expect("No span found for struct arant variant"));
self.sspanpan_from_span(sub_span.expect("No span found for struct variant"));
let x = self.spanpan_from_span(sub_span.expect("No span found for struct variant"))?;
}
}
}
}
}
}

View file

@ -193,3 +193,25 @@ impl Settings {
.chain_err(|| ErrorKind::WriteError(settings_path.clone()))?; .chain_err(|| ErrorKind::WriteError(settings_path.clone()))?;
} }
} }
fn issue2126() {
{
{
{
{
{
let x = self.span_from(
sub_span.expect("No span found for struct arant variant"),
);
self.sspanpan_from_span(
sub_span.expect("No span found for struct variant"),
);
let x = self.spanpan_from_span(
sub_span.expect("No span found for struct variant"),
)?;
}
}
}
}
}
}