hack around '_ named regions
This commit is contained in:
parent
19122ab981
commit
0026e3ec3f
1 changed files with 9 additions and 2 deletions
|
@ -67,8 +67,15 @@ impl OutlivesSuggestionBuilder {
|
||||||
RegionNameSource::NamedEarlyBoundRegion(..)
|
RegionNameSource::NamedEarlyBoundRegion(..)
|
||||||
| RegionNameSource::NamedFreeRegion(..)
|
| RegionNameSource::NamedFreeRegion(..)
|
||||||
| RegionNameSource::Static => {
|
| RegionNameSource::Static => {
|
||||||
debug!("Region {:?} is suggestable", name);
|
// FIXME: This is a bit hacky. We should ideally have a semantic way for checking
|
||||||
true
|
// if the name is `'_`...
|
||||||
|
if name.name().with(|name| name != "'_") {
|
||||||
|
debug!("Region {:?} is suggestable", name);
|
||||||
|
true
|
||||||
|
} else {
|
||||||
|
debug!("Region {:?} is NOT suggestable", name);
|
||||||
|
false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't give suggestions for upvars, closure return types, or other unnamable
|
// Don't give suggestions for upvars, closure return types, or other unnamable
|
||||||
|
|
Loading…
Add table
Reference in a new issue