Rollup merge of #132388 - frank-king:feature/where-cfg, r=petrochenkov
Implement `#[cfg]` in `where` clauses This PR implements #115590, which supports `#[cfg]` attributes in `where` clauses. The biggest change is, that it adds `AttrsVec` and `NodeId` to the `ast::WherePredicate` and `HirId` to the `hir::WherePredicate`.
This commit is contained in:
commit
2344a34241
38 changed files with 3296 additions and 88 deletions
|
@ -417,9 +417,11 @@ impl WhereClause {
|
|||
/// A single predicate in a where-clause.
|
||||
#[derive(Clone, Encodable, Decodable, Debug)]
|
||||
pub struct WherePredicate {
|
||||
pub attrs: AttrVec,
|
||||
pub kind: WherePredicateKind,
|
||||
pub id: NodeId,
|
||||
pub span: Span,
|
||||
pub is_placeholder: bool,
|
||||
}
|
||||
|
||||
/// Predicate kind in where-clause.
|
||||
|
|
|
@ -11,7 +11,7 @@ use crate::tokenstream::LazyAttrTokenStream;
|
|||
use crate::{
|
||||
Arm, AssocItem, AttrItem, AttrKind, AttrVec, Attribute, Block, Crate, Expr, ExprField,
|
||||
FieldDef, ForeignItem, GenericParam, Item, NodeId, Param, Pat, PatField, Path, Stmt, StmtKind,
|
||||
Ty, Variant, Visibility,
|
||||
Ty, Variant, Visibility, WherePredicate,
|
||||
};
|
||||
|
||||
/// A utility trait to reduce boilerplate.
|
||||
|
@ -79,6 +79,7 @@ impl_has_node_id!(
|
|||
Stmt,
|
||||
Ty,
|
||||
Variant,
|
||||
WherePredicate,
|
||||
);
|
||||
|
||||
impl<T: AstDeref<Target: HasNodeId>> HasNodeId for T {
|
||||
|
@ -127,7 +128,16 @@ macro_rules! impl_has_tokens_none {
|
|||
}
|
||||
|
||||
impl_has_tokens!(AssocItem, AttrItem, Block, Expr, ForeignItem, Item, Pat, Path, Ty, Visibility);
|
||||
impl_has_tokens_none!(Arm, ExprField, FieldDef, GenericParam, Param, PatField, Variant);
|
||||
impl_has_tokens_none!(
|
||||
Arm,
|
||||
ExprField,
|
||||
FieldDef,
|
||||
GenericParam,
|
||||
Param,
|
||||
PatField,
|
||||
Variant,
|
||||
WherePredicate
|
||||
);
|
||||
|
||||
impl<T: AstDeref<Target: HasTokens>> HasTokens for T {
|
||||
fn tokens(&self) -> Option<&LazyAttrTokenStream> {
|
||||
|
@ -279,6 +289,7 @@ impl_has_attrs!(
|
|||
Param,
|
||||
PatField,
|
||||
Variant,
|
||||
WherePredicate,
|
||||
);
|
||||
impl_has_attrs_none!(Attribute, AttrItem, Block, Pat, Path, Ty, Visibility);
|
||||
|
||||
|
|
|
@ -338,8 +338,11 @@ pub trait MutVisitor: Sized {
|
|||
walk_where_clause(self, where_clause);
|
||||
}
|
||||
|
||||
fn visit_where_predicate(&mut self, where_predicate: &mut WherePredicate) {
|
||||
walk_where_predicate(self, where_predicate)
|
||||
fn flat_map_where_predicate(
|
||||
&mut self,
|
||||
where_predicate: WherePredicate,
|
||||
) -> SmallVec<[WherePredicate; 1]> {
|
||||
walk_flat_map_where_predicate(self, where_predicate)
|
||||
}
|
||||
|
||||
fn visit_where_predicate_kind(&mut self, kind: &mut WherePredicateKind) {
|
||||
|
@ -1097,15 +1100,20 @@ fn walk_ty_alias_where_clauses<T: MutVisitor>(vis: &mut T, tawcs: &mut TyAliasWh
|
|||
|
||||
fn walk_where_clause<T: MutVisitor>(vis: &mut T, wc: &mut WhereClause) {
|
||||
let WhereClause { has_where_token: _, predicates, span } = wc;
|
||||
visit_thin_vec(predicates, |predicate| vis.visit_where_predicate(predicate));
|
||||
predicates.flat_map_in_place(|predicate| vis.flat_map_where_predicate(predicate));
|
||||
vis.visit_span(span);
|
||||
}
|
||||
|
||||
pub fn walk_where_predicate<T: MutVisitor>(vis: &mut T, pred: &mut WherePredicate) {
|
||||
let WherePredicate { kind, id, span } = pred;
|
||||
pub fn walk_flat_map_where_predicate<T: MutVisitor>(
|
||||
vis: &mut T,
|
||||
mut pred: WherePredicate,
|
||||
) -> SmallVec<[WherePredicate; 1]> {
|
||||
let WherePredicate { attrs, kind, id, span, is_placeholder: _ } = &mut pred;
|
||||
vis.visit_id(id);
|
||||
visit_attrs(vis, attrs);
|
||||
vis.visit_where_predicate_kind(kind);
|
||||
vis.visit_span(span);
|
||||
smallvec![pred]
|
||||
}
|
||||
|
||||
pub fn walk_where_predicate_kind<T: MutVisitor>(vis: &mut T, kind: &mut WherePredicateKind) {
|
||||
|
|
|
@ -833,7 +833,8 @@ pub fn walk_where_predicate<'a, V: Visitor<'a>>(
|
|||
visitor: &mut V,
|
||||
predicate: &'a WherePredicate,
|
||||
) -> V::Result {
|
||||
let WherePredicate { kind, id: _, span: _ } = predicate;
|
||||
let WherePredicate { attrs, kind, id: _, span: _, is_placeholder: _ } = predicate;
|
||||
walk_list!(visitor, visit_attribute, attrs);
|
||||
visitor.visit_where_predicate_kind(kind)
|
||||
}
|
||||
|
||||
|
|
|
@ -1728,6 +1728,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
|||
fn lower_where_predicate(&mut self, pred: &WherePredicate) -> hir::WherePredicate<'hir> {
|
||||
let hir_id = self.lower_node_id(pred.id);
|
||||
let span = self.lower_span(pred.span);
|
||||
self.lower_attrs(hir_id, &pred.attrs, span);
|
||||
let kind = self.arena.alloc(match &pred.kind {
|
||||
WherePredicateKind::BoundPredicate(WhereBoundPredicate {
|
||||
bound_generic_params,
|
||||
|
|
|
@ -503,6 +503,7 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
|
|||
gate_all!(unsafe_binders, "unsafe binder types are experimental");
|
||||
gate_all!(contracts, "contracts are incomplete");
|
||||
gate_all!(contracts_internals, "contract internal machinery is for internal use only");
|
||||
gate_all!(where_clause_attrs, "attributes in `where` clause are unstable");
|
||||
|
||||
if !visitor.features.never_patterns() {
|
||||
if let Some(spans) = spans.get(&sym::never_patterns) {
|
||||
|
|
|
@ -735,7 +735,8 @@ impl<'a> State<'a> {
|
|||
}
|
||||
|
||||
pub fn print_where_predicate(&mut self, predicate: &ast::WherePredicate) {
|
||||
let ast::WherePredicate { kind, id: _, span: _ } = predicate;
|
||||
let ast::WherePredicate { attrs, kind, id: _, span: _, is_placeholder: _ } = predicate;
|
||||
self.print_outer_attributes(attrs);
|
||||
match kind {
|
||||
ast::WherePredicateKind::BoundPredicate(where_bound_predicate) => {
|
||||
self.print_where_bound_predicate(where_bound_predicate);
|
||||
|
|
|
@ -300,13 +300,16 @@ pub(crate) fn expand_deriving_coerce_pointee(
|
|||
to_ty: &s_ty,
|
||||
rewritten: false,
|
||||
};
|
||||
let mut predicate = ast::WherePredicate {
|
||||
kind: ast::WherePredicateKind::BoundPredicate(bound.clone()),
|
||||
span: predicate.span,
|
||||
id: ast::DUMMY_NODE_ID,
|
||||
};
|
||||
substitution.visit_where_predicate(&mut predicate);
|
||||
let mut kind = ast::WherePredicateKind::BoundPredicate(bound.clone());
|
||||
substitution.visit_where_predicate_kind(&mut kind);
|
||||
if substitution.rewritten {
|
||||
let predicate = ast::WherePredicate {
|
||||
attrs: predicate.attrs.clone(),
|
||||
kind,
|
||||
span: predicate.span,
|
||||
id: ast::DUMMY_NODE_ID,
|
||||
is_placeholder: false,
|
||||
};
|
||||
impl_generics.where_clause.predicates.push(predicate);
|
||||
}
|
||||
}
|
||||
|
@ -388,8 +391,8 @@ impl<'a> ast::mut_visit::MutVisitor for TypeSubstitution<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
fn visit_where_predicate(&mut self, where_predicate: &mut ast::WherePredicate) {
|
||||
match &mut where_predicate.kind {
|
||||
fn visit_where_predicate_kind(&mut self, kind: &mut ast::WherePredicateKind) {
|
||||
match kind {
|
||||
rustc_ast::WherePredicateKind::BoundPredicate(bound) => {
|
||||
bound
|
||||
.bound_generic_params
|
||||
|
|
|
@ -687,9 +687,11 @@ impl<'a> TraitDef<'a> {
|
|||
// and similarly for where clauses
|
||||
where_clause.predicates.extend(generics.where_clause.predicates.iter().map(|clause| {
|
||||
ast::WherePredicate {
|
||||
attrs: clause.attrs.clone(),
|
||||
kind: clause.kind.clone(),
|
||||
id: ast::DUMMY_NODE_ID,
|
||||
span: clause.span.with_ctxt(ctxt),
|
||||
is_placeholder: false,
|
||||
}
|
||||
}));
|
||||
|
||||
|
@ -744,8 +746,13 @@ impl<'a> TraitDef<'a> {
|
|||
};
|
||||
|
||||
let kind = ast::WherePredicateKind::BoundPredicate(predicate);
|
||||
let predicate =
|
||||
ast::WherePredicate { kind, id: ast::DUMMY_NODE_ID, span: self.span };
|
||||
let predicate = ast::WherePredicate {
|
||||
attrs: ThinVec::new(),
|
||||
kind,
|
||||
id: ast::DUMMY_NODE_ID,
|
||||
span: self.span,
|
||||
is_placeholder: false,
|
||||
};
|
||||
where_clause.predicates.push(predicate);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,6 +53,7 @@ pub enum Annotatable {
|
|||
Param(ast::Param),
|
||||
FieldDef(ast::FieldDef),
|
||||
Variant(ast::Variant),
|
||||
WherePredicate(ast::WherePredicate),
|
||||
Crate(ast::Crate),
|
||||
}
|
||||
|
||||
|
@ -71,6 +72,7 @@ impl Annotatable {
|
|||
Annotatable::Param(p) => p.span,
|
||||
Annotatable::FieldDef(sf) => sf.span,
|
||||
Annotatable::Variant(v) => v.span,
|
||||
Annotatable::WherePredicate(wp) => wp.span,
|
||||
Annotatable::Crate(c) => c.spans.inner_span,
|
||||
}
|
||||
}
|
||||
|
@ -89,6 +91,7 @@ impl Annotatable {
|
|||
Annotatable::Param(p) => p.visit_attrs(f),
|
||||
Annotatable::FieldDef(sf) => sf.visit_attrs(f),
|
||||
Annotatable::Variant(v) => v.visit_attrs(f),
|
||||
Annotatable::WherePredicate(wp) => wp.visit_attrs(f),
|
||||
Annotatable::Crate(c) => c.visit_attrs(f),
|
||||
}
|
||||
}
|
||||
|
@ -107,6 +110,7 @@ impl Annotatable {
|
|||
Annotatable::Param(p) => visitor.visit_param(p),
|
||||
Annotatable::FieldDef(sf) => visitor.visit_field_def(sf),
|
||||
Annotatable::Variant(v) => visitor.visit_variant(v),
|
||||
Annotatable::WherePredicate(wp) => visitor.visit_where_predicate(wp),
|
||||
Annotatable::Crate(c) => visitor.visit_crate(c),
|
||||
}
|
||||
}
|
||||
|
@ -128,6 +132,7 @@ impl Annotatable {
|
|||
| Annotatable::Param(..)
|
||||
| Annotatable::FieldDef(..)
|
||||
| Annotatable::Variant(..)
|
||||
| Annotatable::WherePredicate(..)
|
||||
| Annotatable::Crate(..) => panic!("unexpected annotatable"),
|
||||
}
|
||||
}
|
||||
|
@ -223,6 +228,13 @@ impl Annotatable {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn expect_where_predicate(self) -> ast::WherePredicate {
|
||||
match self {
|
||||
Annotatable::WherePredicate(wp) => wp,
|
||||
_ => panic!("expected where predicate"),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn expect_crate(self) -> ast::Crate {
|
||||
match self {
|
||||
Annotatable::Crate(krate) => krate,
|
||||
|
@ -446,6 +458,10 @@ pub trait MacResult {
|
|||
None
|
||||
}
|
||||
|
||||
fn make_where_predicates(self: Box<Self>) -> Option<SmallVec<[ast::WherePredicate; 1]>> {
|
||||
None
|
||||
}
|
||||
|
||||
fn make_crate(self: Box<Self>) -> Option<ast::Crate> {
|
||||
// Fn-like macros cannot produce a crate.
|
||||
unreachable!()
|
||||
|
|
|
@ -227,6 +227,12 @@ ast_fragments! {
|
|||
Variants(SmallVec<[ast::Variant; 1]>) {
|
||||
"variant"; many fn flat_map_variant; fn visit_variant(); fn make_variants;
|
||||
}
|
||||
WherePredicates(SmallVec<[ast::WherePredicate; 1]>) {
|
||||
"where predicate";
|
||||
many fn flat_map_where_predicate;
|
||||
fn visit_where_predicate();
|
||||
fn make_where_predicates;
|
||||
}
|
||||
Crate(ast::Crate) { "crate"; one fn visit_crate; fn visit_crate; fn make_crate; }
|
||||
}
|
||||
|
||||
|
@ -259,7 +265,8 @@ impl AstFragmentKind {
|
|||
| AstFragmentKind::GenericParams
|
||||
| AstFragmentKind::Params
|
||||
| AstFragmentKind::FieldDefs
|
||||
| AstFragmentKind::Variants => SupportsMacroExpansion::No,
|
||||
| AstFragmentKind::Variants
|
||||
| AstFragmentKind::WherePredicates => SupportsMacroExpansion::No,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -290,6 +297,9 @@ impl AstFragmentKind {
|
|||
AstFragmentKind::Variants => {
|
||||
AstFragment::Variants(items.map(Annotatable::expect_variant).collect())
|
||||
}
|
||||
AstFragmentKind::WherePredicates => AstFragment::WherePredicates(
|
||||
items.map(Annotatable::expect_where_predicate).collect(),
|
||||
),
|
||||
AstFragmentKind::Items => {
|
||||
AstFragment::Items(items.map(Annotatable::expect_item).collect())
|
||||
}
|
||||
|
@ -865,7 +875,8 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
|
|||
| Annotatable::GenericParam(..)
|
||||
| Annotatable::Param(..)
|
||||
| Annotatable::FieldDef(..)
|
||||
| Annotatable::Variant(..) => panic!("unexpected annotatable"),
|
||||
| Annotatable::Variant(..)
|
||||
| Annotatable::WherePredicate(..) => panic!("unexpected annotatable"),
|
||||
};
|
||||
if self.cx.ecfg.features.proc_macro_hygiene() {
|
||||
return;
|
||||
|
@ -1002,7 +1013,8 @@ pub fn parse_ast_fragment<'a>(
|
|||
| AstFragmentKind::GenericParams
|
||||
| AstFragmentKind::Params
|
||||
| AstFragmentKind::FieldDefs
|
||||
| AstFragmentKind::Variants => panic!("unexpected AST fragment kind"),
|
||||
| AstFragmentKind::Variants
|
||||
| AstFragmentKind::WherePredicates => panic!("unexpected AST fragment kind"),
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -1414,6 +1426,19 @@ impl InvocationCollectorNode for ast::Variant {
|
|||
}
|
||||
}
|
||||
|
||||
impl InvocationCollectorNode for ast::WherePredicate {
|
||||
const KIND: AstFragmentKind = AstFragmentKind::WherePredicates;
|
||||
fn to_annotatable(self) -> Annotatable {
|
||||
Annotatable::WherePredicate(self)
|
||||
}
|
||||
fn fragment_to_output(fragment: AstFragment) -> Self::OutputTy {
|
||||
fragment.make_where_predicates()
|
||||
}
|
||||
fn walk_flat_map<V: MutVisitor>(self, visitor: &mut V) -> Self::OutputTy {
|
||||
walk_flat_map_where_predicate(visitor, self)
|
||||
}
|
||||
}
|
||||
|
||||
impl InvocationCollectorNode for ast::FieldDef {
|
||||
const KIND: AstFragmentKind = AstFragmentKind::FieldDefs;
|
||||
fn to_annotatable(self) -> Annotatable {
|
||||
|
@ -2116,6 +2141,13 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
|
|||
self.flat_map_node(node)
|
||||
}
|
||||
|
||||
fn flat_map_where_predicate(
|
||||
&mut self,
|
||||
node: ast::WherePredicate,
|
||||
) -> SmallVec<[ast::WherePredicate; 1]> {
|
||||
self.flat_map_node(node)
|
||||
}
|
||||
|
||||
fn flat_map_field_def(&mut self, node: ast::FieldDef) -> SmallVec<[ast::FieldDef; 1]> {
|
||||
self.flat_map_node(node)
|
||||
}
|
||||
|
|
|
@ -188,6 +188,19 @@ pub(crate) fn placeholder(
|
|||
vis,
|
||||
is_placeholder: true,
|
||||
}]),
|
||||
AstFragmentKind::WherePredicates => {
|
||||
AstFragment::WherePredicates(smallvec![ast::WherePredicate {
|
||||
attrs: Default::default(),
|
||||
id,
|
||||
span,
|
||||
kind: ast::WherePredicateKind::BoundPredicate(ast::WhereBoundPredicate {
|
||||
bound_generic_params: Default::default(),
|
||||
bounded_ty: ty(),
|
||||
bounds: Default::default(),
|
||||
}),
|
||||
is_placeholder: true,
|
||||
}])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -267,6 +280,17 @@ impl MutVisitor for PlaceholderExpander {
|
|||
}
|
||||
}
|
||||
|
||||
fn flat_map_where_predicate(
|
||||
&mut self,
|
||||
predicate: ast::WherePredicate,
|
||||
) -> SmallVec<[ast::WherePredicate; 1]> {
|
||||
if predicate.is_placeholder {
|
||||
self.remove(predicate.id).make_where_predicates()
|
||||
} else {
|
||||
walk_flat_map_where_predicate(self, predicate)
|
||||
}
|
||||
}
|
||||
|
||||
fn flat_map_item(&mut self, item: P<ast::Item>) -> SmallVec<[P<ast::Item>; 1]> {
|
||||
match item.kind {
|
||||
ast::ItemKind::MacCall(_) => self.remove(item.id).make_items(),
|
||||
|
|
|
@ -661,6 +661,8 @@ declare_features! (
|
|||
(unstable, unsized_tuple_coercion, "1.20.0", Some(42877)),
|
||||
/// Allows using the `#[used(linker)]` (or `#[used(compiler)]`) attribute.
|
||||
(unstable, used_with_arg, "1.60.0", Some(93798)),
|
||||
/// Allows use of attributes in `where` clauses.
|
||||
(unstable, where_clause_attrs, "CURRENT_RUSTC_VERSION", Some(115590)),
|
||||
/// Allows use of x86 `AMX` target-feature attributes and intrinsics
|
||||
(unstable, x86_amx_intrinsics, "1.81.0", Some(126622)),
|
||||
/// Allows use of the `xop` target-feature
|
||||
|
|
|
@ -56,6 +56,7 @@ pub enum Target {
|
|||
Param,
|
||||
PatField,
|
||||
ExprField,
|
||||
WherePredicate,
|
||||
}
|
||||
|
||||
impl Display for Target {
|
||||
|
@ -96,7 +97,8 @@ impl Target {
|
|||
| Target::MacroDef
|
||||
| Target::Param
|
||||
| Target::PatField
|
||||
| Target::ExprField => false,
|
||||
| Target::ExprField
|
||||
| Target::WherePredicate => false,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -217,6 +219,7 @@ impl Target {
|
|||
Target::Param => "function param",
|
||||
Target::PatField => "pattern field",
|
||||
Target::ExprField => "struct field",
|
||||
Target::WherePredicate => "where predicate",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2386,6 +2386,7 @@ impl<'a> State<'a> {
|
|||
}
|
||||
|
||||
fn print_where_predicate(&mut self, predicate: &hir::WherePredicate<'_>) {
|
||||
self.print_attrs_as_outer(self.attrs(predicate.hir_id));
|
||||
match *predicate.kind {
|
||||
hir::WherePredicateKind::BoundPredicate(hir::WhereBoundPredicate {
|
||||
bound_generic_params,
|
||||
|
|
|
@ -367,34 +367,47 @@ impl<'a> Parser<'a> {
|
|||
|
||||
loop {
|
||||
let where_sp = where_lo.to(self.prev_token.span);
|
||||
let attrs = self.parse_outer_attributes()?;
|
||||
let pred_lo = self.token.span;
|
||||
let kind = if self.check_lifetime() && self.look_ahead(1, |t| !t.is_like_plus()) {
|
||||
let lifetime = self.expect_lifetime();
|
||||
// Bounds starting with a colon are mandatory, but possibly empty.
|
||||
self.expect(exp!(Colon))?;
|
||||
let bounds = self.parse_lt_param_bounds();
|
||||
ast::WherePredicateKind::RegionPredicate(ast::WhereRegionPredicate {
|
||||
lifetime,
|
||||
bounds,
|
||||
})
|
||||
} else if self.check_type() {
|
||||
match self.parse_ty_where_predicate_kind_or_recover_tuple_struct_body(
|
||||
struct_, pred_lo, where_sp,
|
||||
)? {
|
||||
PredicateKindOrStructBody::PredicateKind(kind) => kind,
|
||||
PredicateKindOrStructBody::StructBody(body) => {
|
||||
tuple_struct_body = Some(body);
|
||||
break;
|
||||
}
|
||||
let predicate = self.collect_tokens(None, attrs, ForceCollect::No, |this, attrs| {
|
||||
for attr in &attrs {
|
||||
self.psess.gated_spans.gate(sym::where_clause_attrs, attr.span);
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
};
|
||||
where_clause.predicates.push(ast::WherePredicate {
|
||||
kind,
|
||||
id: DUMMY_NODE_ID,
|
||||
span: pred_lo.to(self.prev_token.span),
|
||||
});
|
||||
let kind = if this.check_lifetime() && this.look_ahead(1, |t| !t.is_like_plus()) {
|
||||
let lifetime = this.expect_lifetime();
|
||||
// Bounds starting with a colon are mandatory, but possibly empty.
|
||||
this.expect(exp!(Colon))?;
|
||||
let bounds = this.parse_lt_param_bounds();
|
||||
Some(ast::WherePredicateKind::RegionPredicate(ast::WhereRegionPredicate {
|
||||
lifetime,
|
||||
bounds,
|
||||
}))
|
||||
} else if this.check_type() {
|
||||
match this.parse_ty_where_predicate_kind_or_recover_tuple_struct_body(
|
||||
struct_, pred_lo, where_sp,
|
||||
)? {
|
||||
PredicateKindOrStructBody::PredicateKind(kind) => Some(kind),
|
||||
PredicateKindOrStructBody::StructBody(body) => {
|
||||
tuple_struct_body = Some(body);
|
||||
None
|
||||
}
|
||||
}
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let predicate = kind.map(|kind| ast::WherePredicate {
|
||||
attrs,
|
||||
kind,
|
||||
id: DUMMY_NODE_ID,
|
||||
span: pred_lo.to(this.prev_token.span),
|
||||
is_placeholder: false,
|
||||
});
|
||||
Ok((predicate, Trailing::No, UsePreAttrPos::No))
|
||||
})?;
|
||||
match predicate {
|
||||
Some(predicate) => where_clause.predicates.push(predicate),
|
||||
None => break,
|
||||
}
|
||||
|
||||
let prev_token = self.prev_token.span;
|
||||
let ate_comma = self.eat(exp!(Comma));
|
||||
|
|
|
@ -779,6 +779,10 @@ passes_unstable_attr_for_already_stable_feature =
|
|||
.item = the stability attribute annotates this item
|
||||
.help = consider removing the attribute
|
||||
|
||||
passes_unsupported_attributes_in_where =
|
||||
most attributes are not supported in `where` clauses
|
||||
.help = only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
passes_unused =
|
||||
unused attribute
|
||||
.suggestion = remove this attribute
|
||||
|
|
|
@ -919,7 +919,8 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
|
|||
| Target::Arm
|
||||
| Target::ForeignMod
|
||||
| Target::Closure
|
||||
| Target::Impl => Some(target.name()),
|
||||
| Target::Impl
|
||||
| Target::WherePredicate => Some(target.name()),
|
||||
Target::ExternCrate
|
||||
| Target::Use
|
||||
| Target::Static
|
||||
|
@ -2614,6 +2615,32 @@ impl<'tcx> Visitor<'tcx> for CheckAttrVisitor<'tcx> {
|
|||
intravisit::walk_item(self, item)
|
||||
}
|
||||
|
||||
fn visit_where_predicate(&mut self, where_predicate: &'tcx hir::WherePredicate<'tcx>) {
|
||||
// FIXME(where_clause_attrs): Currently, as the following check shows,
|
||||
// only `#[cfg]` and `#[cfg_attr]` are allowed, but it should be removed
|
||||
// if we allow more attributes (e.g., tool attributes and `allow/deny/warn`)
|
||||
// in where clauses. After that, only `self.check_attributes` should be enough.
|
||||
const ATTRS_ALLOWED: &[Symbol] = &[sym::cfg, sym::cfg_attr];
|
||||
let spans = self
|
||||
.tcx
|
||||
.hir()
|
||||
.attrs(where_predicate.hir_id)
|
||||
.iter()
|
||||
.filter(|attr| !ATTRS_ALLOWED.iter().any(|&sym| attr.has_name(sym)))
|
||||
.map(|attr| attr.span())
|
||||
.collect::<Vec<_>>();
|
||||
if !spans.is_empty() {
|
||||
self.tcx.dcx().emit_err(errors::UnsupportedAttributesInWhere { span: spans.into() });
|
||||
}
|
||||
self.check_attributes(
|
||||
where_predicate.hir_id,
|
||||
where_predicate.span,
|
||||
Target::WherePredicate,
|
||||
None,
|
||||
);
|
||||
intravisit::walk_where_predicate(self, where_predicate)
|
||||
}
|
||||
|
||||
fn visit_generic_param(&mut self, generic_param: &'tcx hir::GenericParam<'tcx>) {
|
||||
let target = Target::from_generic_param(generic_param);
|
||||
self.check_attributes(generic_param.hir_id, generic_param.span, target, None);
|
||||
|
|
|
@ -1909,3 +1909,11 @@ pub(crate) struct RustcConstStableIndirectPairing {
|
|||
#[primary_span]
|
||||
pub span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(passes_unsupported_attributes_in_where)]
|
||||
#[help]
|
||||
pub(crate) struct UnsupportedAttributesInWhere {
|
||||
#[primary_span]
|
||||
pub span: MultiSpan,
|
||||
}
|
||||
|
|
|
@ -1529,6 +1529,14 @@ impl<'a, 'ra, 'tcx> Visitor<'a> for BuildReducedGraphVisitor<'a, 'ra, 'tcx> {
|
|||
visit::walk_variant(self, variant);
|
||||
}
|
||||
|
||||
fn visit_where_predicate(&mut self, p: &'a ast::WherePredicate) {
|
||||
if p.is_placeholder {
|
||||
self.visit_invoc(p.id);
|
||||
} else {
|
||||
visit::walk_where_predicate(self, p);
|
||||
}
|
||||
}
|
||||
|
||||
fn visit_crate(&mut self, krate: &'a ast::Crate) {
|
||||
if krate.is_placeholder {
|
||||
self.visit_invoc_in_module(krate.id);
|
||||
|
|
|
@ -285,6 +285,14 @@ impl<'a, 'ra, 'tcx> visit::Visitor<'a> for DefCollector<'a, 'ra, 'tcx> {
|
|||
});
|
||||
}
|
||||
|
||||
fn visit_where_predicate(&mut self, pred: &'a WherePredicate) {
|
||||
if pred.is_placeholder {
|
||||
self.visit_macro_invoc(pred.id)
|
||||
} else {
|
||||
visit::walk_where_predicate(self, pred)
|
||||
}
|
||||
}
|
||||
|
||||
fn visit_variant_data(&mut self, data: &'a VariantData) {
|
||||
// The assumption here is that non-`cfg` macro expansion cannot change field indices.
|
||||
// It currently holds because only inert attributes are accepted on fields,
|
||||
|
|
|
@ -2234,6 +2234,7 @@ symbols! {
|
|||
wasm_abi,
|
||||
wasm_import_module,
|
||||
wasm_target_feature,
|
||||
where_clause_attrs,
|
||||
while_let,
|
||||
windows,
|
||||
windows_subsystem,
|
||||
|
|
|
@ -682,19 +682,20 @@ pub fn eq_generics(l: &Generics, r: &Generics) -> bool {
|
|||
|
||||
pub fn eq_where_predicate(l: &WherePredicate, r: &WherePredicate) -> bool {
|
||||
use WherePredicateKind::*;
|
||||
match (&l.kind, &r.kind) {
|
||||
(BoundPredicate(l), BoundPredicate(r)) => {
|
||||
over(&l.bound_generic_params, &r.bound_generic_params, |l, r| {
|
||||
eq_generic_param(l, r)
|
||||
}) && eq_ty(&l.bounded_ty, &r.bounded_ty)
|
||||
&& over(&l.bounds, &r.bounds, eq_generic_bound)
|
||||
},
|
||||
(RegionPredicate(l), RegionPredicate(r)) => {
|
||||
eq_id(l.lifetime.ident, r.lifetime.ident) && over(&l.bounds, &r.bounds, eq_generic_bound)
|
||||
},
|
||||
(EqPredicate(l), EqPredicate(r)) => eq_ty(&l.lhs_ty, &r.lhs_ty) && eq_ty(&l.rhs_ty, &r.rhs_ty),
|
||||
_ => false,
|
||||
}
|
||||
over(&l.attrs, &r.attrs, eq_attr)
|
||||
&& match (&l.kind, &r.kind) {
|
||||
(BoundPredicate(l), BoundPredicate(r)) => {
|
||||
over(&l.bound_generic_params, &r.bound_generic_params, |l, r| {
|
||||
eq_generic_param(l, r)
|
||||
}) && eq_ty(&l.bounded_ty, &r.bounded_ty)
|
||||
&& over(&l.bounds, &r.bounds, eq_generic_bound)
|
||||
},
|
||||
(RegionPredicate(l), RegionPredicate(r)) => {
|
||||
eq_id(l.lifetime.ident, r.lifetime.ident) && over(&l.bounds, &r.bounds, eq_generic_bound)
|
||||
},
|
||||
(EqPredicate(l), EqPredicate(r)) => eq_ty(&l.lhs_ty, &r.lhs_ty) && eq_ty(&l.rhs_ty, &r.rhs_ty),
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn eq_use_tree(l: &UseTree, r: &UseTree) -> bool {
|
||||
|
|
|
@ -58,6 +58,7 @@ implement_spanned!(ast::ExprField);
|
|||
implement_spanned!(ast::ForeignItem);
|
||||
implement_spanned!(ast::Item);
|
||||
implement_spanned!(ast::Local);
|
||||
implement_spanned!(ast::WherePredicate);
|
||||
|
||||
impl Spanned for ast::Stmt {
|
||||
fn span(&self) -> Span {
|
||||
|
@ -149,12 +150,6 @@ impl Spanned for ast::FieldDef {
|
|||
}
|
||||
}
|
||||
|
||||
impl Spanned for ast::WherePredicate {
|
||||
fn span(&self) -> Span {
|
||||
self.span
|
||||
}
|
||||
}
|
||||
|
||||
impl Spanned for ast::FnRetTy {
|
||||
fn span(&self) -> Span {
|
||||
match *self {
|
||||
|
|
|
@ -463,8 +463,9 @@ impl Rewrite for ast::WherePredicate {
|
|||
}
|
||||
|
||||
fn rewrite_result(&self, context: &RewriteContext<'_>, shape: Shape) -> RewriteResult {
|
||||
let attrs_str = self.attrs.rewrite_result(context, shape)?;
|
||||
// FIXME: dead spans?
|
||||
let result = match self.kind {
|
||||
let pred_str = &match self.kind {
|
||||
ast::WherePredicateKind::BoundPredicate(ast::WhereBoundPredicate {
|
||||
ref bound_generic_params,
|
||||
ref bounded_ty,
|
||||
|
@ -499,6 +500,38 @@ impl Rewrite for ast::WherePredicate {
|
|||
}
|
||||
};
|
||||
|
||||
let mut result = String::with_capacity(attrs_str.len() + pred_str.len() + 1);
|
||||
result.push_str(&attrs_str);
|
||||
let pred_start = self.span.lo();
|
||||
let line_len = last_line_width(&attrs_str) + 1 + first_line_width(&pred_str);
|
||||
if let Some(last_attr) = self.attrs.last().filter(|last_attr| {
|
||||
contains_comment(context.snippet(mk_sp(last_attr.span.hi(), pred_start)))
|
||||
}) {
|
||||
result = combine_strs_with_missing_comments(
|
||||
context,
|
||||
&result,
|
||||
&pred_str,
|
||||
mk_sp(last_attr.span.hi(), pred_start),
|
||||
Shape {
|
||||
width: shape.width.min(context.config.inline_attribute_width()),
|
||||
..shape
|
||||
},
|
||||
!last_attr.is_doc_comment(),
|
||||
)?;
|
||||
} else {
|
||||
if !self.attrs.is_empty() {
|
||||
if context.config.inline_attribute_width() < line_len
|
||||
|| self.attrs.len() > 1
|
||||
|| self.attrs.last().is_some_and(|a| a.is_doc_comment())
|
||||
{
|
||||
result.push_str(&shape.indent.to_string_with_newline(context.config));
|
||||
} else {
|
||||
result.push(' ');
|
||||
}
|
||||
}
|
||||
result.push_str(&pred_str);
|
||||
}
|
||||
|
||||
Ok(result)
|
||||
}
|
||||
}
|
||||
|
|
116
src/tools/rustfmt/tests/target/cfg_attribute_in_where.rs
Normal file
116
src/tools/rustfmt/tests/target/cfg_attribute_in_where.rs
Normal file
|
@ -0,0 +1,116 @@
|
|||
// rustfmt-inline_attribute_width: 40
|
||||
|
||||
#![crate_type = "lib"]
|
||||
#![feature(cfg_attribute_in_where)]
|
||||
use std::marker::PhantomData;
|
||||
|
||||
#[cfg(a)]
|
||||
trait TraitA {}
|
||||
|
||||
#[cfg(b)]
|
||||
trait TraitB {}
|
||||
|
||||
trait A<T>
|
||||
where
|
||||
#[cfg = a_very_long_attribute_name]
|
||||
T: TraitA,
|
||||
#[cfg = another_very_long_attribute_name]
|
||||
T: TraitB,
|
||||
{
|
||||
type B<U>
|
||||
where
|
||||
#[cfg = a]
|
||||
// line comment after the attribute
|
||||
U: TraitA,
|
||||
#[cfg = b]
|
||||
/* block comment after the attribute */
|
||||
U: TraitB,
|
||||
#[cfg = a] // short
|
||||
U: TraitA,
|
||||
#[cfg = b] /* short */ U: TraitB;
|
||||
|
||||
fn foo<U>(&self)
|
||||
where
|
||||
/// line doc comment before the attribute
|
||||
U: TraitA,
|
||||
/** line doc block comment before the attribute */
|
||||
U: TraitB;
|
||||
}
|
||||
|
||||
impl<T> A<T> for T
|
||||
where
|
||||
#[doc = "line doc before the attribute"]
|
||||
T: TraitA,
|
||||
/** short doc */
|
||||
T: TraitB,
|
||||
{
|
||||
type B<U>
|
||||
= ()
|
||||
where
|
||||
#[doc = "short"] U: TraitA,
|
||||
#[doc = "short"]
|
||||
#[cfg = a]
|
||||
U: TraitB;
|
||||
|
||||
fn foo<U>(&self)
|
||||
where
|
||||
#[cfg = a]
|
||||
#[cfg = b]
|
||||
U: TraitA,
|
||||
/// line doc
|
||||
#[cfg = c]
|
||||
U: TraitB,
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
struct C<T>
|
||||
where
|
||||
#[cfg = a] T: TraitA,
|
||||
#[cfg = b] T: TraitB,
|
||||
{
|
||||
_t: PhantomData<T>,
|
||||
}
|
||||
|
||||
union D<T>
|
||||
where
|
||||
#[cfg = a] T: TraitA,
|
||||
#[cfg = b] T: TraitB,
|
||||
{
|
||||
_t: PhantomData<T>,
|
||||
}
|
||||
|
||||
enum E<T>
|
||||
where
|
||||
#[cfg = a] T: TraitA,
|
||||
#[cfg = b] T: TraitB,
|
||||
{
|
||||
E(PhantomData<T>),
|
||||
}
|
||||
|
||||
#[allow(type_alias_bounds)]
|
||||
type F<T>
|
||||
where
|
||||
#[cfg = a] T: TraitA,
|
||||
#[cfg = b] T: TraitB,
|
||||
= T;
|
||||
|
||||
impl<T> C<T>
|
||||
where
|
||||
#[cfg = a] T: TraitA,
|
||||
#[cfg = b] T: TraitB,
|
||||
{
|
||||
fn new<U>()
|
||||
where
|
||||
#[cfg = a] U: TraitA,
|
||||
#[cfg = b] U: TraitB,
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
fn foo<T>()
|
||||
where
|
||||
#[cfg = a] T: TraitA,
|
||||
#[cfg = b] T: TraitB,
|
||||
{
|
||||
}
|
883
tests/ui/feature-gates/feature-gate-where_clause_attrs.a.stderr
Normal file
883
tests/ui/feature-gates/feature-gate-where_clause_attrs.a.stderr
Normal file
|
@ -0,0 +1,883 @@
|
|||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:33:5
|
||||
|
|
||||
LL | #[cfg(a)] T: TraitA,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:34:5
|
||||
|
|
||||
LL | #[cfg(b)] T: TraitB,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:35:5
|
||||
|
|
||||
LL | #[cfg(all())] T: TraitAll,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:36:5
|
||||
|
|
||||
LL | #[cfg(any())] T: TraitAny,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:37:5
|
||||
|
|
||||
LL | #[cfg_attr(a, cfg(a))] T: TraitAA,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:38:5
|
||||
|
|
||||
LL | #[cfg_attr(b, cfg(b))] T: TraitBB,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:39:5
|
||||
|
|
||||
LL | #[cfg_attr(all(), cfg(all()))] T: TraitAllAll,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:40:5
|
||||
|
|
||||
LL | #[cfg_attr(any(), cfg(any()))] T: TraitAnyAny,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:44:9
|
||||
|
|
||||
LL | #[cfg(a)] U: TraitA,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:45:9
|
||||
|
|
||||
LL | #[cfg(b)] U: TraitB,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:46:9
|
||||
|
|
||||
LL | #[cfg(all())] U: TraitAll,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:47:9
|
||||
|
|
||||
LL | #[cfg(any())] U: TraitAny,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:48:9
|
||||
|
|
||||
LL | #[cfg_attr(a, cfg(a))] U: TraitAA,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:49:9
|
||||
|
|
||||
LL | #[cfg_attr(b, cfg(b))] U: TraitBB,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:50:9
|
||||
|
|
||||
LL | #[cfg_attr(all(), cfg(all()))] U: TraitAllAll,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:51:9
|
||||
|
|
||||
LL | #[cfg_attr(any(), cfg(any()))] U: TraitAnyAny;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:55:9
|
||||
|
|
||||
LL | #[cfg(a)] U: TraitA,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:56:9
|
||||
|
|
||||
LL | #[cfg(b)] U: TraitB,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:57:9
|
||||
|
|
||||
LL | #[cfg(all())] U: TraitAll,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:58:9
|
||||
|
|
||||
LL | #[cfg(any())] U: TraitAny,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:59:9
|
||||
|
|
||||
LL | #[cfg_attr(a, cfg(a))] U: TraitAA,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:60:9
|
||||
|
|
||||
LL | #[cfg_attr(b, cfg(b))] U: TraitBB,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:61:9
|
||||
|
|
||||
LL | #[cfg_attr(all(), cfg(all()))] U: TraitAllAll,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:62:9
|
||||
|
|
||||
LL | #[cfg_attr(any(), cfg(any()))] U: TraitAnyAny;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:67:5
|
||||
|
|
||||
LL | #[cfg(a)] T: TraitA,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:68:5
|
||||
|
|
||||
LL | #[cfg(b)] T: TraitB,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:69:5
|
||||
|
|
||||
LL | #[cfg(all())] T: TraitAll,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:70:5
|
||||
|
|
||||
LL | #[cfg(any())] T: TraitAny,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:71:5
|
||||
|
|
||||
LL | #[cfg_attr(a, cfg(a))] T: TraitAA,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:72:5
|
||||
|
|
||||
LL | #[cfg_attr(b, cfg(b))] T: TraitBB,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:73:5
|
||||
|
|
||||
LL | #[cfg_attr(all(), cfg(all()))] T: TraitAllAll,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:74:5
|
||||
|
|
||||
LL | #[cfg_attr(any(), cfg(any()))] T: TraitAnyAny,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:77:9
|
||||
|
|
||||
LL | #[cfg(a)] U: TraitA,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:78:9
|
||||
|
|
||||
LL | #[cfg(b)] U: TraitB,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:79:9
|
||||
|
|
||||
LL | #[cfg(all())] U: TraitAll,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:80:9
|
||||
|
|
||||
LL | #[cfg(any())] U: TraitAny,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:81:9
|
||||
|
|
||||
LL | #[cfg_attr(a, cfg(a))] U: TraitAA,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:82:9
|
||||
|
|
||||
LL | #[cfg_attr(b, cfg(b))] U: TraitBB,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:83:9
|
||||
|
|
||||
LL | #[cfg_attr(all(), cfg(all()))] U: TraitAllAll,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:84:9
|
||||
|
|
||||
LL | #[cfg_attr(any(), cfg(any()))] U: TraitAnyAny;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:88:9
|
||||
|
|
||||
LL | #[cfg(a)] U: TraitA,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:89:9
|
||||
|
|
||||
LL | #[cfg(b)] U: TraitB,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:90:9
|
||||
|
|
||||
LL | #[cfg(all())] T: TraitAll,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:91:9
|
||||
|
|
||||
LL | #[cfg(any())] T: TraitAny,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:92:9
|
||||
|
|
||||
LL | #[cfg_attr(a, cfg(a))] U: TraitAA,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:93:9
|
||||
|
|
||||
LL | #[cfg_attr(b, cfg(b))] U: TraitBB,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:94:9
|
||||
|
|
||||
LL | #[cfg_attr(all(), cfg(all()))] T: TraitAllAll,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:95:9
|
||||
|
|
||||
LL | #[cfg_attr(any(), cfg(any()))] T: TraitAnyAny,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:101:5
|
||||
|
|
||||
LL | #[cfg(a)] T: TraitA,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:102:5
|
||||
|
|
||||
LL | #[cfg(b)] T: TraitB,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:103:5
|
||||
|
|
||||
LL | #[cfg(all())] T: TraitAll,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:104:5
|
||||
|
|
||||
LL | #[cfg(any())] T: TraitAny,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:105:5
|
||||
|
|
||||
LL | #[cfg_attr(a, cfg(a))] T: TraitAA,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:106:5
|
||||
|
|
||||
LL | #[cfg_attr(b, cfg(b))] T: TraitBB,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:107:5
|
||||
|
|
||||
LL | #[cfg_attr(all(), cfg(all()))] T: TraitAllAll,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:108:5
|
||||
|
|
||||
LL | #[cfg_attr(any(), cfg(any()))] T: TraitAnyAny,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:115:5
|
||||
|
|
||||
LL | #[cfg(a)] T: TraitA,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:116:5
|
||||
|
|
||||
LL | #[cfg(b)] T: TraitB,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:117:5
|
||||
|
|
||||
LL | #[cfg(all())] T: TraitAll,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:118:5
|
||||
|
|
||||
LL | #[cfg(any())] T: TraitAny,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:119:5
|
||||
|
|
||||
LL | #[cfg_attr(a, cfg(a))] T: TraitAA,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:120:5
|
||||
|
|
||||
LL | #[cfg_attr(b, cfg(b))] T: TraitBB,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:121:5
|
||||
|
|
||||
LL | #[cfg_attr(all(), cfg(all()))] T: TraitAllAll,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:122:5
|
||||
|
|
||||
LL | #[cfg_attr(any(), cfg(any()))] T: TraitAnyAny,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:130:5
|
||||
|
|
||||
LL | #[cfg(a)] T: TraitA,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:131:5
|
||||
|
|
||||
LL | #[cfg(b)] T: TraitB,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:132:5
|
||||
|
|
||||
LL | #[cfg(all())] T: TraitAll,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:133:5
|
||||
|
|
||||
LL | #[cfg(any())] T: TraitAny,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:134:5
|
||||
|
|
||||
LL | #[cfg_attr(a, cfg(a))] T: TraitAA,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:135:5
|
||||
|
|
||||
LL | #[cfg_attr(b, cfg(b))] T: TraitBB,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:136:5
|
||||
|
|
||||
LL | #[cfg_attr(all(), cfg(all()))] T: TraitAllAll,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:137:5
|
||||
|
|
||||
LL | #[cfg_attr(any(), cfg(any()))] T: TraitAnyAny,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:143:5
|
||||
|
|
||||
LL | #[cfg(a)] T: TraitA,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:144:5
|
||||
|
|
||||
LL | #[cfg(b)] T: TraitB,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:145:5
|
||||
|
|
||||
LL | #[cfg(all())] T: TraitAll,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:146:5
|
||||
|
|
||||
LL | #[cfg(any())] T: TraitAny,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:147:5
|
||||
|
|
||||
LL | #[cfg_attr(a, cfg(a))] T: TraitAA,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:148:5
|
||||
|
|
||||
LL | #[cfg_attr(b, cfg(b))] T: TraitBB,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:149:5
|
||||
|
|
||||
LL | #[cfg_attr(all(), cfg(all()))] T: TraitAllAll,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:150:5
|
||||
|
|
||||
LL | #[cfg_attr(any(), cfg(any()))] T: TraitAnyAny,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:153:9
|
||||
|
|
||||
LL | #[cfg(a)] U: TraitA,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:154:9
|
||||
|
|
||||
LL | #[cfg(b)] U: TraitB,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:155:9
|
||||
|
|
||||
LL | #[cfg(all())] U: TraitAll,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:156:9
|
||||
|
|
||||
LL | #[cfg(any())] U: TraitAny,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:157:9
|
||||
|
|
||||
LL | #[cfg_attr(a, cfg(a))] U: TraitAA,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:158:9
|
||||
|
|
||||
LL | #[cfg_attr(b, cfg(b))] U: TraitBB,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:159:9
|
||||
|
|
||||
LL | #[cfg_attr(all(), cfg(all()))] U: TraitAllAll,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:160:9
|
||||
|
|
||||
LL | #[cfg_attr(any(), cfg(any()))] U: TraitAnyAny,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error: aborting due to 88 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0658`.
|
883
tests/ui/feature-gates/feature-gate-where_clause_attrs.b.stderr
Normal file
883
tests/ui/feature-gates/feature-gate-where_clause_attrs.b.stderr
Normal file
|
@ -0,0 +1,883 @@
|
|||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:33:5
|
||||
|
|
||||
LL | #[cfg(a)] T: TraitA,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:34:5
|
||||
|
|
||||
LL | #[cfg(b)] T: TraitB,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:35:5
|
||||
|
|
||||
LL | #[cfg(all())] T: TraitAll,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:36:5
|
||||
|
|
||||
LL | #[cfg(any())] T: TraitAny,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:37:5
|
||||
|
|
||||
LL | #[cfg_attr(a, cfg(a))] T: TraitAA,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:38:5
|
||||
|
|
||||
LL | #[cfg_attr(b, cfg(b))] T: TraitBB,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:39:5
|
||||
|
|
||||
LL | #[cfg_attr(all(), cfg(all()))] T: TraitAllAll,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:40:5
|
||||
|
|
||||
LL | #[cfg_attr(any(), cfg(any()))] T: TraitAnyAny,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:44:9
|
||||
|
|
||||
LL | #[cfg(a)] U: TraitA,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:45:9
|
||||
|
|
||||
LL | #[cfg(b)] U: TraitB,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:46:9
|
||||
|
|
||||
LL | #[cfg(all())] U: TraitAll,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:47:9
|
||||
|
|
||||
LL | #[cfg(any())] U: TraitAny,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:48:9
|
||||
|
|
||||
LL | #[cfg_attr(a, cfg(a))] U: TraitAA,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:49:9
|
||||
|
|
||||
LL | #[cfg_attr(b, cfg(b))] U: TraitBB,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:50:9
|
||||
|
|
||||
LL | #[cfg_attr(all(), cfg(all()))] U: TraitAllAll,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:51:9
|
||||
|
|
||||
LL | #[cfg_attr(any(), cfg(any()))] U: TraitAnyAny;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:55:9
|
||||
|
|
||||
LL | #[cfg(a)] U: TraitA,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:56:9
|
||||
|
|
||||
LL | #[cfg(b)] U: TraitB,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:57:9
|
||||
|
|
||||
LL | #[cfg(all())] U: TraitAll,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:58:9
|
||||
|
|
||||
LL | #[cfg(any())] U: TraitAny,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:59:9
|
||||
|
|
||||
LL | #[cfg_attr(a, cfg(a))] U: TraitAA,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:60:9
|
||||
|
|
||||
LL | #[cfg_attr(b, cfg(b))] U: TraitBB,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:61:9
|
||||
|
|
||||
LL | #[cfg_attr(all(), cfg(all()))] U: TraitAllAll,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:62:9
|
||||
|
|
||||
LL | #[cfg_attr(any(), cfg(any()))] U: TraitAnyAny;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:67:5
|
||||
|
|
||||
LL | #[cfg(a)] T: TraitA,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:68:5
|
||||
|
|
||||
LL | #[cfg(b)] T: TraitB,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:69:5
|
||||
|
|
||||
LL | #[cfg(all())] T: TraitAll,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:70:5
|
||||
|
|
||||
LL | #[cfg(any())] T: TraitAny,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:71:5
|
||||
|
|
||||
LL | #[cfg_attr(a, cfg(a))] T: TraitAA,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:72:5
|
||||
|
|
||||
LL | #[cfg_attr(b, cfg(b))] T: TraitBB,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:73:5
|
||||
|
|
||||
LL | #[cfg_attr(all(), cfg(all()))] T: TraitAllAll,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:74:5
|
||||
|
|
||||
LL | #[cfg_attr(any(), cfg(any()))] T: TraitAnyAny,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:77:9
|
||||
|
|
||||
LL | #[cfg(a)] U: TraitA,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:78:9
|
||||
|
|
||||
LL | #[cfg(b)] U: TraitB,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:79:9
|
||||
|
|
||||
LL | #[cfg(all())] U: TraitAll,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:80:9
|
||||
|
|
||||
LL | #[cfg(any())] U: TraitAny,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:81:9
|
||||
|
|
||||
LL | #[cfg_attr(a, cfg(a))] U: TraitAA,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:82:9
|
||||
|
|
||||
LL | #[cfg_attr(b, cfg(b))] U: TraitBB,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:83:9
|
||||
|
|
||||
LL | #[cfg_attr(all(), cfg(all()))] U: TraitAllAll,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:84:9
|
||||
|
|
||||
LL | #[cfg_attr(any(), cfg(any()))] U: TraitAnyAny;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:88:9
|
||||
|
|
||||
LL | #[cfg(a)] U: TraitA,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:89:9
|
||||
|
|
||||
LL | #[cfg(b)] U: TraitB,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:90:9
|
||||
|
|
||||
LL | #[cfg(all())] T: TraitAll,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:91:9
|
||||
|
|
||||
LL | #[cfg(any())] T: TraitAny,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:92:9
|
||||
|
|
||||
LL | #[cfg_attr(a, cfg(a))] U: TraitAA,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:93:9
|
||||
|
|
||||
LL | #[cfg_attr(b, cfg(b))] U: TraitBB,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:94:9
|
||||
|
|
||||
LL | #[cfg_attr(all(), cfg(all()))] T: TraitAllAll,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:95:9
|
||||
|
|
||||
LL | #[cfg_attr(any(), cfg(any()))] T: TraitAnyAny,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:101:5
|
||||
|
|
||||
LL | #[cfg(a)] T: TraitA,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:102:5
|
||||
|
|
||||
LL | #[cfg(b)] T: TraitB,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:103:5
|
||||
|
|
||||
LL | #[cfg(all())] T: TraitAll,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:104:5
|
||||
|
|
||||
LL | #[cfg(any())] T: TraitAny,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:105:5
|
||||
|
|
||||
LL | #[cfg_attr(a, cfg(a))] T: TraitAA,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:106:5
|
||||
|
|
||||
LL | #[cfg_attr(b, cfg(b))] T: TraitBB,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:107:5
|
||||
|
|
||||
LL | #[cfg_attr(all(), cfg(all()))] T: TraitAllAll,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:108:5
|
||||
|
|
||||
LL | #[cfg_attr(any(), cfg(any()))] T: TraitAnyAny,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:115:5
|
||||
|
|
||||
LL | #[cfg(a)] T: TraitA,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:116:5
|
||||
|
|
||||
LL | #[cfg(b)] T: TraitB,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:117:5
|
||||
|
|
||||
LL | #[cfg(all())] T: TraitAll,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:118:5
|
||||
|
|
||||
LL | #[cfg(any())] T: TraitAny,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:119:5
|
||||
|
|
||||
LL | #[cfg_attr(a, cfg(a))] T: TraitAA,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:120:5
|
||||
|
|
||||
LL | #[cfg_attr(b, cfg(b))] T: TraitBB,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:121:5
|
||||
|
|
||||
LL | #[cfg_attr(all(), cfg(all()))] T: TraitAllAll,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:122:5
|
||||
|
|
||||
LL | #[cfg_attr(any(), cfg(any()))] T: TraitAnyAny,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:130:5
|
||||
|
|
||||
LL | #[cfg(a)] T: TraitA,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:131:5
|
||||
|
|
||||
LL | #[cfg(b)] T: TraitB,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:132:5
|
||||
|
|
||||
LL | #[cfg(all())] T: TraitAll,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:133:5
|
||||
|
|
||||
LL | #[cfg(any())] T: TraitAny,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:134:5
|
||||
|
|
||||
LL | #[cfg_attr(a, cfg(a))] T: TraitAA,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:135:5
|
||||
|
|
||||
LL | #[cfg_attr(b, cfg(b))] T: TraitBB,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:136:5
|
||||
|
|
||||
LL | #[cfg_attr(all(), cfg(all()))] T: TraitAllAll,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:137:5
|
||||
|
|
||||
LL | #[cfg_attr(any(), cfg(any()))] T: TraitAnyAny,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:143:5
|
||||
|
|
||||
LL | #[cfg(a)] T: TraitA,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:144:5
|
||||
|
|
||||
LL | #[cfg(b)] T: TraitB,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:145:5
|
||||
|
|
||||
LL | #[cfg(all())] T: TraitAll,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:146:5
|
||||
|
|
||||
LL | #[cfg(any())] T: TraitAny,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:147:5
|
||||
|
|
||||
LL | #[cfg_attr(a, cfg(a))] T: TraitAA,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:148:5
|
||||
|
|
||||
LL | #[cfg_attr(b, cfg(b))] T: TraitBB,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:149:5
|
||||
|
|
||||
LL | #[cfg_attr(all(), cfg(all()))] T: TraitAllAll,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:150:5
|
||||
|
|
||||
LL | #[cfg_attr(any(), cfg(any()))] T: TraitAnyAny,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:153:9
|
||||
|
|
||||
LL | #[cfg(a)] U: TraitA,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:154:9
|
||||
|
|
||||
LL | #[cfg(b)] U: TraitB,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:155:9
|
||||
|
|
||||
LL | #[cfg(all())] U: TraitAll,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:156:9
|
||||
|
|
||||
LL | #[cfg(any())] U: TraitAny,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:157:9
|
||||
|
|
||||
LL | #[cfg_attr(a, cfg(a))] U: TraitAA,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:158:9
|
||||
|
|
||||
LL | #[cfg_attr(b, cfg(b))] U: TraitBB,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:159:9
|
||||
|
|
||||
LL | #[cfg_attr(all(), cfg(all()))] U: TraitAllAll,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: attributes in `where` clause are unstable
|
||||
--> $DIR/feature-gate-where_clause_attrs.rs:160:9
|
||||
|
|
||||
LL | #[cfg_attr(any(), cfg(any()))] U: TraitAnyAny,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #115590 <https://github.com/rust-lang/rust/issues/115590> for more information
|
||||
= help: add `#![feature(where_clause_attrs)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error: aborting due to 88 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0658`.
|
162
tests/ui/feature-gates/feature-gate-where_clause_attrs.rs
Normal file
162
tests/ui/feature-gates/feature-gate-where_clause_attrs.rs
Normal file
|
@ -0,0 +1,162 @@
|
|||
//@ revisions: a b
|
||||
|
||||
#![crate_type = "lib"]
|
||||
use std::marker::PhantomData;
|
||||
|
||||
#[cfg(a)]
|
||||
trait TraitA {}
|
||||
|
||||
#[cfg(b)]
|
||||
trait TraitB {}
|
||||
|
||||
#[cfg_attr(a, cfg(a))]
|
||||
trait TraitAA {}
|
||||
|
||||
#[cfg_attr(b, cfg(b))]
|
||||
trait TraitBB {}
|
||||
|
||||
#[cfg(all())]
|
||||
trait TraitAll {}
|
||||
|
||||
#[cfg(any())]
|
||||
trait TraitAny {}
|
||||
|
||||
#[cfg_attr(all(), cfg(all()))]
|
||||
trait TraitAllAll {}
|
||||
|
||||
#[cfg_attr(any(), cfg(any()))]
|
||||
trait TraitAnyAny {}
|
||||
|
||||
|
||||
trait A<T>
|
||||
where
|
||||
#[cfg(a)] T: TraitA, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(b)] T: TraitB, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(all())] T: TraitAll, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(any())] T: TraitAny, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(a, cfg(a))] T: TraitAA, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(b, cfg(b))] T: TraitBB, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(all(), cfg(all()))] T: TraitAllAll, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(any(), cfg(any()))] T: TraitAnyAny, //~ ERROR attributes in `where` clause are unstable
|
||||
{
|
||||
type B<U>
|
||||
where
|
||||
#[cfg(a)] U: TraitA, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(b)] U: TraitB, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(all())] U: TraitAll, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(any())] U: TraitAny, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(a, cfg(a))] U: TraitAA, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(b, cfg(b))] U: TraitBB, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(all(), cfg(all()))] U: TraitAllAll, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(any(), cfg(any()))] U: TraitAnyAny; //~ ERROR attributes in `where` clause are unstable
|
||||
|
||||
fn foo<U>(&self)
|
||||
where
|
||||
#[cfg(a)] U: TraitA, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(b)] U: TraitB, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(all())] U: TraitAll, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(any())] U: TraitAny, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(a, cfg(a))] U: TraitAA, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(b, cfg(b))] U: TraitBB, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(all(), cfg(all()))] U: TraitAllAll, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(any(), cfg(any()))] U: TraitAnyAny; //~ ERROR attributes in `where` clause are unstable
|
||||
}
|
||||
|
||||
impl<T> A<T> for T
|
||||
where
|
||||
#[cfg(a)] T: TraitA, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(b)] T: TraitB, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(all())] T: TraitAll, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(any())] T: TraitAny, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(a, cfg(a))] T: TraitAA, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(b, cfg(b))] T: TraitBB, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(all(), cfg(all()))] T: TraitAllAll, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(any(), cfg(any()))] T: TraitAnyAny, //~ ERROR attributes in `where` clause are unstable
|
||||
{
|
||||
type B<U> = () where
|
||||
#[cfg(a)] U: TraitA, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(b)] U: TraitB, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(all())] U: TraitAll, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(any())] U: TraitAny, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(a, cfg(a))] U: TraitAA, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(b, cfg(b))] U: TraitBB, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(all(), cfg(all()))] U: TraitAllAll, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(any(), cfg(any()))] U: TraitAnyAny; //~ ERROR attributes in `where` clause are unstable
|
||||
|
||||
fn foo<U>(&self)
|
||||
where
|
||||
#[cfg(a)] U: TraitA, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(b)] U: TraitB, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(all())] T: TraitAll, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(any())] T: TraitAny, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(a, cfg(a))] U: TraitAA, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(b, cfg(b))] U: TraitBB, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(all(), cfg(all()))] T: TraitAllAll, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(any(), cfg(any()))] T: TraitAnyAny, //~ ERROR attributes in `where` clause are unstable
|
||||
{}
|
||||
}
|
||||
|
||||
struct C<T>
|
||||
where
|
||||
#[cfg(a)] T: TraitA, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(b)] T: TraitB, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(all())] T: TraitAll, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(any())] T: TraitAny, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(a, cfg(a))] T: TraitAA, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(b, cfg(b))] T: TraitBB, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(all(), cfg(all()))] T: TraitAllAll, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(any(), cfg(any()))] T: TraitAnyAny, //~ ERROR attributes in `where` clause are unstable
|
||||
{
|
||||
_t: PhantomData<T>,
|
||||
}
|
||||
|
||||
union D<T>
|
||||
where
|
||||
#[cfg(a)] T: TraitA, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(b)] T: TraitB, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(all())] T: TraitAll, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(any())] T: TraitAny, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(a, cfg(a))] T: TraitAA, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(b, cfg(b))] T: TraitBB, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(all(), cfg(all()))] T: TraitAllAll, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(any(), cfg(any()))] T: TraitAnyAny, //~ ERROR attributes in `where` clause are unstable
|
||||
{
|
||||
|
||||
_t: PhantomData<T>,
|
||||
}
|
||||
|
||||
enum E<T>
|
||||
where
|
||||
#[cfg(a)] T: TraitA, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(b)] T: TraitB, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(all())] T: TraitAll, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(any())] T: TraitAny, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(a, cfg(a))] T: TraitAA, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(b, cfg(b))] T: TraitBB, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(all(), cfg(all()))] T: TraitAllAll, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(any(), cfg(any()))] T: TraitAnyAny, //~ ERROR attributes in `where` clause are unstable
|
||||
{
|
||||
E(PhantomData<T>),
|
||||
}
|
||||
|
||||
impl<T> C<T> where
|
||||
#[cfg(a)] T: TraitA, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(b)] T: TraitB, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(all())] T: TraitAll, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(any())] T: TraitAny, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(a, cfg(a))] T: TraitAA, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(b, cfg(b))] T: TraitBB, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(all(), cfg(all()))] T: TraitAllAll, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(any(), cfg(any()))] T: TraitAnyAny, //~ ERROR attributes in `where` clause are unstable
|
||||
{
|
||||
fn new<U>() where
|
||||
#[cfg(a)] U: TraitA, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(b)] U: TraitB, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(all())] U: TraitAll, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg(any())] U: TraitAny, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(a, cfg(a))] U: TraitAA, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(b, cfg(b))] U: TraitBB, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(all(), cfg(all()))] U: TraitAllAll, //~ ERROR attributes in `where` clause are unstable
|
||||
#[cfg_attr(any(), cfg(any()))] U: TraitAnyAny, //~ ERROR attributes in `where` clause are unstable
|
||||
{}
|
||||
}
|
|
@ -5,6 +5,6 @@ type A where 'a:, = u8; // OK
|
|||
type A where 'a: 'b + 'c = u8; // OK
|
||||
type A where = u8; // OK
|
||||
type A where 'a: 'b + = u8; // OK
|
||||
type A where , = u8; //~ ERROR expected one of `;`, `=`, `where`, lifetime, or type, found `,`
|
||||
type A where , = u8; //~ ERROR expected one of `#`, `;`, `=`, `where`, lifetime, or type, found `,`
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
error: expected one of `;`, `=`, `where`, lifetime, or type, found `,`
|
||||
error: expected one of `#`, `;`, `=`, `where`, lifetime, or type, found `,`
|
||||
--> $DIR/bounds-lifetime-where.rs:8:14
|
||||
|
|
||||
LL | type A where , = u8;
|
||||
| ^ expected one of `;`, `=`, `where`, lifetime, or type
|
||||
| ^ expected one of `#`, `;`, `=`, `where`, lifetime, or type
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ error: return type should be specified after the function parameters
|
|||
--> $DIR/misplaced-return-type-where-in-next-line-issue-126311.rs:5:15
|
||||
|
|
||||
LL | K: Clone, -> Result<u8, String>
|
||||
| ^^ expected one of `{`, lifetime, or type
|
||||
| ^^ expected one of `#`, `{`, lifetime, or type
|
||||
|
|
||||
help: place the return type after the function parameters
|
||||
|
|
||||
|
|
|
@ -8,8 +8,8 @@ ast-stats-1 ExprField 48 ( 0.7%) 1 48
|
|||
ast-stats-1 Attribute 64 ( 1.0%) 2 32
|
||||
ast-stats-1 - DocComment 32 ( 0.5%) 1
|
||||
ast-stats-1 - Normal 32 ( 0.5%) 1
|
||||
ast-stats-1 WherePredicate 64 ( 1.0%) 1 64
|
||||
ast-stats-1 - BoundPredicate 64 ( 1.0%) 1
|
||||
ast-stats-1 WherePredicate 72 ( 1.1%) 1 72
|
||||
ast-stats-1 - BoundPredicate 72 ( 1.1%) 1
|
||||
ast-stats-1 Local 80 ( 1.2%) 1 80
|
||||
ast-stats-1 ForeignItem 88 ( 1.3%) 1 88
|
||||
ast-stats-1 - Fn 88 ( 1.3%) 1
|
||||
|
@ -37,14 +37,14 @@ ast-stats-1 Expr 576 ( 8.6%) 8 72
|
|||
ast-stats-1 - Match 72 ( 1.1%) 1
|
||||
ast-stats-1 - Path 72 ( 1.1%) 1
|
||||
ast-stats-1 - Struct 72 ( 1.1%) 1
|
||||
ast-stats-1 - Lit 144 ( 2.2%) 2
|
||||
ast-stats-1 - Lit 144 ( 2.1%) 2
|
||||
ast-stats-1 - Block 216 ( 3.2%) 3
|
||||
ast-stats-1 PathSegment 744 (11.1%) 31 24
|
||||
ast-stats-1 Ty 896 (13.4%) 14 64
|
||||
ast-stats-1 - Ptr 64 ( 1.0%) 1
|
||||
ast-stats-1 - Ref 64 ( 1.0%) 1
|
||||
ast-stats-1 - ImplicitSelf 128 ( 1.9%) 2
|
||||
ast-stats-1 - Path 640 ( 9.6%) 10
|
||||
ast-stats-1 - Path 640 ( 9.5%) 10
|
||||
ast-stats-1 Item 1_224 (18.3%) 9 136
|
||||
ast-stats-1 - Enum 136 ( 2.0%) 1
|
||||
ast-stats-1 - ForeignMod 136 ( 2.0%) 1
|
||||
|
@ -53,7 +53,7 @@ ast-stats-1 - Trait 136 ( 2.0%) 1
|
|||
ast-stats-1 - Fn 272 ( 4.1%) 2
|
||||
ast-stats-1 - Use 408 ( 6.1%) 3
|
||||
ast-stats-1 ----------------------------------------------------------------
|
||||
ast-stats-1 Total 6_696 116
|
||||
ast-stats-1 Total 6_704 116
|
||||
ast-stats-1
|
||||
ast-stats-2 POST EXPANSION AST STATS
|
||||
ast-stats-2 Name Accumulated Size Count Item Size
|
||||
|
@ -62,8 +62,8 @@ ast-stats-2 Crate 40 ( 0.5%) 1 40
|
|||
ast-stats-2 GenericArgs 40 ( 0.5%) 1 40
|
||||
ast-stats-2 - AngleBracketed 40 ( 0.5%) 1
|
||||
ast-stats-2 ExprField 48 ( 0.7%) 1 48
|
||||
ast-stats-2 WherePredicate 64 ( 0.9%) 1 64
|
||||
ast-stats-2 - BoundPredicate 64 ( 0.9%) 1
|
||||
ast-stats-2 WherePredicate 72 ( 1.0%) 1 72
|
||||
ast-stats-2 - BoundPredicate 72 ( 1.0%) 1
|
||||
ast-stats-2 Local 80 ( 1.1%) 1 80
|
||||
ast-stats-2 ForeignItem 88 ( 1.2%) 1 88
|
||||
ast-stats-2 - Fn 88 ( 1.2%) 1
|
||||
|
@ -104,16 +104,16 @@ ast-stats-2 - Ptr 64 ( 0.9%) 1
|
|||
ast-stats-2 - Ref 64 ( 0.9%) 1
|
||||
ast-stats-2 - ImplicitSelf 128 ( 1.7%) 2
|
||||
ast-stats-2 - Path 640 ( 8.7%) 10
|
||||
ast-stats-2 Item 1_496 (20.4%) 11 136
|
||||
ast-stats-2 - Enum 136 ( 1.9%) 1
|
||||
ast-stats-2 - ExternCrate 136 ( 1.9%) 1
|
||||
ast-stats-2 - ForeignMod 136 ( 1.9%) 1
|
||||
ast-stats-2 - Impl 136 ( 1.9%) 1
|
||||
ast-stats-2 - Trait 136 ( 1.9%) 1
|
||||
ast-stats-2 Item 1_496 (20.3%) 11 136
|
||||
ast-stats-2 - Enum 136 ( 1.8%) 1
|
||||
ast-stats-2 - ExternCrate 136 ( 1.8%) 1
|
||||
ast-stats-2 - ForeignMod 136 ( 1.8%) 1
|
||||
ast-stats-2 - Impl 136 ( 1.8%) 1
|
||||
ast-stats-2 - Trait 136 ( 1.8%) 1
|
||||
ast-stats-2 - Fn 272 ( 3.7%) 2
|
||||
ast-stats-2 - Use 544 ( 7.4%) 4
|
||||
ast-stats-2 ----------------------------------------------------------------
|
||||
ast-stats-2 Total 7_344 127
|
||||
ast-stats-2 Total 7_352 127
|
||||
ast-stats-2
|
||||
hir-stats HIR STATS
|
||||
hir-stats Name Accumulated Size Count Item Size
|
||||
|
|
288
tests/ui/where-clauses/cfg_attribute.a.stderr
Normal file
288
tests/ui/where-clauses/cfg_attribute.a.stderr
Normal file
|
@ -0,0 +1,288 @@
|
|||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/cfg_attribute.rs:32:7
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/cfg_attribute.rs:43:11
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/cfg_attribute.rs:54:11
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/cfg_attribute.rs:66:7
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/cfg_attribute.rs:76:11
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/cfg_attribute.rs:87:11
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/cfg_attribute.rs:100:7
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/cfg_attribute.rs:114:7
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/cfg_attribute.rs:129:7
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/cfg_attribute.rs:144:7
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/cfg_attribute.rs:155:7
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/cfg_attribute.rs:165:11
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/cfg_attribute.rs:178:7
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:32:5
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:35:5
|
||||
|
|
||||
LL | #[rustfmt::skip] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:66:5
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:69:5
|
||||
|
|
||||
LL | #[rustfmt::skip] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:100:5
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:103:5
|
||||
|
|
||||
LL | #[rustfmt::skip] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:114:5
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:117:5
|
||||
|
|
||||
LL | #[rustfmt::skip] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:129:5
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:132:5
|
||||
|
|
||||
LL | #[rustfmt::skip] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:144:5
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:147:5
|
||||
|
|
||||
LL | #[rustfmt::skip] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:155:5
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:158:5
|
||||
|
|
||||
LL | #[rustfmt::skip] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:178:5
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:181:5
|
||||
|
|
||||
LL | #[rustfmt::skip] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:43:9
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:46:9
|
||||
|
|
||||
LL | #[rustfmt::skip] ():;
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:54:9
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:57:9
|
||||
|
|
||||
LL | #[rustfmt::skip] ():;
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:76:9
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:79:9
|
||||
|
|
||||
LL | #[rustfmt::skip] ():;
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:87:9
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:90:9
|
||||
|
|
||||
LL | #[rustfmt::skip] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:165:9
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:168:9
|
||||
|
|
||||
LL | #[rustfmt::skip] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: aborting due to 39 previous errors
|
||||
|
288
tests/ui/where-clauses/cfg_attribute.b.stderr
Normal file
288
tests/ui/where-clauses/cfg_attribute.b.stderr
Normal file
|
@ -0,0 +1,288 @@
|
|||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/cfg_attribute.rs:32:7
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/cfg_attribute.rs:43:11
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/cfg_attribute.rs:54:11
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/cfg_attribute.rs:66:7
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/cfg_attribute.rs:76:11
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/cfg_attribute.rs:87:11
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/cfg_attribute.rs:100:7
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/cfg_attribute.rs:114:7
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/cfg_attribute.rs:129:7
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/cfg_attribute.rs:144:7
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/cfg_attribute.rs:155:7
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/cfg_attribute.rs:165:11
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/cfg_attribute.rs:178:7
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:32:5
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:35:5
|
||||
|
|
||||
LL | #[rustfmt::skip] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:66:5
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:69:5
|
||||
|
|
||||
LL | #[rustfmt::skip] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:100:5
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:103:5
|
||||
|
|
||||
LL | #[rustfmt::skip] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:114:5
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:117:5
|
||||
|
|
||||
LL | #[rustfmt::skip] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:129:5
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:132:5
|
||||
|
|
||||
LL | #[rustfmt::skip] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:144:5
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:147:5
|
||||
|
|
||||
LL | #[rustfmt::skip] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:155:5
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:158:5
|
||||
|
|
||||
LL | #[rustfmt::skip] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:178:5
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:181:5
|
||||
|
|
||||
LL | #[rustfmt::skip] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:43:9
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:46:9
|
||||
|
|
||||
LL | #[rustfmt::skip] ():;
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:54:9
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:57:9
|
||||
|
|
||||
LL | #[rustfmt::skip] ():;
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:76:9
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:79:9
|
||||
|
|
||||
LL | #[rustfmt::skip] ():;
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:87:9
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:90:9
|
||||
|
|
||||
LL | #[rustfmt::skip] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:165:9
|
||||
|
|
||||
LL | #[derive(Clone)] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/cfg_attribute.rs:168:9
|
||||
|
|
||||
LL | #[rustfmt::skip] ():,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: aborting due to 39 previous errors
|
||||
|
183
tests/ui/where-clauses/cfg_attribute.rs
Normal file
183
tests/ui/where-clauses/cfg_attribute.rs
Normal file
|
@ -0,0 +1,183 @@
|
|||
//@ revisions: a b
|
||||
|
||||
#![crate_type = "lib"]
|
||||
#![feature(alloc_error_handler)]
|
||||
#![feature(cfg_accessible)]
|
||||
#![feature(cfg_eval)]
|
||||
#![feature(custom_test_frameworks)]
|
||||
#![feature(derive_const)]
|
||||
#![feature(where_clause_attrs)]
|
||||
#![allow(soft_unstable)]
|
||||
|
||||
use std::marker::PhantomData;
|
||||
|
||||
#[cfg(a)]
|
||||
trait TraitA {}
|
||||
|
||||
#[cfg(b)]
|
||||
trait TraitB {}
|
||||
|
||||
#[cfg_attr(a, cfg(a))]
|
||||
trait TraitAA {}
|
||||
|
||||
#[cfg_attr(b, cfg(b))]
|
||||
trait TraitBB {}
|
||||
|
||||
trait A<T>
|
||||
where
|
||||
#[cfg(a)] T: TraitA,
|
||||
#[cfg(b)] T: TraitB,
|
||||
#[cfg_attr(a, cfg(a))] T: TraitAA,
|
||||
#[cfg_attr(b, cfg(b))] T: TraitBB,
|
||||
#[derive(Clone)] ():,
|
||||
//~^ ERROR most attributes are not supported in `where` clauses
|
||||
//~| ERROR expected non-macro attribute, found attribute macro `derive`
|
||||
#[rustfmt::skip] ():, //~ ERROR most attributes are not supported in `where` clauses
|
||||
{
|
||||
type B<U>
|
||||
where
|
||||
#[cfg(a)] U: TraitA,
|
||||
#[cfg(b)] U: TraitB,
|
||||
#[cfg_attr(a, cfg(a))] U: TraitAA,
|
||||
#[cfg_attr(b, cfg(b))] U: TraitBB,
|
||||
#[derive(Clone)] ():,
|
||||
//~^ ERROR most attributes are not supported in `where` clauses
|
||||
//~| ERROR expected non-macro attribute, found attribute macro `derive`
|
||||
#[rustfmt::skip] ():; //~ ERROR most attributes are not supported in `where` clauses
|
||||
|
||||
fn foo<U>(&self)
|
||||
where
|
||||
#[cfg(a)] U: TraitA,
|
||||
#[cfg(b)] U: TraitB,
|
||||
#[cfg_attr(a, cfg(a))] U: TraitAA,
|
||||
#[cfg_attr(b, cfg(b))] U: TraitBB,
|
||||
#[derive(Clone)] ():,
|
||||
//~^ ERROR most attributes are not supported in `where` clauses
|
||||
//~| ERROR expected non-macro attribute, found attribute macro `derive`
|
||||
#[rustfmt::skip] ():; //~ ERROR most attributes are not supported in `where` clauses
|
||||
}
|
||||
|
||||
impl<T> A<T> for T
|
||||
where
|
||||
#[cfg(a)] T: TraitA,
|
||||
#[cfg(b)] T: TraitB,
|
||||
#[cfg_attr(a, cfg(a))] T: TraitAA,
|
||||
#[cfg_attr(b, cfg(b))] T: TraitBB,
|
||||
#[derive(Clone)] ():,
|
||||
//~^ ERROR most attributes are not supported in `where` clauses
|
||||
//~| ERROR expected non-macro attribute, found attribute macro `derive`
|
||||
#[rustfmt::skip] ():, //~ ERROR most attributes are not supported in `where` clauses
|
||||
{
|
||||
type B<U> = () where
|
||||
#[cfg(a)] U: TraitA,
|
||||
#[cfg(b)] U: TraitB,
|
||||
#[cfg_attr(a, cfg(a))] U: TraitAA,
|
||||
#[cfg_attr(b, cfg(b))] U: TraitBB,
|
||||
#[derive(Clone)] ():,
|
||||
//~^ ERROR most attributes are not supported in `where` clauses
|
||||
//~| ERROR expected non-macro attribute, found attribute macro `derive`
|
||||
#[rustfmt::skip] ():; //~ ERROR most attributes are not supported in `where` clauses
|
||||
|
||||
fn foo<U>(&self)
|
||||
where
|
||||
#[cfg(a)] U: TraitA,
|
||||
#[cfg(b)] U: TraitB,
|
||||
#[cfg_attr(a, cfg(a))] U: TraitAA,
|
||||
#[cfg_attr(b, cfg(b))] U: TraitBB,
|
||||
#[derive(Clone)] ():,
|
||||
//~^ ERROR most attributes are not supported in `where` clauses
|
||||
//~| ERROR expected non-macro attribute, found attribute macro `derive`
|
||||
#[rustfmt::skip] ():, //~ ERROR most attributes are not supported in `where` clauses
|
||||
{}
|
||||
}
|
||||
|
||||
struct C<T>
|
||||
where
|
||||
#[cfg(a)] T: TraitA,
|
||||
#[cfg(b)] T: TraitB,
|
||||
#[cfg_attr(a, cfg(a))] T: TraitAA,
|
||||
#[cfg_attr(b, cfg(b))] T: TraitBB,
|
||||
#[derive(Clone)] ():,
|
||||
//~^ ERROR most attributes are not supported in `where` clauses
|
||||
//~| ERROR expected non-macro attribute, found attribute macro `derive`
|
||||
#[rustfmt::skip] ():, //~ ERROR most attributes are not supported in `where` clauses
|
||||
{
|
||||
_t: PhantomData<T>,
|
||||
}
|
||||
|
||||
union D<T>
|
||||
where
|
||||
#[cfg(a)] T: TraitA,
|
||||
#[cfg(b)] T: TraitB,
|
||||
#[cfg_attr(a, cfg(a))] T: TraitAA,
|
||||
#[cfg_attr(b, cfg(b))] T: TraitBB,
|
||||
#[derive(Clone)] ():,
|
||||
//~^ ERROR most attributes are not supported in `where` clauses
|
||||
//~| ERROR expected non-macro attribute, found attribute macro `derive`
|
||||
#[rustfmt::skip] ():, //~ ERROR most attributes are not supported in `where` clauses
|
||||
{
|
||||
|
||||
_t: PhantomData<T>,
|
||||
}
|
||||
|
||||
enum E<T>
|
||||
where
|
||||
#[cfg(a)] T: TraitA,
|
||||
#[cfg(b)] T: TraitB,
|
||||
#[cfg_attr(a, cfg(a))] T: TraitAA,
|
||||
#[cfg_attr(b, cfg(b))] T: TraitBB,
|
||||
#[derive(Clone)] ():,
|
||||
//~^ ERROR most attributes are not supported in `where` clauses
|
||||
//~| ERROR expected non-macro attribute, found attribute macro `derive`
|
||||
#[rustfmt::skip] ():, //~ ERROR most attributes are not supported in `where` clauses
|
||||
{
|
||||
E(PhantomData<T>),
|
||||
}
|
||||
|
||||
#[allow(type_alias_bounds)]
|
||||
type F<T>
|
||||
where
|
||||
#[cfg(a)] T: TraitA,
|
||||
#[cfg(b)] T: TraitB,
|
||||
#[cfg_attr(a, cfg(a))] T: TraitAA,
|
||||
#[cfg_attr(b, cfg(b))] T: TraitBB,
|
||||
#[derive(Clone)] ():,
|
||||
//~^ ERROR most attributes are not supported in `where` clauses
|
||||
//~| ERROR expected non-macro attribute, found attribute macro `derive`
|
||||
#[rustfmt::skip] ():, //~ ERROR most attributes are not supported in `where` clauses
|
||||
= T;
|
||||
|
||||
impl<T> C<T> where
|
||||
#[cfg(a)] T: TraitA,
|
||||
#[cfg(b)] T: TraitB,
|
||||
#[cfg_attr(a, cfg(a))] T: TraitAA,
|
||||
#[cfg_attr(b, cfg(b))] T: TraitBB,
|
||||
#[derive(Clone)] ():,
|
||||
//~^ ERROR most attributes are not supported in `where` clauses
|
||||
//~| ERROR expected non-macro attribute, found attribute macro `derive`
|
||||
#[rustfmt::skip] ():, //~ ERROR most attributes are not supported in `where` clauses
|
||||
{
|
||||
fn new<U>() where
|
||||
#[cfg(a)] U: TraitA,
|
||||
#[cfg(b)] U: TraitB,
|
||||
#[cfg_attr(a, cfg(a))] U: TraitAA,
|
||||
#[cfg_attr(b, cfg(b))] U: TraitBB,
|
||||
#[derive(Clone)] ():,
|
||||
//~^ ERROR most attributes are not supported in `where` clauses
|
||||
//~| ERROR expected non-macro attribute, found attribute macro `derive`
|
||||
#[rustfmt::skip] ():, //~ ERROR most attributes are not supported in `where` clauses
|
||||
{}
|
||||
}
|
||||
|
||||
fn foo<T>()
|
||||
where
|
||||
#[cfg(a)] T: TraitA,
|
||||
#[cfg(b)] T: TraitB,
|
||||
#[cfg_attr(a, cfg(a))] T: TraitAA,
|
||||
#[cfg_attr(b, cfg(b))] T: TraitBB,
|
||||
#[derive(Clone)] ():,
|
||||
//~^ ERROR most attributes are not supported in `where` clauses
|
||||
//~| ERROR expected non-macro attribute, found attribute macro `derive`
|
||||
#[rustfmt::skip] ():, //~ ERROR most attributes are not supported in `where` clauses
|
||||
{
|
||||
}
|
36
tests/ui/where-clauses/unsupported_attribute.rs
Normal file
36
tests/ui/where-clauses/unsupported_attribute.rs
Normal file
|
@ -0,0 +1,36 @@
|
|||
#![crate_type = "lib"]
|
||||
#![feature(alloc_error_handler)]
|
||||
#![feature(cfg_accessible)]
|
||||
#![feature(cfg_eval)]
|
||||
#![feature(custom_test_frameworks)]
|
||||
#![feature(derive_const)]
|
||||
#![feature(where_clause_attrs)]
|
||||
#![allow(soft_unstable)]
|
||||
|
||||
trait Trait {}
|
||||
|
||||
fn foo<'a, T>()
|
||||
where
|
||||
#[doc = "doc"] T: Trait, //~ ERROR most attributes are not supported in `where` clauses
|
||||
#[doc = "doc"] 'a: 'static, //~ ERROR most attributes are not supported in `where` clauses
|
||||
#[ignore] T: Trait, //~ ERROR most attributes are not supported in `where` clauses
|
||||
#[ignore] 'a: 'static, //~ ERROR most attributes are not supported in `where` clauses
|
||||
#[should_panic] T: Trait, //~ ERROR most attributes are not supported in `where` clauses
|
||||
#[should_panic] 'a: 'static, //~ ERROR most attributes are not supported in `where` clauses
|
||||
#[macro_use] T: Trait, //~ ERROR most attributes are not supported in `where` clauses
|
||||
#[macro_use] 'a: 'static, //~ ERROR most attributes are not supported in `where` clauses
|
||||
#[allow(unused)] T: Trait, //~ ERROR most attributes are not supported in `where` clauses
|
||||
#[allow(unused)] 'a: 'static, //~ ERROR most attributes are not supported in `where` clauses
|
||||
#[deprecated] T: Trait, //~ ERROR most attributes are not supported in `where` clauses
|
||||
#[deprecated] 'a: 'static, //~ ERROR most attributes are not supported in `where` clauses
|
||||
#[automatically_derived] T: Trait, //~ ERROR most attributes are not supported in `where` clauses
|
||||
#[automatically_derived] 'a: 'static, //~ ERROR most attributes are not supported in `where` clauses
|
||||
#[derive(Clone)] T: Trait,
|
||||
//~^ ERROR most attributes are not supported in `where` clauses
|
||||
//~| ERROR expected non-macro attribute, found attribute macro `derive`
|
||||
#[derive(Clone)] 'a: 'static,
|
||||
//~^ ERROR most attributes are not supported in `where` clauses
|
||||
//~| ERROR expected non-macro attribute, found attribute macro `derive`
|
||||
#[rustfmt::skip] T: Trait, //~ ERROR most attributes are not supported in `where` clauses
|
||||
#[rustfmt::skip] 'a: 'static, //~ ERROR most attributes are not supported in `where` clauses
|
||||
{}
|
158
tests/ui/where-clauses/unsupported_attribute.stderr
Normal file
158
tests/ui/where-clauses/unsupported_attribute.stderr
Normal file
|
@ -0,0 +1,158 @@
|
|||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/unsupported_attribute.rs:28:7
|
||||
|
|
||||
LL | #[derive(Clone)] T: Trait,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: expected non-macro attribute, found attribute macro `derive`
|
||||
--> $DIR/unsupported_attribute.rs:31:7
|
||||
|
|
||||
LL | #[derive(Clone)] 'a: 'static,
|
||||
| ^^^^^^ not a non-macro attribute
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/unsupported_attribute.rs:14:5
|
||||
|
|
||||
LL | #[doc = "doc"] T: Trait,
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/unsupported_attribute.rs:15:5
|
||||
|
|
||||
LL | #[doc = "doc"] 'a: 'static,
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/unsupported_attribute.rs:16:5
|
||||
|
|
||||
LL | #[ignore] T: Trait,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/unsupported_attribute.rs:17:5
|
||||
|
|
||||
LL | #[ignore] 'a: 'static,
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/unsupported_attribute.rs:18:5
|
||||
|
|
||||
LL | #[should_panic] T: Trait,
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/unsupported_attribute.rs:19:5
|
||||
|
|
||||
LL | #[should_panic] 'a: 'static,
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/unsupported_attribute.rs:20:5
|
||||
|
|
||||
LL | #[macro_use] T: Trait,
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/unsupported_attribute.rs:21:5
|
||||
|
|
||||
LL | #[macro_use] 'a: 'static,
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/unsupported_attribute.rs:22:5
|
||||
|
|
||||
LL | #[allow(unused)] T: Trait,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/unsupported_attribute.rs:23:5
|
||||
|
|
||||
LL | #[allow(unused)] 'a: 'static,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/unsupported_attribute.rs:24:5
|
||||
|
|
||||
LL | #[deprecated] T: Trait,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/unsupported_attribute.rs:25:5
|
||||
|
|
||||
LL | #[deprecated] 'a: 'static,
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/unsupported_attribute.rs:26:5
|
||||
|
|
||||
LL | #[automatically_derived] T: Trait,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/unsupported_attribute.rs:27:5
|
||||
|
|
||||
LL | #[automatically_derived] 'a: 'static,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/unsupported_attribute.rs:28:5
|
||||
|
|
||||
LL | #[derive(Clone)] T: Trait,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/unsupported_attribute.rs:31:5
|
||||
|
|
||||
LL | #[derive(Clone)] 'a: 'static,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/unsupported_attribute.rs:34:5
|
||||
|
|
||||
LL | #[rustfmt::skip] T: Trait,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: most attributes are not supported in `where` clauses
|
||||
--> $DIR/unsupported_attribute.rs:35:5
|
||||
|
|
||||
LL | #[rustfmt::skip] 'a: 'static,
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: only `#[cfg]` and `#[cfg_attr]` are supported
|
||||
|
||||
error: aborting due to 20 previous errors
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue