@@ -4,9 +4,9 @@ use rustc_ast::{NodeId, PatKind, attr, token};
4
4
use rustc_feature:: { AttributeGate , BUILTIN_ATTRIBUTE_MAP , BuiltinAttribute , Features , GateIssue } ;
5
5
use rustc_session:: Session ;
6
6
use rustc_session:: parse:: { feature_err, feature_err_issue, feature_warn} ;
7
+ use rustc_span:: Span ;
7
8
use rustc_span:: source_map:: Spanned ;
8
- use rustc_span:: symbol:: sym;
9
- use rustc_span:: { Span , Symbol } ;
9
+ use rustc_span:: symbol:: { Symbol , sym} ;
10
10
use rustc_target:: spec:: abi;
11
11
use thin_vec:: ThinVec ;
12
12
@@ -516,6 +516,11 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
516
516
"async closures are unstable" ,
517
517
"to use an async block, remove the `||`: `async {`"
518
518
) ;
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
+ ) ;
519
524
gate_all ! ( async_for_loop, "`for await` loops are experimental" ) ;
520
525
gate_all ! (
521
526
closure_lifetime_binder,
@@ -690,6 +695,7 @@ fn check_new_solver_banned_features(sess: &Session, features: &Features) {
690
695
. find ( |feat| feat. gate_name == sym:: generic_const_exprs)
691
696
. map ( |feat| feat. attr_sp )
692
697
{
698
+ #[ cfg_attr( not( bootstrap) , allow( rustc:: symbol_intern_string_literal) ) ]
693
699
sess. dcx ( ) . emit_err ( errors:: IncompatibleFeatures {
694
700
spans : vec ! [ gce_span] ,
695
701
f1 : Symbol :: intern ( "-Znext-solver=globally" ) ,
0 commit comments