We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09df610 commit b1229c0Copy full SHA for b1229c0
compiler/rustc_ast_passes/src/feature_gate.rs
@@ -170,10 +170,12 @@ impl<'a> PostExpansionVisitor<'a> {
170
)
171
.emit();
172
}
173
- for param in params {
174
- if !param.bounds.is_empty() {
175
- let spans: Vec<_> = param.bounds.iter().map(|b| b.span()).collect();
176
- self.sess.emit_err(errors::ForbiddenLifetimeBound { spans });
+ if !self.features.non_lifetime_binders {
+ for param in params {
+ if !param.bounds.is_empty() {
+ let spans: Vec<_> = param.bounds.iter().map(|b| b.span()).collect();
177
+ self.sess.emit_err(errors::ForbiddenLifetimeBound { spans });
178
+ }
179
180
181
0 commit comments