make it an error to use '_ in outlives bounds
This commit is contained in:
parent
a534216fa6
commit
68da108d56
1 changed files with 5 additions and 1 deletions
|
|
@ -2299,7 +2299,11 @@ impl<'a> LoweringContext<'a> {
|
|||
self.lower_trait_bound_modifier(modifier),
|
||||
),
|
||||
GenericBound::Outlives(ref lifetime) => {
|
||||
hir::GenericBound::Outlives(self.lower_lifetime(lifetime))
|
||||
// We don't want to accept `'a: '_`:
|
||||
self.with_anonymous_lifetime_mode(
|
||||
AnonymousLifetimeMode::PassThrough,
|
||||
|this| hir::GenericBound::Outlives(this.lower_lifetime(lifetime)),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue