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 3562c53 commit 24c6468Copy full SHA for 24c6468
compiler/rustc_ast_passes/src/feature_gate.rs
@@ -164,10 +164,12 @@ impl<'a> PostExpansionVisitor<'a> {
164
non_lt_param_spans,
165
crate::fluent_generated::ast_passes_forbidden_non_lifetime_param
166
);
167
- for param in params {
168
- if !param.bounds.is_empty() {
169
- let spans: Vec<_> = param.bounds.iter().map(|b| b.span()).collect();
170
- 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();
171
+ self.sess.emit_err(errors::ForbiddenLifetimeBound { spans });
172
+ }
173
}
174
175
0 commit comments