@@ -4,9 +4,9 @@ use rustc_ast::{NodeId, PatKind, attr, token};
44use rustc_feature:: { AttributeGate , BUILTIN_ATTRIBUTE_MAP , BuiltinAttribute , Features , GateIssue } ;
55use rustc_session:: Session ;
66use rustc_session:: parse:: { feature_err, feature_err_issue, feature_warn} ;
7+ use rustc_span:: Span ;
78use rustc_span:: source_map:: Spanned ;
8- use rustc_span:: symbol:: sym;
9- use rustc_span:: { Span , Symbol } ;
9+ use rustc_span:: symbol:: { Symbol , sym} ;
1010use rustc_target:: spec:: abi;
1111use thin_vec:: ThinVec ;
1212
@@ -516,6 +516,11 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
516516 "async closures are unstable" ,
517517 "to use an async block, remove the `||`: `async {`"
518518 ) ;
519+ gate_all ! (
520+ async_trait_bounds,
521+ "`async` trait bounds are unstable" ,
522+ "use the desugared name of the async trait, such as `AsyncFn`"
523+ ) ;
519524 gate_all ! ( async_for_loop, "`for await` loops are experimental" ) ;
520525 gate_all ! (
521526 closure_lifetime_binder,
@@ -690,6 +695,7 @@ fn check_new_solver_banned_features(sess: &Session, features: &Features) {
690695 . find ( |feat| feat. gate_name == sym:: generic_const_exprs)
691696 . map ( |feat| feat. attr_sp )
692697 {
698+ #[ cfg_attr( not( bootstrap) , allow( rustc:: symbol_intern_string_literal) ) ]
693699 sess. dcx ( ) . emit_err ( errors:: IncompatibleFeatures {
694700 spans : vec ! [ gce_span] ,
695701 f1 : Symbol :: intern ( "-Znext-solver=globally" ) ,
0 commit comments