Auto merge of #85331 - cjgillot:dirty-dancing, r=Aaron1011

Make rustc_dirty/clean annotations exhaustive by default

Fixes #45009
This commit is contained in:
bors 2021-06-01 23:02:52 +00:00
commit 153f22a906
43 changed files with 528 additions and 790 deletions

View File

@ -568,10 +568,6 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
rustc_attr!(TEST, rustc_evaluate_where_clauses, AssumedUsed, template!(Word)), rustc_attr!(TEST, rustc_evaluate_where_clauses, AssumedUsed, template!(Word)),
rustc_attr!(TEST, rustc_if_this_changed, AssumedUsed, template!(Word, List: "DepNode")), rustc_attr!(TEST, rustc_if_this_changed, AssumedUsed, template!(Word, List: "DepNode")),
rustc_attr!(TEST, rustc_then_this_would_need, AssumedUsed, template!(List: "DepNode")), rustc_attr!(TEST, rustc_then_this_would_need, AssumedUsed, template!(List: "DepNode")),
rustc_attr!(
TEST, rustc_dirty, AssumedUsed,
template!(List: r#"cfg = "...", /*opt*/ label = "...", /*opt*/ except = "...""#),
),
rustc_attr!( rustc_attr!(
TEST, rustc_clean, AssumedUsed, TEST, rustc_clean, AssumedUsed,
template!(List: r#"cfg = "...", /*opt*/ label = "...", /*opt*/ except = "...""#), template!(List: r#"cfg = "...", /*opt*/ label = "...", /*opt*/ except = "...""#),

View File

@ -1,6 +1,5 @@
//! Debugging code to test fingerprints computed for query results. //! Debugging code to test fingerprints computed for query results. For each node marked with
//! For each node marked with `#[rustc_clean]` or `#[rustc_dirty]`, //! `#[rustc_clean]` we will compare the fingerprint from the current and from the previous
//! we will compare the fingerprint from the current and from the previous
//! compilation session as appropriate: //! compilation session as appropriate:
//! //!
//! - `#[rustc_clean(cfg="rev2", except="typeck")]` if we are //! - `#[rustc_clean(cfg="rev2", except="typeck")]` if we are
@ -30,7 +29,6 @@ use std::iter::FromIterator;
use std::vec::Vec; use std::vec::Vec;
const EXCEPT: Symbol = sym::except; const EXCEPT: Symbol = sym::except;
const LABEL: Symbol = sym::label;
const CFG: Symbol = sym::cfg; const CFG: Symbol = sym::cfg;
// Base and Extra labels to build up the labels // Base and Extra labels to build up the labels
@ -101,6 +99,12 @@ const LABELS_FN_IN_TRAIT: &[&[&str]] =
/// For generic cases like inline-assembly, modules, etc. /// For generic cases like inline-assembly, modules, etc.
const LABELS_HIR_ONLY: &[&[&str]] = &[BASE_HIR]; const LABELS_HIR_ONLY: &[&[&str]] = &[BASE_HIR];
/// Impl `DepNode`s.
const LABELS_TRAIT: &[&[&str]] = &[
BASE_HIR,
&[label_strs::associated_item_def_ids, label_strs::predicates_of, label_strs::generics_of],
];
/// Impl `DepNode`s. /// Impl `DepNode`s.
const LABELS_IMPL: &[&[&str]] = &[BASE_HIR, BASE_IMPL]; const LABELS_IMPL: &[&[&str]] = &[BASE_HIR, BASE_IMPL];
@ -122,22 +126,12 @@ struct Assertion {
dirty: Labels, dirty: Labels,
} }
impl Assertion {
fn from_clean_labels(labels: Labels) -> Assertion {
Assertion { clean: labels, dirty: Labels::default() }
}
fn from_dirty_labels(labels: Labels) -> Assertion {
Assertion { clean: Labels::default(), dirty: labels }
}
}
pub fn check_dirty_clean_annotations(tcx: TyCtxt<'_>) { pub fn check_dirty_clean_annotations(tcx: TyCtxt<'_>) {
if !tcx.sess.opts.debugging_opts.query_dep_graph { if !tcx.sess.opts.debugging_opts.query_dep_graph {
return; return;
} }
// can't add `#[rustc_dirty]` etc without opting in to this feature // can't add `#[rustc_clean]` etc without opting in to this feature
if !tcx.features().rustc_attrs { if !tcx.features().rustc_attrs {
return; return;
} }
@ -147,11 +141,7 @@ pub fn check_dirty_clean_annotations(tcx: TyCtxt<'_>) {
let mut dirty_clean_visitor = DirtyCleanVisitor { tcx, checked_attrs: Default::default() }; let mut dirty_clean_visitor = DirtyCleanVisitor { tcx, checked_attrs: Default::default() };
krate.visit_all_item_likes(&mut dirty_clean_visitor); krate.visit_all_item_likes(&mut dirty_clean_visitor);
let mut all_attrs = FindAllAttrs { let mut all_attrs = FindAllAttrs { tcx, found_attrs: vec![] };
tcx,
attr_names: &[sym::rustc_dirty, sym::rustc_clean],
found_attrs: vec![],
};
intravisit::walk_crate(&mut all_attrs, krate); intravisit::walk_crate(&mut all_attrs, krate);
// Note that we cannot use the existing "unused attribute"-infrastructure // Note that we cannot use the existing "unused attribute"-infrastructure
@ -169,37 +159,20 @@ pub struct DirtyCleanVisitor<'tcx> {
impl DirtyCleanVisitor<'tcx> { impl DirtyCleanVisitor<'tcx> {
/// Possibly "deserialize" the attribute into a clean/dirty assertion /// Possibly "deserialize" the attribute into a clean/dirty assertion
fn assertion_maybe(&mut self, item_id: LocalDefId, attr: &Attribute) -> Option<Assertion> { fn assertion_maybe(&mut self, item_id: LocalDefId, attr: &Attribute) -> Option<Assertion> {
let is_clean = if self.tcx.sess.check_name(attr, sym::rustc_dirty) { if !self.tcx.sess.check_name(attr, sym::rustc_clean) {
false
} else if self.tcx.sess.check_name(attr, sym::rustc_clean) {
true
} else {
// skip: not rustc_clean/dirty // skip: not rustc_clean/dirty
return None; return None;
}; }
if !check_config(self.tcx, attr) { if !check_config(self.tcx, attr) {
// skip: not the correct `cfg=` // skip: not the correct `cfg=`
return None; return None;
} }
let assertion = if let Some(labels) = self.labels(attr) { let assertion = self.assertion_auto(item_id, attr);
if is_clean {
Assertion::from_clean_labels(labels)
} else {
Assertion::from_dirty_labels(labels)
}
} else {
self.assertion_auto(item_id, attr, is_clean)
};
Some(assertion) Some(assertion)
} }
/// Gets the "auto" assertion on pre-validated attr, along with the `except` labels. /// Gets the "auto" assertion on pre-validated attr, along with the `except` labels.
fn assertion_auto( fn assertion_auto(&mut self, item_id: LocalDefId, attr: &Attribute) -> Assertion {
&mut self,
item_id: LocalDefId,
attr: &Attribute,
is_clean: bool,
) -> Assertion {
let (name, mut auto) = self.auto_labels(item_id, attr); let (name, mut auto) = self.auto_labels(item_id, attr);
let except = self.except(attr); let except = self.except(attr);
for e in except.iter() { for e in except.iter() {
@ -211,21 +184,7 @@ impl DirtyCleanVisitor<'tcx> {
self.tcx.sess.span_fatal(attr.span, &msg); self.tcx.sess.span_fatal(attr.span, &msg);
} }
} }
if is_clean { Assertion { clean: auto, dirty: except }
Assertion { clean: auto, dirty: except }
} else {
Assertion { clean: except, dirty: auto }
}
}
fn labels(&self, attr: &Attribute) -> Option<Labels> {
for item in attr.meta_item_list().unwrap_or_else(Vec::new) {
if item.has_name(LABEL) {
let value = expect_associated_value(self.tcx, &item);
return Some(self.resolve_labels(&item, value));
}
}
None
} }
/// `except=` attribute value /// `except=` attribute value
@ -288,20 +247,7 @@ impl DirtyCleanVisitor<'tcx> {
HirItem::Union(..) => ("ItemUnion", LABELS_ADT), HirItem::Union(..) => ("ItemUnion", LABELS_ADT),
// Represents a Trait Declaration // Represents a Trait Declaration
// FIXME(michaelwoerister): trait declaration is buggy because sometimes some of HirItem::Trait(..) => ("ItemTrait", LABELS_TRAIT),
// the depnodes don't exist (because they legitimately didn't need to be
// calculated)
//
// michaelwoerister and vitiral came up with a possible solution,
// to just do this before every query
// ```
// ::rustc_middle::ty::query::plumbing::force_from_dep_node(tcx, dep_node)
// ```
//
// However, this did not seem to work effectively and more bugs were hit.
// Nebie @vitiral gave up :)
//
//HirItem::Trait(..) => ("ItemTrait", LABELS_TRAIT),
// An implementation, eg `impl<A> Trait for Foo { .. }` // An implementation, eg `impl<A> Trait for Foo { .. }`
HirItem::Impl { .. } => ("ItemKind::Impl", LABELS_IMPL), HirItem::Impl { .. } => ("ItemKind::Impl", LABELS_IMPL),
@ -434,33 +380,21 @@ impl ItemLikeVisitor<'tcx> for DirtyCleanVisitor<'tcx> {
} }
} }
/// Given a `#[rustc_dirty]` or `#[rustc_clean]` attribute, scan /// Given a `#[rustc_clean]` attribute, scan for a `cfg="foo"` attribute and check whether we have
/// for a `cfg="foo"` attribute and check whether we have a cfg /// a cfg flag called `foo`.
/// flag called `foo`.
///
/// Also make sure that the `label` and `except` fields do not
/// both exist.
fn check_config(tcx: TyCtxt<'_>, attr: &Attribute) -> bool { fn check_config(tcx: TyCtxt<'_>, attr: &Attribute) -> bool {
debug!("check_config(attr={:?})", attr); debug!("check_config(attr={:?})", attr);
let config = &tcx.sess.parse_sess.config; let config = &tcx.sess.parse_sess.config;
debug!("check_config: config={:?}", config); debug!("check_config: config={:?}", config);
let (mut cfg, mut except, mut label) = (None, false, false); let mut cfg = None;
for item in attr.meta_item_list().unwrap_or_else(Vec::new) { for item in attr.meta_item_list().unwrap_or_else(Vec::new) {
if item.has_name(CFG) { if item.has_name(CFG) {
let value = expect_associated_value(tcx, &item); let value = expect_associated_value(tcx, &item);
debug!("check_config: searching for cfg {:?}", value); debug!("check_config: searching for cfg {:?}", value);
cfg = Some(config.contains(&(value, None))); cfg = Some(config.contains(&(value, None)));
} else if !item.has_name(EXCEPT) {
tcx.sess.span_err(attr.span, &format!("unknown item `{}`", item.name_or_empty()));
} }
if item.has_name(LABEL) {
label = true;
}
if item.has_name(EXCEPT) {
except = true;
}
}
if label && except {
tcx.sess.span_fatal(attr.span, "must specify only one of: `label`, `except`");
} }
match cfg { match cfg {
@ -483,21 +417,18 @@ fn expect_associated_value(tcx: TyCtxt<'_>, item: &NestedMetaItem) -> Symbol {
} }
} }
// A visitor that collects all #[rustc_dirty]/#[rustc_clean] attributes from // A visitor that collects all #[rustc_clean] attributes from
// the HIR. It is used to verify that we really ran checks for all annotated // the HIR. It is used to verify that we really ran checks for all annotated
// nodes. // nodes.
pub struct FindAllAttrs<'a, 'tcx> { pub struct FindAllAttrs<'tcx> {
tcx: TyCtxt<'tcx>, tcx: TyCtxt<'tcx>,
attr_names: &'a [Symbol],
found_attrs: Vec<&'tcx Attribute>, found_attrs: Vec<&'tcx Attribute>,
} }
impl FindAllAttrs<'_, 'tcx> { impl FindAllAttrs<'tcx> {
fn is_active_attr(&mut self, attr: &Attribute) -> bool { fn is_active_attr(&mut self, attr: &Attribute) -> bool {
for attr_name in self.attr_names { if self.tcx.sess.check_name(attr, sym::rustc_clean) && check_config(self.tcx, attr) {
if self.tcx.sess.check_name(attr, *attr_name) && check_config(self.tcx, attr) { return true;
return true;
}
} }
false false
@ -506,17 +437,14 @@ impl FindAllAttrs<'_, 'tcx> {
fn report_unchecked_attrs(&self, mut checked_attrs: FxHashSet<ast::AttrId>) { fn report_unchecked_attrs(&self, mut checked_attrs: FxHashSet<ast::AttrId>) {
for attr in &self.found_attrs { for attr in &self.found_attrs {
if !checked_attrs.contains(&attr.id) { if !checked_attrs.contains(&attr.id) {
self.tcx.sess.span_err( self.tcx.sess.span_err(attr.span, "found unchecked `#[rustc_clean]` attribute");
attr.span,
"found unchecked `#[rustc_dirty]` / `#[rustc_clean]` attribute",
);
checked_attrs.insert(attr.id); checked_attrs.insert(attr.id);
} }
} }
} }
} }
impl intravisit::Visitor<'tcx> for FindAllAttrs<'_, 'tcx> { impl intravisit::Visitor<'tcx> for FindAllAttrs<'tcx> {
type Map = Map<'tcx>; type Map = Map<'tcx>;
fn nested_visit_map(&mut self) -> intravisit::NestedVisitorMap<Self::Map> { fn nested_visit_map(&mut self) -> intravisit::NestedVisitorMap<Self::Map> {

View File

@ -24,7 +24,7 @@ extern crate point;
pub mod fn_calls_methods_in_same_impl { pub mod fn_calls_methods_in_same_impl {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn check() { pub fn check() {
let x = Point { x: 2.0, y: 2.0 }; let x = Point { x: 2.0, y: 2.0 };
x.distance_from_origin(); x.distance_from_origin();
@ -35,7 +35,7 @@ pub mod fn_calls_methods_in_same_impl {
pub mod fn_calls_free_fn { pub mod fn_calls_free_fn {
use point::{self, Point}; use point::{self, Point};
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn check() { pub fn check() {
let x = Point { x: 2.0, y: 2.0 }; let x = Point { x: 2.0, y: 2.0 };
point::distance_squared(&x); point::distance_squared(&x);
@ -46,7 +46,7 @@ pub mod fn_calls_free_fn {
pub mod fn_make_struct { pub mod fn_make_struct {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn make_origin() -> Point { pub fn make_origin() -> Point {
Point { x: 2.0, y: 2.0 } Point { x: 2.0, y: 2.0 }
} }
@ -56,7 +56,7 @@ pub mod fn_make_struct {
pub mod fn_read_field { pub mod fn_read_field {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn get_x(p: Point) -> f32 { pub fn get_x(p: Point) -> f32 {
p.x p.x
} }
@ -66,7 +66,7 @@ pub mod fn_read_field {
pub mod fn_write_field { pub mod fn_write_field {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn inc_x(p: &mut Point) { pub fn inc_x(p: &mut Point) {
p.x += 1.0; p.x += 1.0;
} }

View File

@ -6,12 +6,12 @@
extern crate a; extern crate a;
#[rustc_dirty(label="typeck", cfg="rpass2")] #[rustc_clean(except="typeck", cfg="rpass2")]
pub fn call_function0() { pub fn call_function0() {
a::function0(77); a::function0(77);
} }
#[rustc_clean(label="typeck", cfg="rpass2")] #[rustc_clean(cfg="rpass2")]
pub fn call_function1() { pub fn call_function1() {
a::function1(77); a::function1(77);
} }

View File

@ -70,7 +70,7 @@ pub mod point {
pub mod fn_with_type_in_sig { pub mod fn_with_type_in_sig {
use point::Point; use point::Point;
#[rustc_dirty(label="typeck", cfg="cfail2")] #[rustc_clean(except="typeck,fn_sig,optimized_mir", cfg="cfail2")]
pub fn boop(p: Option<&Point>) -> f32 { pub fn boop(p: Option<&Point>) -> f32 {
p.map(|p| p.total()).unwrap_or(0.0) p.map(|p| p.total()).unwrap_or(0.0)
} }
@ -86,7 +86,7 @@ pub mod fn_with_type_in_sig {
pub mod call_fn_with_type_in_sig { pub mod call_fn_with_type_in_sig {
use fn_with_type_in_sig; use fn_with_type_in_sig;
#[rustc_dirty(label="typeck", cfg="cfail2")] #[rustc_clean(except="typeck,optimized_mir", cfg="cfail2")]
pub fn bip() -> f32 { pub fn bip() -> f32 {
fn_with_type_in_sig::boop(None) fn_with_type_in_sig::boop(None)
} }
@ -102,7 +102,7 @@ pub mod call_fn_with_type_in_sig {
pub mod fn_with_type_in_body { pub mod fn_with_type_in_body {
use point::Point; use point::Point;
#[rustc_dirty(label="typeck", cfg="cfail2")] #[rustc_clean(except="typeck,optimized_mir", cfg="cfail2")]
pub fn boop() -> f32 { pub fn boop() -> f32 {
Point::origin().total() Point::origin().total()
} }
@ -115,7 +115,7 @@ pub mod fn_with_type_in_body {
pub mod call_fn_with_type_in_body { pub mod call_fn_with_type_in_body {
use fn_with_type_in_body; use fn_with_type_in_body;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn bip() -> f32 { pub fn bip() -> f32 {
fn_with_type_in_body::boop() fn_with_type_in_body::boop()
} }
@ -125,7 +125,7 @@ pub mod call_fn_with_type_in_body {
pub mod fn_make_struct { pub mod fn_make_struct {
use point::Point; use point::Point;
#[rustc_dirty(label="typeck", cfg="cfail2")] #[rustc_clean(except="typeck,fn_sig,optimized_mir", cfg="cfail2")]
pub fn make_origin(p: Point) -> Point { pub fn make_origin(p: Point) -> Point {
Point { ..p } Point { ..p }
} }
@ -135,7 +135,7 @@ pub mod fn_make_struct {
pub mod fn_read_field { pub mod fn_read_field {
use point::Point; use point::Point;
#[rustc_dirty(label="typeck", cfg="cfail2")] #[rustc_clean(except="typeck,fn_sig,optimized_mir", cfg="cfail2")]
pub fn get_x(p: Point) -> f32 { pub fn get_x(p: Point) -> f32 {
p.x p.x
} }
@ -145,7 +145,7 @@ pub mod fn_read_field {
pub mod fn_write_field { pub mod fn_write_field {
use point::Point; use point::Point;
#[rustc_dirty(label="typeck", cfg="cfail2")] #[rustc_clean(except="typeck,fn_sig,optimized_mir", cfg="cfail2")]
pub fn inc_x(p: &mut Point) { pub fn inc_x(p: &mut Point) {
p.x += 1.0; p.x += 1.0;
} }

View File

@ -51,7 +51,7 @@ pub mod point {
pub mod fn_calls_methods_in_same_impl { pub mod fn_calls_methods_in_same_impl {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn check() { pub fn check() {
let x = Point { x: 2.0, y: 2.0 }; let x = Point { x: 2.0, y: 2.0 };
x.distance_from_origin(); x.distance_from_origin();
@ -62,7 +62,7 @@ pub mod fn_calls_methods_in_same_impl {
pub mod fn_calls_methods_in_another_impl { pub mod fn_calls_methods_in_another_impl {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn check() { pub fn check() {
let mut x = Point { x: 2.0, y: 2.0 }; let mut x = Point { x: 2.0, y: 2.0 };
x.translate(3.0, 3.0); x.translate(3.0, 3.0);
@ -73,7 +73,7 @@ pub mod fn_calls_methods_in_another_impl {
pub mod fn_make_struct { pub mod fn_make_struct {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn make_origin() -> Point { pub fn make_origin() -> Point {
Point { x: 2.0, y: 2.0 } Point { x: 2.0, y: 2.0 }
} }
@ -83,7 +83,7 @@ pub mod fn_make_struct {
pub mod fn_read_field { pub mod fn_read_field {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn get_x(p: Point) -> f32 { pub fn get_x(p: Point) -> f32 {
p.x p.x
} }
@ -93,7 +93,7 @@ pub mod fn_read_field {
pub mod fn_write_field { pub mod fn_write_field {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn inc_x(p: &mut Point) { pub fn inc_x(p: &mut Point) {
p.x += 1.0; p.x += 1.0;
} }

View File

@ -23,7 +23,7 @@ extern crate point;
pub mod fn_calls_methods_in_same_impl { pub mod fn_calls_methods_in_same_impl {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn check() { pub fn check() {
let x = Point { x: 2.0, y: 2.0 }; let x = Point { x: 2.0, y: 2.0 };
x.distance_from_origin(); x.distance_from_origin();
@ -34,7 +34,7 @@ pub mod fn_calls_methods_in_same_impl {
pub mod fn_calls_methods_in_another_impl { pub mod fn_calls_methods_in_another_impl {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn check() { pub fn check() {
let mut x = Point { x: 2.0, y: 2.0 }; let mut x = Point { x: 2.0, y: 2.0 };
x.translate(3.0, 3.0); x.translate(3.0, 3.0);
@ -45,7 +45,7 @@ pub mod fn_calls_methods_in_another_impl {
pub mod fn_make_struct { pub mod fn_make_struct {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn make_origin() -> Point { pub fn make_origin() -> Point {
Point { x: 2.0, y: 2.0 } Point { x: 2.0, y: 2.0 }
} }
@ -55,7 +55,7 @@ pub mod fn_make_struct {
pub mod fn_read_field { pub mod fn_read_field {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn get_x(p: Point) -> f32 { pub fn get_x(p: Point) -> f32 {
p.x p.x
} }
@ -65,7 +65,7 @@ pub mod fn_read_field {
pub mod fn_write_field { pub mod fn_write_field {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn inc_x(p: &mut Point) { pub fn inc_x(p: &mut Point) {
p.x += 1.0; p.x += 1.0;
} }

View File

@ -51,7 +51,7 @@ pub mod point {
pub mod fn_calls_methods_in_same_impl { pub mod fn_calls_methods_in_same_impl {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn check() { pub fn check() {
let x = Point { x: 2.0, y: 2.0 }; let x = Point { x: 2.0, y: 2.0 };
x.distance_from_origin(); x.distance_from_origin();
@ -62,7 +62,7 @@ pub mod fn_calls_methods_in_same_impl {
pub mod fn_calls_methods_in_another_impl { pub mod fn_calls_methods_in_another_impl {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn check() { pub fn check() {
let mut x = Point { x: 2.0, y: 2.0 }; let mut x = Point { x: 2.0, y: 2.0 };
x.translate(3.0, 3.0); x.translate(3.0, 3.0);
@ -73,7 +73,7 @@ pub mod fn_calls_methods_in_another_impl {
pub mod fn_make_struct { pub mod fn_make_struct {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn make_origin() -> Point { pub fn make_origin() -> Point {
Point { x: 2.0, y: 2.0 } Point { x: 2.0, y: 2.0 }
} }
@ -83,7 +83,7 @@ pub mod fn_make_struct {
pub mod fn_read_field { pub mod fn_read_field {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn get_x(p: Point) -> f32 { pub fn get_x(p: Point) -> f32 {
p.x p.x
} }
@ -93,7 +93,7 @@ pub mod fn_read_field {
pub mod fn_write_field { pub mod fn_write_field {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn inc_x(p: &mut Point) { pub fn inc_x(p: &mut Point) {
p.x += 1.0; p.x += 1.0;
} }

View File

@ -24,7 +24,7 @@ extern crate point;
pub mod fn_calls_methods_in_same_impl { pub mod fn_calls_methods_in_same_impl {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn check() { pub fn check() {
let x = Point { x: 2.0, y: 2.0 }; let x = Point { x: 2.0, y: 2.0 };
x.distance_from_origin(); x.distance_from_origin();
@ -35,7 +35,7 @@ pub mod fn_calls_methods_in_same_impl {
pub mod fn_calls_methods_in_another_impl { pub mod fn_calls_methods_in_another_impl {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn dirty() { pub fn dirty() {
let mut x = Point { x: 2.0, y: 2.0 }; let mut x = Point { x: 2.0, y: 2.0 };
x.translate(3.0, 3.0); x.translate(3.0, 3.0);
@ -46,7 +46,7 @@ pub mod fn_calls_methods_in_another_impl {
pub mod fn_make_struct { pub mod fn_make_struct {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn make_origin() -> Point { pub fn make_origin() -> Point {
Point { x: 2.0, y: 2.0 } Point { x: 2.0, y: 2.0 }
} }
@ -56,7 +56,7 @@ pub mod fn_make_struct {
pub mod fn_read_field { pub mod fn_read_field {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn get_x(p: Point) -> f32 { pub fn get_x(p: Point) -> f32 {
p.x p.x
} }
@ -66,7 +66,7 @@ pub mod fn_read_field {
pub mod fn_write_field { pub mod fn_write_field {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn inc_x(p: &mut Point) { pub fn inc_x(p: &mut Point) {
p.x += 1.0; p.x += 1.0;
} }

View File

@ -42,7 +42,7 @@ pub mod point {
pub mod fn_calls_changed_method { pub mod fn_calls_changed_method {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn check() { pub fn check() {
let p = Point { x: 2.0, y: 2.0 }; let p = Point { x: 2.0, y: 2.0 };
p.distance_from_origin(); p.distance_from_origin();
@ -53,7 +53,7 @@ pub mod fn_calls_changed_method {
pub mod fn_calls_another_method { pub mod fn_calls_another_method {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn check() { pub fn check() {
let p = Point { x: 2.0, y: 2.0 }; let p = Point { x: 2.0, y: 2.0 };
p.x(); p.x();
@ -64,7 +64,7 @@ pub mod fn_calls_another_method {
pub mod fn_make_struct { pub mod fn_make_struct {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn make_origin() -> Point { pub fn make_origin() -> Point {
Point { x: 2.0, y: 2.0 } Point { x: 2.0, y: 2.0 }
} }
@ -74,7 +74,7 @@ pub mod fn_make_struct {
pub mod fn_read_field { pub mod fn_read_field {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn get_x(p: Point) -> f32 { pub fn get_x(p: Point) -> f32 {
p.x p.x
} }
@ -84,7 +84,7 @@ pub mod fn_read_field {
pub mod fn_write_field { pub mod fn_write_field {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn inc_x(p: &mut Point) { pub fn inc_x(p: &mut Point) {
p.x += 1.0; p.x += 1.0;
} }

View File

@ -52,7 +52,7 @@ pub mod point {
pub mod fn_calls_changed_method { pub mod fn_calls_changed_method {
use point::Point; use point::Point;
#[rustc_dirty(label="typeck", cfg="cfail2")] #[rustc_clean(except="typeck,optimized_mir", cfg="cfail2")]
pub fn check() { pub fn check() {
let p = Point { x: 2.0, y: 2.0 }; let p = Point { x: 2.0, y: 2.0 };
p.distance_from_point(None); p.distance_from_point(None);
@ -63,7 +63,7 @@ pub mod fn_calls_changed_method {
pub mod fn_calls_another_method { pub mod fn_calls_another_method {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn check() { pub fn check() {
let p = Point { x: 2.0, y: 2.0 }; let p = Point { x: 2.0, y: 2.0 };
p.x(); p.x();
@ -74,7 +74,7 @@ pub mod fn_calls_another_method {
pub mod fn_make_struct { pub mod fn_make_struct {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn make_origin() -> Point { pub fn make_origin() -> Point {
Point { x: 2.0, y: 2.0 } Point { x: 2.0, y: 2.0 }
} }
@ -84,7 +84,7 @@ pub mod fn_make_struct {
pub mod fn_read_field { pub mod fn_read_field {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn get_x(p: Point) -> f32 { pub fn get_x(p: Point) -> f32 {
p.x p.x
} }
@ -94,7 +94,7 @@ pub mod fn_read_field {
pub mod fn_write_field { pub mod fn_write_field {
use point::Point; use point::Point;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn inc_x(p: &mut Point) { pub fn inc_x(p: &mut Point) {
p.x += 1.0; p.x += 1.0;
} }

View File

@ -7,9 +7,9 @@
// Check that reordering otherwise identical items is not considered a // Check that reordering otherwise identical items is not considered a
// change at all. // change at all.
#[rustc_clean(label = "hir_crate", cfg = "rpass2")] #[rustc_clean(cfg = "rpass2")]
// But removing an item, naturally, is. // But removing an item, naturally, is.
#[rustc_dirty(label = "hir_crate", cfg = "rpass3")] #[rustc_clean(except="hir_crate", cfg = "rpass3")]
#[cfg(rpass1)] #[cfg(rpass1)]
pub struct X { pub struct X {
pub x: u32, pub x: u32,

View File

@ -25,15 +25,24 @@ mod x {
mod y { mod y {
use x; use x;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(
except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of,fn_sig",
cfg="cfail2",
)]
pub fn y() { pub fn y() {
//[cfail2]~^ ERROR `typeck(y)` should be clean but is not //[cfail2]~^ ERROR `hir_owner(y)` should be dirty but is not
//[cfail2]~| ERROR `hir_owner_nodes(y)` should be dirty but is not
//[cfail2]~| ERROR `generics_of(y)` should be dirty but is not
//[cfail2]~| ERROR `predicates_of(y)` should be dirty but is not
//[cfail2]~| ERROR `type_of(y)` should be dirty but is not
//[cfail2]~| ERROR `fn_sig(y)` should be dirty but is not
//[cfail2]~| ERROR `typeck(y)` should be clean but is not
x::x(); x::x();
} }
} }
mod z { mod z {
#[rustc_dirty(label="typeck", cfg="cfail2")] #[rustc_clean(except="typeck", cfg="cfail2")]
pub fn z() { pub fn z() {
//[cfail2]~^ ERROR `typeck(z)` should be dirty but is not //[cfail2]~^ ERROR `typeck(z)` should be dirty but is not
} }

View File

@ -55,12 +55,8 @@ mod change_callee_indirectly_function {
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
use super::callee2 as callee; use super::callee2 as callee;
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner_nodes,typeck", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
pub fn change_callee_indirectly_function() { pub fn change_callee_indirectly_function() {
callee(1, 2) callee(1, 2)
} }

View File

@ -370,7 +370,7 @@ enum EnumChangeNameOfTypeParameter<S> {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(cfg="cfail2")] #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of")]
#[rustc_clean(cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
enum EnumChangeNameOfTypeParameter<T> { enum EnumChangeNameOfTypeParameter<T> {
Variant1(T), Variant1(T),
@ -386,7 +386,7 @@ enum EnumAddTypeParameter<S> {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(cfg="cfail2")] #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of")]
#[rustc_clean(cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
enum EnumAddTypeParameter<S, T> { enum EnumAddTypeParameter<S, T> {
Variant1(S), Variant1(S),
@ -402,7 +402,7 @@ enum EnumChangeNameOfLifetimeParameter<'a> {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(cfg="cfail2", except="predicates_of")] #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,generics_of,type_of")]
#[rustc_clean(cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
enum EnumChangeNameOfLifetimeParameter<'b> { enum EnumChangeNameOfLifetimeParameter<'b> {
Variant1(&'b u32), Variant1(&'b u32),
@ -418,7 +418,7 @@ enum EnumAddLifetimeParameter<'a> {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(cfg="cfail2", except="predicates_of")] #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,generics_of,type_of")]
#[rustc_clean(cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
enum EnumAddLifetimeParameter<'a, 'b> { enum EnumAddLifetimeParameter<'a, 'b> {
Variant1(&'a u32), Variant1(&'a u32),
@ -435,7 +435,7 @@ enum EnumAddLifetimeParameterBound<'a, 'b> {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(cfg="cfail2", except="generics_of,type_of")] #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,predicates_of")]
#[rustc_clean(cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
enum EnumAddLifetimeParameterBound<'a, 'b: 'a> { enum EnumAddLifetimeParameterBound<'a, 'b: 'a> {
Variant1(&'a u32), Variant1(&'a u32),
@ -450,7 +450,7 @@ enum EnumAddLifetimeBoundToParameter<'a, T> {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(cfg="cfail2", except="type_of")] #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,generics_of,predicates_of")]
#[rustc_clean(cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
enum EnumAddLifetimeBoundToParameter<'a, T: 'a> { enum EnumAddLifetimeBoundToParameter<'a, T: 'a> {
Variant1(T), Variant1(T),
@ -466,7 +466,7 @@ enum EnumAddTraitBound<S> {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(cfg="cfail2")] #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of")]
#[rustc_clean(cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
enum EnumAddTraitBound<T: Sync> { enum EnumAddTraitBound<T: Sync> {
Variant1(T), Variant1(T),
@ -482,7 +482,7 @@ enum EnumAddLifetimeParameterBoundWhere<'a, 'b> {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(cfg="cfail2", except="generics_of,type_of")] #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,predicates_of")]
#[rustc_clean(cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
enum EnumAddLifetimeParameterBoundWhere<'a, 'b> where 'b: 'a { enum EnumAddLifetimeParameterBoundWhere<'a, 'b> where 'b: 'a {
Variant1(&'a u32), Variant1(&'a u32),
@ -499,7 +499,7 @@ enum EnumAddLifetimeBoundToParameterWhere<'a, T> {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(cfg="cfail2", except="type_of")] #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,generics_of,predicates_of")]
#[rustc_clean(cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
enum EnumAddLifetimeBoundToParameterWhere<'a, T> where T: 'a { enum EnumAddLifetimeBoundToParameterWhere<'a, T> where T: 'a {
Variant1(T), Variant1(T),
@ -515,7 +515,7 @@ enum EnumAddTraitBoundWhere<S> {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(cfg="cfail2")] #[rustc_clean(cfg="cfail2", except="hir_owner,hir_owner_nodes,generics_of,predicates_of,type_of")]
#[rustc_clean(cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
enum EnumAddTraitBoundWhere<T> where T: Sync { enum EnumAddTraitBoundWhere<T> where T: Sync {
Variant1(T), Variant1(T),

View File

@ -21,7 +21,7 @@ extern "C" {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(cfg = "cfail2", except = "hir_owner_nodes")] #[rustc_clean(cfg = "cfail2", except = "hir_owner")]
#[rustc_clean(cfg = "cfail3")] #[rustc_clean(cfg = "cfail3")]
extern "C" { extern "C" {
pub fn change_function_name2(c: i64) -> i32; pub fn change_function_name2(c: i64) -> i32;
@ -34,7 +34,7 @@ extern "C" {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(cfg = "cfail2", except = "hir_owner,hir_owner_nodes")] #[rustc_clean(cfg = "cfail2")]
#[rustc_clean(cfg = "cfail3")] #[rustc_clean(cfg = "cfail3")]
extern "C" { extern "C" {
pub fn change_parameter_name(d: i64) -> i32; pub fn change_parameter_name(d: i64) -> i32;
@ -47,7 +47,7 @@ extern "C" {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(cfg = "cfail2", except = "hir_owner,hir_owner_nodes")] #[rustc_clean(cfg = "cfail2")]
#[rustc_clean(cfg = "cfail3")] #[rustc_clean(cfg = "cfail3")]
extern "C" { extern "C" {
pub fn change_parameter_type(c: i32) -> i32; pub fn change_parameter_type(c: i32) -> i32;
@ -60,7 +60,7 @@ extern "C" {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(cfg = "cfail2", except = "hir_owner,hir_owner_nodes")] #[rustc_clean(cfg = "cfail2")]
#[rustc_clean(cfg = "cfail3")] #[rustc_clean(cfg = "cfail3")]
extern "C" { extern "C" {
pub fn change_return_type(c: i32) -> i8; pub fn change_return_type(c: i32) -> i8;
@ -73,7 +73,7 @@ extern "C" {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(cfg = "cfail2", except = "hir_owner,hir_owner_nodes")] #[rustc_clean(cfg = "cfail2")]
#[rustc_clean(cfg = "cfail3")] #[rustc_clean(cfg = "cfail3")]
extern "C" { extern "C" {
pub fn add_parameter(c: i32, d: i32) -> i32; pub fn add_parameter(c: i32, d: i32) -> i32;
@ -86,7 +86,7 @@ extern "C" {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(cfg = "cfail2", except = "hir_owner,hir_owner_nodes")] #[rustc_clean(cfg = "cfail2")]
#[rustc_clean(cfg = "cfail3")] #[rustc_clean(cfg = "cfail3")]
extern "C" { extern "C" {
pub fn add_return_type(c: i32) -> i32; pub fn add_return_type(c: i32) -> i32;
@ -99,7 +99,7 @@ extern "C" {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(cfg = "cfail2", except = "hir_owner,hir_owner_nodes")] #[rustc_clean(cfg = "cfail2")]
#[rustc_clean(cfg = "cfail3")] #[rustc_clean(cfg = "cfail3")]
extern "C" { extern "C" {
pub fn make_function_variadic(c: i32, ...); pub fn make_function_variadic(c: i32, ...);
@ -112,7 +112,7 @@ extern "C" {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(cfg = "cfail2", except = "hir_owner_nodes")] #[rustc_clean(cfg = "cfail2", except = "hir_owner")]
#[rustc_clean(cfg = "cfail3")] #[rustc_clean(cfg = "cfail3")]
extern "rust-call" { extern "rust-call" {
pub fn change_calling_convention(c: i32); pub fn change_calling_convention(c: i32);
@ -125,7 +125,7 @@ extern "C" {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(cfg = "cfail2", except = "hir_owner_nodes")] #[rustc_clean(cfg = "cfail2", except = "hir_owner")]
#[rustc_clean(cfg = "cfail3")] #[rustc_clean(cfg = "cfail3")]
extern "C" { extern "C" {
pub fn make_function_public(c: i32); pub fn make_function_public(c: i32);
@ -138,7 +138,7 @@ extern "C" {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(cfg = "cfail2", except = "hir_owner_nodes")] #[rustc_clean(cfg = "cfail2", except = "hir_owner")]
#[rustc_clean(cfg = "cfail3")] #[rustc_clean(cfg = "cfail3")]
extern "C" { extern "C" {
pub fn add_function1(c: i32); pub fn add_function1(c: i32);
@ -153,7 +153,7 @@ extern "C" {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(cfg = "cfail2", except = "hir_owner,hir_owner_nodes")] #[rustc_clean(cfg = "cfail2")]
#[rustc_clean(cfg = "cfail3")] #[rustc_clean(cfg = "cfail3")]
#[link(name = "bar")] #[link(name = "bar")]
extern "C" { extern "C" {
@ -170,7 +170,7 @@ mod indirectly_change_parameter_type {
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
use super::c_i64 as c_int; use super::c_i64 as c_int;
#[rustc_dirty(cfg = "cfail2", except = "hir_owner,hir_owner_nodes")] #[rustc_clean(cfg = "cfail2")]
#[rustc_clean(cfg = "cfail3")] #[rustc_clean(cfg = "cfail3")]
extern "C" { extern "C" {
pub fn indirectly_change_parameter_type(c: c_int); pub fn indirectly_change_parameter_type(c: c_int);
@ -184,7 +184,7 @@ mod indirectly_change_return_type {
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
use super::c_i64 as c_int; use super::c_i64 as c_int;
#[rustc_dirty(cfg = "cfail2", except = "hir_owner,hir_owner_nodes")] #[rustc_clean(cfg = "cfail2")]
#[rustc_clean(cfg = "cfail3")] #[rustc_clean(cfg = "cfail3")]
extern "C" { extern "C" {
pub fn indirectly_change_return_type() -> c_int; pub fn indirectly_change_return_type() -> c_int;

View File

@ -20,10 +20,8 @@ fn change_simple_index(slice: &[u32]) -> u32 {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner_nodes", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
fn change_simple_index(slice: &[u32]) -> u32 { fn change_simple_index(slice: &[u32]) -> u32 {
slice[4] slice[4]
} }
@ -37,10 +35,8 @@ fn change_lower_bound(slice: &[u32]) -> &[u32] {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner_nodes", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
fn change_lower_bound(slice: &[u32]) -> &[u32] { fn change_lower_bound(slice: &[u32]) -> &[u32] {
&slice[2..5] &slice[2..5]
} }
@ -54,10 +50,8 @@ fn change_upper_bound(slice: &[u32]) -> &[u32] {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner_nodes", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
fn change_upper_bound(slice: &[u32]) -> &[u32] { fn change_upper_bound(slice: &[u32]) -> &[u32] {
&slice[3..7] &slice[3..7]
} }
@ -71,10 +65,8 @@ fn add_lower_bound(slice: &[u32]) -> &[u32] {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner_nodes,typeck", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
fn add_lower_bound(slice: &[u32]) -> &[u32] { fn add_lower_bound(slice: &[u32]) -> &[u32] {
&slice[3..4] &slice[3..4]
} }
@ -88,10 +80,8 @@ fn add_upper_bound(slice: &[u32]) -> &[u32] {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner_nodes,typeck", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
fn add_upper_bound(slice: &[u32]) -> &[u32] { fn add_upper_bound(slice: &[u32]) -> &[u32] {
&slice[3..7] &slice[3..7]
} }
@ -105,10 +95,8 @@ fn change_mutability(slice: &mut [u32]) -> u32 {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner_nodes,typeck", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
fn change_mutability(slice: &mut [u32]) -> u32 { fn change_mutability(slice: &mut [u32]) -> u32 {
(&slice[3..5])[0] (&slice[3..5])[0]
} }
@ -122,10 +110,8 @@ fn exclusive_to_inclusive_range(slice: &[u32]) -> &[u32] {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner_nodes,typeck", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
fn exclusive_to_inclusive_range(slice: &[u32]) -> &[u32] { fn exclusive_to_inclusive_range(slice: &[u32]) -> &[u32] {
&slice[3..=7] &slice[3..=7]
} }

View File

@ -103,7 +103,10 @@ impl Foo {
#[rustc_clean(cfg="cfail2", except="hir_owner")] #[rustc_clean(cfg="cfail2", except="hir_owner")]
#[rustc_clean(cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
impl Foo { impl Foo {
#[rustc_dirty(cfg="cfail2", except="type_of,predicates_of,promoted_mir")] #[rustc_clean(
cfg="cfail2",
except="hir_owner,hir_owner_nodes,fn_sig,generics_of,typeck,associated_item,optimized_mir",
)]
#[rustc_clean(cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
pub fn method_selfness(&self) { } pub fn method_selfness(&self) { }
} }

View File

@ -24,16 +24,8 @@
pub struct LayoutPacked; pub struct LayoutPacked;
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="type_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail2")] #[rustc_clean(cfg="cfail3")]
#[rustc_dirty(label="type_of", cfg="cfail2")]
#[rustc_clean(label="generics_of", cfg="cfail2")]
#[rustc_clean(label="predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail3")]
#[rustc_clean(label="generics_of", cfg="cfail3")]
#[rustc_clean(label="predicates_of", cfg="cfail3")]
#[repr(packed)] #[repr(packed)]
pub struct LayoutPacked; pub struct LayoutPacked;
@ -41,16 +33,8 @@ pub struct LayoutPacked;
struct LayoutC; struct LayoutC;
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="type_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail2")] #[rustc_clean(cfg="cfail3")]
#[rustc_dirty(label="type_of", cfg="cfail2")]
#[rustc_clean(label="generics_of", cfg="cfail2")]
#[rustc_clean(label="predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail3")]
#[rustc_clean(label="generics_of", cfg="cfail3")]
#[rustc_clean(label="predicates_of", cfg="cfail3")]
#[repr(C)] #[repr(C)]
struct LayoutC; struct LayoutC;
@ -61,16 +45,8 @@ struct LayoutC;
struct TupleStructFieldType(i32); struct TupleStructFieldType(i32);
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")] #[rustc_clean(cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail2")]
#[rustc_clean(label="generics_of", cfg="cfail2")]
#[rustc_clean(label="predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail3")]
#[rustc_clean(label="generics_of", cfg="cfail3")]
#[rustc_clean(label="predicates_of", cfg="cfail3")]
// Note that changing the type of a field does not change the type of the struct or enum, but // Note that changing the type of a field does not change the type of the struct or enum, but
// adding/removing fields or changing a fields name or visibility does. // adding/removing fields or changing a fields name or visibility does.
struct TupleStructFieldType( struct TupleStructFieldType(
@ -84,16 +60,8 @@ struct TupleStructFieldType(
struct TupleStructAddField(i32); struct TupleStructAddField(i32);
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,type_of", cfg="cfail2")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")] #[rustc_clean(cfg="cfail3")]
#[rustc_dirty(label="type_of", cfg="cfail2")]
#[rustc_clean(label="generics_of", cfg="cfail2")]
#[rustc_clean(label="predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail3")]
#[rustc_clean(label="generics_of", cfg="cfail3")]
#[rustc_clean(label="predicates_of", cfg="cfail3")]
struct TupleStructAddField( struct TupleStructAddField(
i32, i32,
u32 u32
@ -106,16 +74,8 @@ struct TupleStructAddField(
struct TupleStructFieldVisibility(char); struct TupleStructFieldVisibility(char);
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,type_of", cfg="cfail2")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")] #[rustc_clean(cfg="cfail3")]
#[rustc_dirty(label="type_of", cfg="cfail2")]
#[rustc_clean(label="generics_of", cfg="cfail2")]
#[rustc_clean(label="predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail3")]
#[rustc_clean(label="generics_of", cfg="cfail3")]
#[rustc_clean(label="predicates_of", cfg="cfail3")]
struct TupleStructFieldVisibility(pub char); struct TupleStructFieldVisibility(pub char);
@ -125,16 +85,8 @@ struct TupleStructFieldVisibility(pub char);
struct RecordStructFieldType { x: f32 } struct RecordStructFieldType { x: f32 }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")] #[rustc_clean(cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail2")]
#[rustc_clean(label="generics_of", cfg="cfail2")]
#[rustc_clean(label="predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail3")]
#[rustc_clean(label="generics_of", cfg="cfail3")]
#[rustc_clean(label="predicates_of", cfg="cfail3")]
// Note that changing the type of a field does not change the type of the struct or enum, but // Note that changing the type of a field does not change the type of the struct or enum, but
// adding/removing fields or changing a fields name or visibility does. // adding/removing fields or changing a fields name or visibility does.
struct RecordStructFieldType { struct RecordStructFieldType {
@ -148,16 +100,8 @@ struct RecordStructFieldType {
struct RecordStructFieldName { x: f32 } struct RecordStructFieldName { x: f32 }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,type_of", cfg="cfail2")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")] #[rustc_clean(cfg="cfail3")]
#[rustc_dirty(label="type_of", cfg="cfail2")]
#[rustc_clean(label="generics_of", cfg="cfail2")]
#[rustc_clean(label="predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail3")]
#[rustc_clean(label="generics_of", cfg="cfail3")]
#[rustc_clean(label="predicates_of", cfg="cfail3")]
struct RecordStructFieldName { y: f32 } struct RecordStructFieldName { y: f32 }
@ -167,16 +111,8 @@ struct RecordStructFieldName { y: f32 }
struct RecordStructAddField { x: f32 } struct RecordStructAddField { x: f32 }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,type_of", cfg="cfail2")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")] #[rustc_clean(cfg="cfail3")]
#[rustc_dirty(label="type_of", cfg="cfail2")]
#[rustc_clean(label="generics_of", cfg="cfail2")]
#[rustc_clean(label="predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail3")]
#[rustc_clean(label="generics_of", cfg="cfail3")]
#[rustc_clean(label="predicates_of", cfg="cfail3")]
struct RecordStructAddField { struct RecordStructAddField {
x: f32, x: f32,
y: () } y: () }
@ -188,16 +124,8 @@ struct RecordStructAddField {
struct RecordStructFieldVisibility { x: f32 } struct RecordStructFieldVisibility { x: f32 }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,type_of", cfg="cfail2")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")] #[rustc_clean(cfg="cfail3")]
#[rustc_dirty(label="type_of", cfg="cfail2")]
#[rustc_clean(label="generics_of", cfg="cfail2")]
#[rustc_clean(label="predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail3")]
#[rustc_clean(label="generics_of", cfg="cfail3")]
#[rustc_clean(label="predicates_of", cfg="cfail3")]
struct RecordStructFieldVisibility { struct RecordStructFieldVisibility {
pub x: f32 pub x: f32
} }
@ -209,16 +137,8 @@ struct RecordStructFieldVisibility {
struct AddLifetimeParameter<'a>(&'a f32, &'a f64); struct AddLifetimeParameter<'a>(&'a f32, &'a f64);
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,type_of,generics_of", cfg="cfail2")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")] #[rustc_clean(cfg="cfail3")]
#[rustc_dirty(label="type_of", cfg="cfail2")]
#[rustc_dirty(label="generics_of", cfg="cfail2")]
#[rustc_clean(label="predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail3")]
#[rustc_clean(label="generics_of", cfg="cfail3")]
#[rustc_clean(label="predicates_of", cfg="cfail3")]
struct AddLifetimeParameter<'a, 'b>(&'a f32, &'b f64); struct AddLifetimeParameter<'a, 'b>(&'a f32, &'b f64);
@ -228,16 +148,8 @@ struct AddLifetimeParameter<'a, 'b>(&'a f32, &'b f64);
struct AddLifetimeParameterBound<'a, 'b>(&'a f32, &'b f64); struct AddLifetimeParameterBound<'a, 'b>(&'a f32, &'b f64);
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")] #[rustc_clean(cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail2")]
#[rustc_clean(label="generics_of", cfg="cfail2")]
#[rustc_dirty(label="predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail3")]
#[rustc_clean(label="generics_of", cfg="cfail3")]
#[rustc_clean(label="predicates_of", cfg="cfail3")]
struct AddLifetimeParameterBound<'a, 'b: 'a>( struct AddLifetimeParameterBound<'a, 'b: 'a>(
&'a f32, &'a f32,
&'b f64 &'b f64
@ -247,16 +159,8 @@ struct AddLifetimeParameterBound<'a, 'b: 'a>(
struct AddLifetimeParameterBoundWhereClause<'a, 'b>(&'a f32, &'b f64); struct AddLifetimeParameterBoundWhereClause<'a, 'b>(&'a f32, &'b f64);
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")] #[rustc_clean(cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail2")]
#[rustc_clean(label="generics_of", cfg="cfail2")]
#[rustc_dirty(label="predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail3")]
#[rustc_clean(label="generics_of", cfg="cfail3")]
#[rustc_clean(label="predicates_of", cfg="cfail3")]
struct AddLifetimeParameterBoundWhereClause<'a, 'b>( struct AddLifetimeParameterBoundWhereClause<'a, 'b>(
&'a f32, &'a f32,
&'b f64) &'b f64)
@ -269,16 +173,8 @@ struct AddLifetimeParameterBoundWhereClause<'a, 'b>(
struct AddTypeParameter<T1>(T1, T1); struct AddTypeParameter<T1>(T1, T1);
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,type_of,generics_of,predicates_of", cfg="cfail2")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")] #[rustc_clean(cfg="cfail3")]
#[rustc_dirty(label="type_of", cfg="cfail2")]
#[rustc_dirty(label="generics_of", cfg="cfail2")]
#[rustc_dirty(label="predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail3")]
#[rustc_clean(label="generics_of", cfg="cfail3")]
#[rustc_clean(label="predicates_of", cfg="cfail3")]
struct AddTypeParameter<T1, T2>( struct AddTypeParameter<T1, T2>(
// The field contains the parent's Generics, so it's dirty even though its // The field contains the parent's Generics, so it's dirty even though its
// type hasn't changed. // type hasn't changed.
@ -293,16 +189,8 @@ struct AddTypeParameter<T1, T2>(
struct AddTypeParameterBound<T>(T); struct AddTypeParameterBound<T>(T);
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")] #[rustc_clean(cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail2")]
#[rustc_clean(label="generics_of", cfg="cfail2")]
#[rustc_dirty(label="predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail3")]
#[rustc_clean(label="generics_of", cfg="cfail3")]
#[rustc_clean(label="predicates_of", cfg="cfail3")]
struct AddTypeParameterBound<T: Send>( struct AddTypeParameterBound<T: Send>(
T T
); );
@ -312,16 +200,8 @@ struct AddTypeParameterBound<T: Send>(
struct AddTypeParameterBoundWhereClause<T>(T); struct AddTypeParameterBoundWhereClause<T>(T);
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")] #[rustc_clean(cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail2")]
#[rustc_clean(label="generics_of", cfg="cfail2")]
#[rustc_dirty(label="predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail3")]
#[rustc_clean(label="generics_of", cfg="cfail3")]
#[rustc_clean(label="predicates_of", cfg="cfail3")]
struct AddTypeParameterBoundWhereClause<T>( struct AddTypeParameterBoundWhereClause<T>(
T T
) where T: Sync; ) where T: Sync;
@ -332,16 +212,8 @@ struct AddTypeParameterBoundWhereClause<T>(
// fingerprint is stable (i.e., that there are no random influences like memory // fingerprint is stable (i.e., that there are no random influences like memory
// addresses taken into account by the hashing algorithm). // addresses taken into account by the hashing algorithm).
// Note: there is no #[cfg(...)], so this is ALWAYS compiled // Note: there is no #[cfg(...)], so this is ALWAYS compiled
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail2")] #[rustc_clean(cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail2")]
#[rustc_clean(label="generics_of", cfg="cfail2")]
#[rustc_clean(label="predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail3")]
#[rustc_clean(label="generics_of", cfg="cfail3")]
#[rustc_clean(label="predicates_of", cfg="cfail3")]
pub struct EmptyStruct; pub struct EmptyStruct;
@ -351,16 +223,8 @@ pub struct EmptyStruct;
struct Visibility; struct Visibility;
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")] #[rustc_clean(cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail2")]
#[rustc_clean(label="generics_of", cfg="cfail2")]
#[rustc_clean(label="predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail3")]
#[rustc_clean(label="generics_of", cfg="cfail3")]
#[rustc_clean(label="predicates_of", cfg="cfail3")]
pub struct Visibility; pub struct Visibility;
struct ReferencedType1; struct ReferencedType1;
@ -373,16 +237,8 @@ mod tuple_struct_change_field_type_indirectly {
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
use super::ReferencedType2 as FieldType; use super::ReferencedType2 as FieldType;
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")] #[rustc_clean(cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail2")]
#[rustc_clean(label="generics_of", cfg="cfail2")]
#[rustc_clean(label="predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail3")]
#[rustc_clean(label="generics_of", cfg="cfail3")]
#[rustc_clean(label="predicates_of", cfg="cfail3")]
struct TupleStruct( struct TupleStruct(
FieldType FieldType
); );
@ -396,16 +252,8 @@ mod record_struct_change_field_type_indirectly {
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
use super::ReferencedType2 as FieldType; use super::ReferencedType2 as FieldType;
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")] #[rustc_clean(cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail2")]
#[rustc_clean(label="generics_of", cfg="cfail2")]
#[rustc_clean(label="predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail3")]
#[rustc_clean(label="generics_of", cfg="cfail3")]
#[rustc_clean(label="predicates_of", cfg="cfail3")]
struct RecordStruct { struct RecordStruct {
_x: FieldType _x: FieldType
} }
@ -424,16 +272,8 @@ mod change_trait_bound_indirectly {
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
use super::ReferencedTrait2 as Trait; use super::ReferencedTrait2 as Trait;
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")] #[rustc_clean(cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail2")]
#[rustc_clean(label="generics_of", cfg="cfail2")]
#[rustc_dirty(label="predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail3")]
#[rustc_clean(label="generics_of", cfg="cfail3")]
#[rustc_clean(label="predicates_of", cfg="cfail3")]
struct Struct<T: Trait>(T); struct Struct<T: Trait>(T);
} }
@ -444,15 +284,7 @@ mod change_trait_bound_indirectly_in_where_clause {
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
use super::ReferencedTrait2 as Trait; use super::ReferencedTrait2 as Trait;
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")] #[rustc_clean(cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail2")]
#[rustc_clean(label="generics_of", cfg="cfail2")]
#[rustc_dirty(label="predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
#[rustc_clean(label="type_of", cfg="cfail3")]
#[rustc_clean(label="generics_of", cfg="cfail3")]
#[rustc_clean(label="predicates_of", cfg="cfail3")]
struct Struct<T>(T) where T : Trait; struct Struct<T>(T) where T : Trait;
} }

View File

@ -25,8 +25,8 @@
trait TraitVisibility { } trait TraitVisibility { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
pub trait TraitVisibility { } pub trait TraitVisibility { }
@ -36,8 +36,8 @@ pub trait TraitVisibility { }
trait TraitUnsafety { } trait TraitUnsafety { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
unsafe trait TraitUnsafety { } unsafe trait TraitUnsafety { }
@ -48,8 +48,8 @@ trait TraitAddMethod {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,associated_item_def_ids", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
pub trait TraitAddMethod { pub trait TraitAddMethod {
fn method(); fn method();
} }
@ -63,8 +63,8 @@ trait TraitChangeMethodName {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,associated_item_def_ids", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitChangeMethodName { trait TraitChangeMethodName {
fn methodChanged(); fn methodChanged();
} }
@ -78,11 +78,11 @@ trait TraitAddReturnType {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddReturnType { trait TraitAddReturnType {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,fn_sig", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method() -> u32; fn method() -> u32;
} }
@ -95,11 +95,11 @@ trait TraitChangeReturnType {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitChangeReturnType { trait TraitChangeReturnType {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method() -> u64; fn method() -> u64;
} }
@ -112,11 +112,11 @@ trait TraitAddParameterToMethod {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddParameterToMethod { trait TraitAddParameterToMethod {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,fn_sig", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method(a: u32); fn method(a: u32);
} }
@ -130,18 +130,16 @@ trait TraitChangeMethodParameterName {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitChangeMethodParameterName { trait TraitChangeMethodParameterName {
// FIXME(#38501) This should preferably always be clean. // FIXME(#38501) This should preferably always be clean.
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method(b: u32); fn method(b: u32);
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner_nodes,optimized_mir", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
fn with_default(y: i32) {} fn with_default(y: i32) {}
} }
@ -154,11 +152,11 @@ trait TraitChangeMethodParameterType {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitChangeMethodParameterType { trait TraitChangeMethodParameterType {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,fn_sig", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method(a: i64); fn method(a: i64);
} }
@ -171,11 +169,11 @@ trait TraitChangeMethodParameterTypeRef {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitChangeMethodParameterTypeRef { trait TraitChangeMethodParameterTypeRef {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,fn_sig", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method(a: &mut i32); fn method(a: &mut i32);
} }
@ -188,11 +186,11 @@ trait TraitChangeMethodParametersOrder {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitChangeMethodParametersOrder { trait TraitChangeMethodParametersOrder {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,fn_sig", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method(b: i64, a: i32); fn method(b: i64, a: i32);
} }
@ -205,11 +203,11 @@ trait TraitAddMethodAutoImplementation {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddMethodAutoImplementation { trait TraitAddMethodAutoImplementation {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,associated_item", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method() { } fn method() { }
} }
@ -223,8 +221,8 @@ trait TraitChangeOrderOfMethods {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,associated_item_def_ids", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitChangeOrderOfMethods { trait TraitChangeOrderOfMethods {
fn method1(); fn method1();
fn method0(); fn method0();
@ -239,11 +237,11 @@ trait TraitChangeModeSelfRefToMut {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitChangeModeSelfRefToMut { trait TraitChangeModeSelfRefToMut {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,fn_sig", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method(&mut self); fn method(&mut self);
} }
@ -255,13 +253,11 @@ trait TraitChangeModeSelfOwnToMut: Sized {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitChangeModeSelfOwnToMut: Sized { trait TraitChangeModeSelfOwnToMut: Sized {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,typeck,optimized_mir", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
fn method(mut self) {} fn method(mut self) {}
} }
@ -273,11 +269,11 @@ trait TraitChangeModeSelfOwnToRef {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitChangeModeSelfOwnToRef { trait TraitChangeModeSelfOwnToRef {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,fn_sig,generics_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method(&self); fn method(&self);
} }
@ -290,11 +286,11 @@ trait TraitAddUnsafeModifier {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddUnsafeModifier { trait TraitAddUnsafeModifier {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,fn_sig", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
unsafe fn method(); unsafe fn method();
} }
@ -307,11 +303,11 @@ trait TraitAddExternModifier {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddExternModifier { trait TraitAddExternModifier {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,fn_sig", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
extern "C" fn method(); extern "C" fn method();
} }
@ -324,11 +320,11 @@ trait TraitChangeExternCToRustIntrinsic {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitChangeExternCToRustIntrinsic { trait TraitChangeExternCToRustIntrinsic {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,fn_sig", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
extern "stdcall" fn method(); extern "stdcall" fn method();
} }
@ -341,11 +337,11 @@ trait TraitAddTypeParameterToMethod {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddTypeParameterToMethod { trait TraitAddTypeParameterToMethod {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,generics_of,predicates_of,type_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method<T>(); fn method<T>();
} }
@ -358,11 +354,11 @@ trait TraitAddLifetimeParameterToMethod {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddLifetimeParameterToMethod { trait TraitAddLifetimeParameterToMethod {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,fn_sig,generics_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method<'a>(); fn method<'a>();
} }
@ -379,11 +375,11 @@ trait TraitAddTraitBoundToMethodTypeParameter {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddTraitBoundToMethodTypeParameter { trait TraitAddTraitBoundToMethodTypeParameter {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method<T: ReferencedTrait0>(); fn method<T: ReferencedTrait0>();
} }
@ -396,11 +392,11 @@ trait TraitAddBuiltinBoundToMethodTypeParameter {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddBuiltinBoundToMethodTypeParameter { trait TraitAddBuiltinBoundToMethodTypeParameter {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method<T: Sized>(); fn method<T: Sized>();
} }
@ -413,11 +409,14 @@ trait TraitAddLifetimeBoundToMethodLifetimeParameter {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddLifetimeBoundToMethodLifetimeParameter { trait TraitAddLifetimeBoundToMethodLifetimeParameter {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(
#[rustc_clean(label="hir_owner", cfg="cfail3")] except="hir_owner,hir_owner_nodes,generics_of,predicates_of,fn_sig,type_of",
cfg="cfail2",
)]
#[rustc_clean(cfg="cfail3")]
fn method<'a, 'b: 'a>(a: &'a u32, b: &'b u32); fn method<'a, 'b: 'a>(a: &'a u32, b: &'b u32);
} }
@ -430,11 +429,11 @@ trait TraitAddSecondTraitBoundToMethodTypeParameter {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddSecondTraitBoundToMethodTypeParameter { trait TraitAddSecondTraitBoundToMethodTypeParameter {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method<T: ReferencedTrait0 + ReferencedTrait1>(); fn method<T: ReferencedTrait0 + ReferencedTrait1>();
} }
@ -447,11 +446,11 @@ trait TraitAddSecondBuiltinBoundToMethodTypeParameter {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddSecondBuiltinBoundToMethodTypeParameter { trait TraitAddSecondBuiltinBoundToMethodTypeParameter {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method<T: Sized + Sync>(); fn method<T: Sized + Sync>();
} }
@ -464,11 +463,14 @@ trait TraitAddSecondLifetimeBoundToMethodLifetimeParameter {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddSecondLifetimeBoundToMethodLifetimeParameter { trait TraitAddSecondLifetimeBoundToMethodLifetimeParameter {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(
#[rustc_clean(label="hir_owner", cfg="cfail3")] except="hir_owner,hir_owner_nodes,generics_of,predicates_of,fn_sig,type_of",
cfg="cfail2",
)]
#[rustc_clean(cfg="cfail3")]
fn method<'a, 'b, 'c: 'a + 'b>(a: &'a u32, b: &'b u32, c: &'c u32); fn method<'a, 'b, 'c: 'a + 'b>(a: &'a u32, b: &'b u32, c: &'c u32);
} }
@ -478,14 +480,14 @@ trait TraitAddSecondLifetimeBoundToMethodLifetimeParameter {
#[cfg(cfail1)] #[cfg(cfail1)]
trait TraitAddAssociatedType { trait TraitAddAssociatedType {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method(); fn method();
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,associated_item_def_ids", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddAssociatedType { trait TraitAddAssociatedType {
type Associated; type Associated;
@ -506,11 +508,11 @@ trait TraitAddTraitBoundToAssociatedType {
// Apparently the type bound contributes to the predicates of the trait, but // Apparently the type bound contributes to the predicates of the trait, but
// does not change the associated item itself. // does not change the associated item itself.
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddTraitBoundToAssociatedType { trait TraitAddTraitBoundToAssociatedType {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
type Associated: ReferencedTrait0; type Associated: ReferencedTrait0;
fn method(); fn method();
@ -527,11 +529,11 @@ trait TraitAddLifetimeBoundToAssociatedType<'a> {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddLifetimeBoundToAssociatedType<'a> { trait TraitAddLifetimeBoundToAssociatedType<'a> {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
type Associated: 'a; type Associated: 'a;
fn method(); fn method();
@ -548,11 +550,11 @@ trait TraitAddDefaultToAssociatedType {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddDefaultToAssociatedType { trait TraitAddDefaultToAssociatedType {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,associated_item", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
type Associated = ReferenceType0; type Associated = ReferenceType0;
fn method(); fn method();
@ -567,8 +569,8 @@ trait TraitAddAssociatedConstant {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,associated_item_def_ids", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddAssociatedConstant { trait TraitAddAssociatedConstant {
const Value: u32; const Value: u32;
@ -586,15 +588,15 @@ trait TraitAddInitializerToAssociatedConstant {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddInitializerToAssociatedConstant { trait TraitAddInitializerToAssociatedConstant {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,associated_item", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
const Value: u32 = 1; const Value: u32 = 1;
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method(); fn method();
} }
@ -609,15 +611,15 @@ trait TraitChangeTypeOfAssociatedConstant {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitChangeTypeOfAssociatedConstant { trait TraitChangeTypeOfAssociatedConstant {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,type_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
const Value: f64; const Value: f64;
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method(); fn method();
} }
@ -628,8 +630,8 @@ trait TraitChangeTypeOfAssociatedConstant {
trait TraitAddSuperTrait { } trait TraitAddSuperTrait { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddSuperTrait : ReferencedTrait0 { } trait TraitAddSuperTrait : ReferencedTrait0 { }
@ -639,8 +641,8 @@ trait TraitAddSuperTrait : ReferencedTrait0 { }
trait TraitAddBuiltiBound { } trait TraitAddBuiltiBound { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddBuiltiBound : Send { } trait TraitAddBuiltiBound : Send { }
@ -650,8 +652,8 @@ trait TraitAddBuiltiBound : Send { }
trait TraitAddStaticLifetimeBound { } trait TraitAddStaticLifetimeBound { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddStaticLifetimeBound : 'static { } trait TraitAddStaticLifetimeBound : 'static { }
@ -661,16 +663,16 @@ trait TraitAddStaticLifetimeBound : 'static { }
trait TraitAddTraitAsSecondBound : ReferencedTrait0 { } trait TraitAddTraitAsSecondBound : ReferencedTrait0 { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddTraitAsSecondBound : ReferencedTrait0 + ReferencedTrait1 { } trait TraitAddTraitAsSecondBound : ReferencedTrait0 + ReferencedTrait1 { }
#[cfg(cfail1)] #[cfg(cfail1)]
trait TraitAddTraitAsSecondBoundFromBuiltin : Send { } trait TraitAddTraitAsSecondBoundFromBuiltin : Send { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddTraitAsSecondBoundFromBuiltin : Send + ReferencedTrait0 { } trait TraitAddTraitAsSecondBoundFromBuiltin : Send + ReferencedTrait0 { }
@ -680,16 +682,16 @@ trait TraitAddTraitAsSecondBoundFromBuiltin : Send + ReferencedTrait0 { }
trait TraitAddBuiltinBoundAsSecondBound : ReferencedTrait0 { } trait TraitAddBuiltinBoundAsSecondBound : ReferencedTrait0 { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddBuiltinBoundAsSecondBound : ReferencedTrait0 + Send { } trait TraitAddBuiltinBoundAsSecondBound : ReferencedTrait0 + Send { }
#[cfg(cfail1)] #[cfg(cfail1)]
trait TraitAddBuiltinBoundAsSecondBoundFromBuiltin : Send { } trait TraitAddBuiltinBoundAsSecondBoundFromBuiltin : Send { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddBuiltinBoundAsSecondBoundFromBuiltin: Send + Copy { } trait TraitAddBuiltinBoundAsSecondBoundFromBuiltin: Send + Copy { }
@ -699,16 +701,16 @@ trait TraitAddBuiltinBoundAsSecondBoundFromBuiltin: Send + Copy { }
trait TraitAddStaticBoundAsSecondBound : ReferencedTrait0 { } trait TraitAddStaticBoundAsSecondBound : ReferencedTrait0 { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddStaticBoundAsSecondBound : ReferencedTrait0 + 'static { } trait TraitAddStaticBoundAsSecondBound : ReferencedTrait0 + 'static { }
#[cfg(cfail1)] #[cfg(cfail1)]
trait TraitAddStaticBoundAsSecondBoundFromBuiltin : Send { } trait TraitAddStaticBoundAsSecondBoundFromBuiltin : Send { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddStaticBoundAsSecondBoundFromBuiltin : Send + 'static { } trait TraitAddStaticBoundAsSecondBoundFromBuiltin : Send + 'static { }
@ -718,8 +720,8 @@ trait TraitAddStaticBoundAsSecondBoundFromBuiltin : Send + 'static { }
trait TraitAddTypeParameterToTrait { } trait TraitAddTypeParameterToTrait { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,generics_of,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddTypeParameterToTrait<T> { } trait TraitAddTypeParameterToTrait<T> { }
@ -729,8 +731,8 @@ trait TraitAddTypeParameterToTrait<T> { }
trait TraitAddLifetimeParameterToTrait { } trait TraitAddLifetimeParameterToTrait { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,generics_of,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddLifetimeParameterToTrait<'a> { } trait TraitAddLifetimeParameterToTrait<'a> { }
@ -740,8 +742,8 @@ trait TraitAddLifetimeParameterToTrait<'a> { }
trait TraitAddTraitBoundToTypeParameterOfTrait<T> { } trait TraitAddTraitBoundToTypeParameterOfTrait<T> { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddTraitBoundToTypeParameterOfTrait<T: ReferencedTrait0> { } trait TraitAddTraitBoundToTypeParameterOfTrait<T: ReferencedTrait0> { }
@ -751,8 +753,8 @@ trait TraitAddTraitBoundToTypeParameterOfTrait<T: ReferencedTrait0> { }
trait TraitAddLifetimeBoundToTypeParameterOfTrait<'a, T> { } trait TraitAddLifetimeBoundToTypeParameterOfTrait<'a, T> { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddLifetimeBoundToTypeParameterOfTrait<'a, T: 'a> { } trait TraitAddLifetimeBoundToTypeParameterOfTrait<'a, T: 'a> { }
@ -762,8 +764,8 @@ trait TraitAddLifetimeBoundToTypeParameterOfTrait<'a, T: 'a> { }
trait TraitAddLifetimeBoundToLifetimeParameterOfTrait<'a, 'b> { } trait TraitAddLifetimeBoundToLifetimeParameterOfTrait<'a, 'b> { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddLifetimeBoundToLifetimeParameterOfTrait<'a: 'b, 'b> { } trait TraitAddLifetimeBoundToLifetimeParameterOfTrait<'a: 'b, 'b> { }
@ -773,8 +775,8 @@ trait TraitAddLifetimeBoundToLifetimeParameterOfTrait<'a: 'b, 'b> { }
trait TraitAddBuiltinBoundToTypeParameterOfTrait<T> { } trait TraitAddBuiltinBoundToTypeParameterOfTrait<T> { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddBuiltinBoundToTypeParameterOfTrait<T: Send> { } trait TraitAddBuiltinBoundToTypeParameterOfTrait<T: Send> { }
@ -784,8 +786,8 @@ trait TraitAddBuiltinBoundToTypeParameterOfTrait<T: Send> { }
trait TraitAddSecondTypeParameterToTrait<T> { } trait TraitAddSecondTypeParameterToTrait<T> { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddSecondTypeParameterToTrait<T, S> { } trait TraitAddSecondTypeParameterToTrait<T, S> { }
@ -795,8 +797,8 @@ trait TraitAddSecondTypeParameterToTrait<T, S> { }
trait TraitAddSecondLifetimeParameterToTrait<'a> { } trait TraitAddSecondLifetimeParameterToTrait<'a> { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddSecondLifetimeParameterToTrait<'a, 'b> { } trait TraitAddSecondLifetimeParameterToTrait<'a, 'b> { }
@ -806,8 +808,8 @@ trait TraitAddSecondLifetimeParameterToTrait<'a, 'b> { }
trait TraitAddSecondTraitBoundToTypeParameterOfTrait<T: ReferencedTrait0> { } trait TraitAddSecondTraitBoundToTypeParameterOfTrait<T: ReferencedTrait0> { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddSecondTraitBoundToTypeParameterOfTrait<T: ReferencedTrait0 + ReferencedTrait1> { } trait TraitAddSecondTraitBoundToTypeParameterOfTrait<T: ReferencedTrait0 + ReferencedTrait1> { }
@ -817,8 +819,8 @@ trait TraitAddSecondTraitBoundToTypeParameterOfTrait<T: ReferencedTrait0 + Refer
trait TraitAddSecondLifetimeBoundToTypeParameterOfTrait<'a, 'b, T: 'a> { } trait TraitAddSecondLifetimeBoundToTypeParameterOfTrait<'a, 'b, T: 'a> { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddSecondLifetimeBoundToTypeParameterOfTrait<'a, 'b, T: 'a + 'b> { } trait TraitAddSecondLifetimeBoundToTypeParameterOfTrait<'a, 'b, T: 'a + 'b> { }
@ -828,8 +830,8 @@ trait TraitAddSecondLifetimeBoundToTypeParameterOfTrait<'a, 'b, T: 'a + 'b> { }
trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTrait<'a: 'b, 'b, 'c> { } trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTrait<'a: 'b, 'b, 'c> { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTrait<'a: 'b + 'c, 'b, 'c> { } trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTrait<'a: 'b + 'c, 'b, 'c> { }
@ -839,8 +841,8 @@ trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTrait<'a: 'b + 'c, 'b, 'c>
trait TraitAddSecondBuiltinBoundToTypeParameterOfTrait<T: Send> { } trait TraitAddSecondBuiltinBoundToTypeParameterOfTrait<T: Send> { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddSecondBuiltinBoundToTypeParameterOfTrait<T: Send + Sync> { } trait TraitAddSecondBuiltinBoundToTypeParameterOfTrait<T: Send + Sync> { }
@ -855,8 +857,8 @@ struct ReferenceType1 {}
trait TraitAddTraitBoundToTypeParameterOfTraitWhere<T> { } trait TraitAddTraitBoundToTypeParameterOfTraitWhere<T> { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddTraitBoundToTypeParameterOfTraitWhere<T> where T: ReferencedTrait0 { } trait TraitAddTraitBoundToTypeParameterOfTraitWhere<T> where T: ReferencedTrait0 { }
@ -866,8 +868,8 @@ trait TraitAddTraitBoundToTypeParameterOfTraitWhere<T> where T: ReferencedTrait0
trait TraitAddLifetimeBoundToTypeParameterOfTraitWhere<'a, T> { } trait TraitAddLifetimeBoundToTypeParameterOfTraitWhere<'a, T> { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddLifetimeBoundToTypeParameterOfTraitWhere<'a, T> where T: 'a { } trait TraitAddLifetimeBoundToTypeParameterOfTraitWhere<'a, T> where T: 'a { }
@ -877,8 +879,8 @@ trait TraitAddLifetimeBoundToTypeParameterOfTraitWhere<'a, T> where T: 'a { }
trait TraitAddLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b> { } trait TraitAddLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b> { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b> where 'a: 'b { } trait TraitAddLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b> where 'a: 'b { }
@ -888,8 +890,8 @@ trait TraitAddLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b> where 'a: 'b
trait TraitAddBuiltinBoundToTypeParameterOfTraitWhere<T> { } trait TraitAddBuiltinBoundToTypeParameterOfTraitWhere<T> { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddBuiltinBoundToTypeParameterOfTraitWhere<T> where T: Send { } trait TraitAddBuiltinBoundToTypeParameterOfTraitWhere<T> where T: Send { }
@ -899,8 +901,8 @@ trait TraitAddBuiltinBoundToTypeParameterOfTraitWhere<T> where T: Send { }
trait TraitAddSecondTraitBoundToTypeParameterOfTraitWhere<T> where T: ReferencedTrait0 { } trait TraitAddSecondTraitBoundToTypeParameterOfTraitWhere<T> where T: ReferencedTrait0 { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddSecondTraitBoundToTypeParameterOfTraitWhere<T> trait TraitAddSecondTraitBoundToTypeParameterOfTraitWhere<T>
where T: ReferencedTrait0 + ReferencedTrait1 { } where T: ReferencedTrait0 + ReferencedTrait1 { }
@ -911,8 +913,8 @@ trait TraitAddSecondTraitBoundToTypeParameterOfTraitWhere<T>
trait TraitAddSecondLifetimeBoundToTypeParameterOfTraitWhere<'a, 'b, T> where T: 'a { } trait TraitAddSecondLifetimeBoundToTypeParameterOfTraitWhere<'a, 'b, T> where T: 'a { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,generics_of,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddSecondLifetimeBoundToTypeParameterOfTraitWhere<'a, 'b, T> where T: 'a + 'b { } trait TraitAddSecondLifetimeBoundToTypeParameterOfTraitWhere<'a, 'b, T> where T: 'a + 'b { }
@ -922,8 +924,8 @@ trait TraitAddSecondLifetimeBoundToTypeParameterOfTraitWhere<'a, 'b, T> where T:
trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b, 'c> where 'a: 'b { } trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b, 'c> where 'a: 'b { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b, 'c> where 'a: 'b + 'c { } trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b, 'c> where 'a: 'b + 'c { }
@ -933,8 +935,8 @@ trait TraitAddSecondLifetimeBoundToLifetimeParameterOfTraitWhere<'a, 'b, 'c> whe
trait TraitAddSecondBuiltinBoundToTypeParameterOfTraitWhere<T> where T: Send { } trait TraitAddSecondBuiltinBoundToTypeParameterOfTraitWhere<T> where T: Send { }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitAddSecondBuiltinBoundToTypeParameterOfTraitWhere<T> where T: Send + Sync { } trait TraitAddSecondBuiltinBoundToTypeParameterOfTraitWhere<T> where T: Send + Sync { }
@ -945,11 +947,11 @@ mod change_return_type_of_method_indirectly_use {
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
use super::ReferenceType1 as ReturnType; use super::ReferenceType1 as ReturnType;
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitChangeReturnType { trait TraitChangeReturnType {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method() -> ReturnType; fn method() -> ReturnType;
} }
} }
@ -963,11 +965,11 @@ mod change_method_parameter_type_indirectly_by_use {
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
use super::ReferenceType1 as ArgType; use super::ReferenceType1 as ArgType;
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitChangeArgType { trait TraitChangeArgType {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,fn_sig", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method(a: ArgType); fn method(a: ArgType);
} }
} }
@ -981,11 +983,11 @@ mod change_method_parameter_type_bound_indirectly_by_use {
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
use super::ReferencedTrait1 as Bound; use super::ReferencedTrait1 as Bound;
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitChangeBoundOfMethodTypeParameter { trait TraitChangeBoundOfMethodTypeParameter {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method<T: Bound>(a: T); fn method<T: Bound>(a: T);
} }
} }
@ -1000,11 +1002,11 @@ mod change_method_parameter_type_bound_indirectly_by_use_where {
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
use super::ReferencedTrait1 as Bound; use super::ReferencedTrait1 as Bound;
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitChangeBoundOfMethodTypeParameterWhere { trait TraitChangeBoundOfMethodTypeParameterWhere {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method<T>(a: T) where T: Bound; fn method<T>(a: T) where T: Bound;
} }
} }
@ -1018,8 +1020,8 @@ mod change_method_type_parameter_bound_indirectly {
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
use super::ReferencedTrait1 as Bound; use super::ReferencedTrait1 as Bound;
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitChangeTraitBound<T: Bound> { trait TraitChangeTraitBound<T: Bound> {
fn method(a: T); fn method(a: T);
} }
@ -1035,8 +1037,8 @@ mod change_method_type_parameter_bound_indirectly_where {
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
use super::ReferencedTrait1 as Bound; use super::ReferencedTrait1 as Bound;
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,predicates_of", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
trait TraitChangeTraitBoundWhere<T> where T: Bound { trait TraitChangeTraitBoundWhere<T> where T: Bound {
fn method(a: T); fn method(a: T);
} }

View File

@ -30,18 +30,18 @@ impl ChangeMethodNameTrait for Foo {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,associated_item_def_ids", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
pub trait ChangeMethodNameTrait { pub trait ChangeMethodNameTrait {
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method_name2(); fn method_name2();
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,associated_item_def_ids", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
impl ChangeMethodNameTrait for Foo { impl ChangeMethodNameTrait for Foo {
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method_name2() { } fn method_name2() { }
} }
@ -59,13 +59,11 @@ impl ChangeMethodBodyTrait for Foo {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
impl ChangeMethodBodyTrait for Foo { impl ChangeMethodBodyTrait for Foo {
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner_nodes,typeck,optimized_mir", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
fn method_name() { fn method_name() {
() ()
} }
@ -86,13 +84,11 @@ impl ChangeMethodBodyTraitInlined for Foo {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
impl ChangeMethodBodyTraitInlined for Foo { impl ChangeMethodBodyTraitInlined for Foo {
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner_nodes,typeck,optimized_mir", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")]
#[rustc_clean(label="hir_owner_nodes", cfg="cfail3")]
#[inline] #[inline]
fn method_name() { fn method_name() {
panic!() panic!()
@ -117,11 +113,14 @@ pub trait ChangeMethodSelfnessTrait {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
impl ChangeMethodSelfnessTrait for Foo { impl ChangeMethodSelfnessTrait for Foo {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(
#[rustc_clean(label="hir_owner", cfg="cfail3")] except="hir_owner,hir_owner_nodes,associated_item,generics_of,fn_sig,typeck,optimized_mir",
cfg="cfail2",
)]
#[rustc_clean(cfg="cfail3")]
fn method_name(&self) { fn method_name(&self) {
() ()
} }
@ -145,11 +144,14 @@ pub trait RemoveMethodSelfnessTrait {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
impl RemoveMethodSelfnessTrait for Foo { impl RemoveMethodSelfnessTrait for Foo {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(
#[rustc_clean(label="hir_owner", cfg="cfail3")] except="hir_owner,hir_owner_nodes,associated_item,generics_of,fn_sig,typeck,optimized_mir",
cfg="cfail2",
)]
#[rustc_clean(cfg="cfail3")]
fn method_name() {} fn method_name() {}
} }
@ -171,11 +173,11 @@ pub trait ChangeMethodSelfmutnessTrait {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
impl ChangeMethodSelfmutnessTrait for Foo { impl ChangeMethodSelfmutnessTrait for Foo {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method_name(&mut self) {} fn method_name(&mut self) {}
} }
@ -197,8 +199,8 @@ pub trait ChangeItemKindTrait {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,associated_item_def_ids", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
impl ChangeItemKindTrait for Foo { impl ChangeItemKindTrait for Foo {
type name = (); type name = ();
} }
@ -223,8 +225,8 @@ pub trait RemoveItemTrait {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,associated_item_def_ids", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
impl RemoveItemTrait for Foo { impl RemoveItemTrait for Foo {
type TypeName = (); type TypeName = ();
} }
@ -248,8 +250,8 @@ pub trait AddItemTrait {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,associated_item_def_ids", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
impl AddItemTrait for Foo { impl AddItemTrait for Foo {
type TypeName = (); type TypeName = ();
fn method_name() { } fn method_name() { }
@ -268,17 +270,17 @@ impl ChangeHasValueTrait for Foo {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
pub trait ChangeHasValueTrait { pub trait ChangeHasValueTrait {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,associated_item", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method_name() { } fn method_name() { }
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
impl ChangeHasValueTrait for Foo { impl ChangeHasValueTrait for Foo {
fn method_name() { } fn method_name() { }
} }
@ -295,11 +297,11 @@ impl AddDefaultTrait for Foo {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
impl AddDefaultTrait for Foo { impl AddDefaultTrait for Foo {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,associated_item", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
default fn method_name() { } default fn method_name() { }
} }
@ -321,11 +323,11 @@ pub trait AddArgumentTrait {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
impl AddArgumentTrait for Foo { impl AddArgumentTrait for Foo {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method_name(&self, _x: u32) { } fn method_name(&self, _x: u32) { }
} }
@ -347,11 +349,11 @@ pub trait ChangeArgumentTypeTrait {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
impl ChangeArgumentTypeTrait for Foo { impl ChangeArgumentTypeTrait for Foo {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,fn_sig,typeck,optimized_mir", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn method_name(&self, _x: char) { } fn method_name(&self, _x: char) { }
} }
@ -370,11 +372,14 @@ impl AddTypeParameterToImpl<u32> for Bar<u32> {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,generics_of,impl_trait_ref", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
impl<T> AddTypeParameterToImpl<T> for Bar<T> { impl<T> AddTypeParameterToImpl<T> for Bar<T> {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(
#[rustc_clean(label="hir_owner", cfg="cfail3")] except="hir_owner,hir_owner_nodes,generics_of,fn_sig,type_of,typeck,optimized_mir",
cfg="cfail2",
)]
#[rustc_clean(cfg="cfail3")]
fn id(t: T) -> T { t } fn id(t: T) -> T { t }
} }
@ -391,11 +396,11 @@ impl ChangeSelfTypeOfImpl for u32 {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,impl_trait_ref", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
impl ChangeSelfTypeOfImpl for u64 { impl ChangeSelfTypeOfImpl for u64 {
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="fn_sig,typeck,optimized_mir", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn id(self) -> Self { self } fn id(self) -> Self { self }
} }
@ -412,11 +417,11 @@ impl<T> AddLifetimeBoundToImplParameter for T {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
impl<T: 'static> AddLifetimeBoundToImplParameter for T { impl<T: 'static> AddLifetimeBoundToImplParameter for T {
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn id(self) -> Self { self } fn id(self) -> Self { self }
} }
@ -433,11 +438,11 @@ impl<T> AddTraitBoundToImplParameter for T {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes", cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
impl<T: Clone> AddTraitBoundToImplParameter for T { impl<T: Clone> AddTraitBoundToImplParameter for T {
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
fn id(self) -> Self { self } fn id(self) -> Self { self }
} }
@ -454,11 +459,11 @@ impl AddNoMangleToMethod for Foo {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
impl AddNoMangleToMethod for Foo { impl AddNoMangleToMethod for Foo {
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
#[no_mangle] #[no_mangle]
fn add_no_mangle_to_method(&self) { } fn add_no_mangle_to_method(&self) { }
} }
@ -475,11 +480,11 @@ impl MakeMethodInline for Foo {
} }
#[cfg(not(cfail1))] #[cfg(not(cfail1))]
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
impl MakeMethodInline for Foo { impl MakeMethodInline for Foo {
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="hir_owner", cfg="cfail3")] #[rustc_clean(cfg="cfail3")]
#[inline] #[inline]
fn make_method_inline(&self) -> u8 { 0 } fn make_method_inline(&self) -> u8 { 0 }
} }

View File

@ -21,7 +21,7 @@ mod x {
mod y { mod y {
use x; use x;
#[rustc_clean(label="typeck", cfg="rpass2")] #[rustc_clean(cfg="rpass2")]
pub fn yyyy() { pub fn yyyy() {
x::xxxx(); x::xxxx();
} }
@ -30,7 +30,7 @@ mod y {
mod z { mod z {
use y; use y;
#[rustc_clean(label="typeck", cfg="rpass2")] #[rustc_clean(cfg="rpass2")]
pub fn z() { pub fn z() {
y::yyyy(); y::yyyy();
} }

View File

@ -13,7 +13,7 @@ macro_rules! first_macro {
} }
} }
#[rustc_dirty(label="typeck", cfg="rpass2")] #[rustc_clean(except="hir_owner_nodes,typeck,optimized_mir,promoted_mir", cfg="rpass2")]
#[inline(always)] #[inline(always)]
pub fn changed_fn() { pub fn changed_fn() {
// This will cause additional hygiene to be generate, // This will cause additional hygiene to be generate,

View File

@ -26,16 +26,12 @@ mod mod3 {
#[cfg(rpass2)] #[cfg(rpass2)]
use Trait2; use Trait2;
#[rustc_clean(label="hir_owner", cfg="rpass2")] #[rustc_clean(except="typeck", cfg="rpass2")]
#[rustc_clean(label="hir_owner_nodes", cfg="rpass2")]
#[rustc_dirty(label="typeck", cfg="rpass2")]
fn bar() { fn bar() {
().method(); ().method();
} }
#[rustc_clean(label="hir_owner", cfg="rpass2")] #[rustc_clean(cfg="rpass2")]
#[rustc_clean(label="hir_owner_nodes", cfg="rpass2")]
#[rustc_clean(label="typeck", cfg="rpass2")]
fn baz() { fn baz() {
22; // no method call, traits in scope don't matter 22; // no method call, traits in scope don't matter
} }

View File

@ -8,14 +8,12 @@
#![crate_type = "rlib"] #![crate_type = "rlib"]
#![feature(rustc_attrs)] #![feature(rustc_attrs)]
#[rustc_clean(label = "hir_owner", cfg = "cfail2")] #[rustc_clean(except = "hir_owner_nodes", cfg = "cfail2")]
#[rustc_dirty(label = "hir_owner_nodes", cfg = "cfail2")]
pub fn foo() { pub fn foo() {
#[cfg(cfail1)] #[cfg(cfail1)]
pub fn baz() {} // order is different... pub fn baz() {} // order is different...
#[rustc_clean(label = "hir_owner", cfg = "cfail2")] #[rustc_clean(cfg = "cfail2")]
#[rustc_clean(label = "hir_owner_nodes", cfg = "cfail2")]
pub fn bar() {} // but that doesn't matter. pub fn bar() {} // but that doesn't matter.
#[cfg(cfail2)] #[cfg(cfail2)]

View File

@ -29,18 +29,14 @@ mod mod3 {
#[cfg(rpass3)] #[cfg(rpass3)]
use mod2::Foo; use mod2::Foo;
#[rustc_clean(label="hir_owner", cfg="rpass2")] #[rustc_clean(cfg="rpass2")]
#[rustc_clean(label="hir_owner_nodes", cfg="rpass2")] #[rustc_clean(except="hir_owner_nodes,typeck", cfg="rpass3")]
#[rustc_clean(label="hir_owner", cfg="rpass3")]
#[rustc_dirty(label="hir_owner_nodes", cfg="rpass3")]
fn in_expr() { fn in_expr() {
Foo(0); Foo(0);
} }
#[rustc_clean(label="hir_owner", cfg="rpass2")] #[rustc_clean(cfg="rpass2")]
#[rustc_clean(label="hir_owner_nodes", cfg="rpass2")] #[rustc_clean(except="hir_owner_nodes,typeck", cfg="rpass3")]
#[rustc_clean(label="hir_owner", cfg="rpass3")]
#[rustc_dirty(label="hir_owner_nodes", cfg="rpass3")]
fn in_type() { fn in_type() {
test::<Foo>(); test::<Foo>();
} }

View File

@ -12,15 +12,15 @@
extern crate a; extern crate a;
#[rustc_dirty(label="typeck", cfg="rpass2")] #[rustc_clean(except="typeck,optimized_mir", cfg="rpass2")]
#[rustc_clean(label="typeck", cfg="rpass3")] #[rustc_clean(cfg="rpass3")]
pub fn use_X() -> u32 { pub fn use_X() -> u32 {
let x: a::X = 22; let x: a::X = 22;
x as u32 x as u32
} }
#[rustc_clean(label="typeck", cfg="rpass2")] #[rustc_clean(cfg="rpass2")]
#[rustc_clean(label="typeck", cfg="rpass3")] #[rustc_clean(cfg="rpass3")]
pub fn use_Y() { pub fn use_Y() {
let x: a::Y = 'c'; let x: a::Y = 'c';
} }

View File

@ -7,26 +7,22 @@
#![feature(rustc_attrs)] #![feature(rustc_attrs)]
#[rustc_clean(label="hir_owner", cfg="rpass2")] #[rustc_clean(cfg="rpass2")]
#[rustc_clean(label="hir_owner_nodes", cfg="rpass2")]
fn line_same() { fn line_same() {
let _ = line!(); let _ = line!();
} }
#[rustc_clean(label="hir_owner", cfg="rpass2")] #[rustc_clean(cfg="rpass2")]
#[rustc_clean(label="hir_owner_nodes", cfg="rpass2")]
fn col_same() { fn col_same() {
let _ = column!(); let _ = column!();
} }
#[rustc_clean(label="hir_owner", cfg="rpass2")] #[rustc_clean(cfg="rpass2")]
#[rustc_clean(label="hir_owner_nodes", cfg="rpass2")]
fn file_same() { fn file_same() {
let _ = file!(); let _ = file!();
} }
#[rustc_clean(label="hir_owner", cfg="rpass2")] #[rustc_clean(except="hir_owner_nodes,optimized_mir", cfg="rpass2")]
#[rustc_dirty(label="hir_owner_nodes", cfg="rpass2")]
fn line_different() { fn line_different() {
#[cfg(rpass1)] #[cfg(rpass1)]
{ {
@ -38,8 +34,7 @@ fn line_different() {
} }
} }
#[rustc_clean(label="hir_owner", cfg="rpass2")] #[rustc_clean(except="hir_owner_nodes,optimized_mir", cfg="rpass2")]
#[rustc_dirty(label="hir_owner_nodes", cfg="rpass2")]
fn col_different() { fn col_different() {
#[cfg(rpass1)] #[cfg(rpass1)]
{ {

View File

@ -1,4 +1,4 @@
#[rustc_clean(label="hir_owner", cfg="rpass2")] #[rustc_clean(cfg="rpass2")]
pub struct SomeType { pub struct SomeType {
pub x: u32, pub x: u32,
pub y: i64, pub y: i64,

View File

@ -1,4 +1,4 @@
#[rustc_clean(label="hir_owner", cfg="rpass2")] #[rustc_clean(cfg="rpass2")]
pub struct SomeOtherType { pub struct SomeOtherType {
pub a: i32, pub a: i32,
pub b: u64, pub b: u64,

View File

@ -12,6 +12,5 @@
pub fn main() {} pub fn main() {}
#[cfg(rpass2)] #[cfg(rpass2)]
#[rustc_dirty(label="hir_owner", cfg="rpass2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,optimized_mir", cfg="rpass2")]
#[rustc_dirty(label="hir_owner_nodes", cfg="rpass2")]
pub fn main() {} pub fn main() {}

View File

@ -13,7 +13,7 @@ pub fn main() {
} }
#[cfg(rpass2)] #[cfg(rpass2)]
#[rustc_dirty(label="optimized_mir", cfg="rpass2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,optimized_mir", cfg="rpass2")]
pub fn main() { pub fn main() {
let _ = 0u8 + 1; let _ = 0u8 + 1;
} }

View File

@ -18,8 +18,7 @@ pub mod x {
} }
#[cfg(cfail2)] #[cfg(cfail2)]
#[rustc_dirty(label="hir_owner_nodes", cfg="cfail2")] #[rustc_clean(except="hir_owner,hir_owner_nodes,optimized_mir,promoted_mir", cfg="cfail2")]
#[rustc_dirty(label="optimized_mir", cfg="cfail2")]
pub fn x() { pub fn x() {
println!("{}", "2"); println!("{}", "2");
} }
@ -28,8 +27,7 @@ pub mod x {
pub mod y { pub mod y {
use x; use x;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="optimized_mir", cfg="cfail2")]
pub fn y() { pub fn y() {
x::x(); x::x();
} }
@ -38,8 +36,7 @@ pub mod y {
pub mod z { pub mod z {
use y; use y;
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
#[rustc_clean(label="optimized_mir", cfg="cfail2")]
pub fn z() { pub fn z() {
y::y(); y::y();
} }

View File

@ -21,17 +21,17 @@ pub struct Y {
pub y: char pub y: char
} }
#[rustc_dirty(label="typeck", cfg="rpass2")] #[rustc_clean(except="fn_sig,typeck", cfg="rpass2")]
pub fn use_X(x: X) -> u32 { pub fn use_X(x: X) -> u32 {
x.x as u32 x.x as u32
} }
#[rustc_dirty(label="typeck", cfg="rpass2")] #[rustc_clean(except="typeck", cfg="rpass2")]
pub fn use_EmbedX(embed: EmbedX) -> u32 { pub fn use_EmbedX(embed: EmbedX) -> u32 {
embed.x.x as u32 embed.x.x as u32
} }
#[rustc_clean(label="typeck", cfg="rpass2")] #[rustc_clean(cfg="rpass2")]
pub fn use_Y() { pub fn use_Y() {
let x: Y = Y { y: 'c' }; let x: Y = Y { y: 'c' };
} }

View File

@ -24,7 +24,7 @@ pub struct Y {
pub y: char pub y: char
} }
#[rustc_dirty(label="typeck", cfg="cfail2")] #[rustc_clean(except="typeck", cfg="cfail2")]
pub fn use_X() -> u32 { pub fn use_X() -> u32 {
let x: X = X { x: 22 }; let x: X = X { x: 22 };
//[cfail2]~^ ERROR struct `X` has no field named `x` //[cfail2]~^ ERROR struct `X` has no field named `x`
@ -32,13 +32,13 @@ pub fn use_X() -> u32 {
//[cfail2]~^ ERROR no field `x` on type `X` //[cfail2]~^ ERROR no field `x` on type `X`
} }
#[rustc_dirty(label="typeck", cfg="cfail2")] #[rustc_clean(except="typeck", cfg="cfail2")]
pub fn use_EmbedX(embed: EmbedX) -> u32 { pub fn use_EmbedX(embed: EmbedX) -> u32 {
embed.x.x as u32 embed.x.x as u32
//[cfail2]~^ ERROR no field `x` on type `X` //[cfail2]~^ ERROR no field `x` on type `X`
} }
#[rustc_clean(label="typeck", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
pub fn use_Y() { pub fn use_Y() {
let x: Y = Y { y: 'c' }; let x: Y = Y { y: 'c' };
} }

View File

@ -24,19 +24,19 @@ pub struct Y {
pub y: char pub y: char
} }
#[rustc_dirty(label="typeck", cfg="rpass2")] #[rustc_clean(except="typeck", cfg="rpass2")]
pub fn use_X() -> u32 { pub fn use_X() -> u32 {
let x: X = X { x: 22 }; let x: X = X { x: 22 };
x.x as u32 x.x as u32
} }
#[rustc_dirty(label="typeck", cfg="rpass2")] #[rustc_clean(except="typeck", cfg="rpass2")]
pub fn use_EmbedX(x: EmbedX) -> u32 { pub fn use_EmbedX(x: EmbedX) -> u32 {
let x: X = X { x: 22 }; let x: X = X { x: 22 };
x.x as u32 x.x as u32
} }
#[rustc_clean(label="typeck", cfg="rpass2")] #[rustc_clean(cfg="rpass2")]
pub fn use_Y() { pub fn use_Y() {
let x: Y = Y { y: 'c' }; let x: Y = Y { y: 'c' };
} }

View File

@ -8,18 +8,18 @@ extern crate a;
use a::*; use a::*;
#[rustc_dirty(label="typeck", cfg="rpass2")] #[rustc_clean(except="typeck", cfg="rpass2")]
pub fn use_X() -> u32 { pub fn use_X() -> u32 {
let x: X = X { x: 22 }; let x: X = X { x: 22 };
x.x as u32 x.x as u32
} }
#[rustc_dirty(label="typeck", cfg="rpass2")] #[rustc_clean(except="typeck", cfg="rpass2")]
pub fn use_EmbedX(embed: EmbedX) -> u32 { pub fn use_EmbedX(embed: EmbedX) -> u32 {
embed.x.x as u32 embed.x.x as u32
} }
#[rustc_clean(label="typeck", cfg="rpass2")] #[rustc_clean(cfg="rpass2")]
pub fn use_Y() { pub fn use_Y() {
let x: Y = Y { y: 'c' }; let x: Y = Y { y: 'c' };
} }

View File

@ -24,19 +24,19 @@ pub struct Y {
pub y: char pub y: char
} }
#[rustc_clean(label="typeck", cfg="rpass2")] #[rustc_clean(cfg="rpass2")]
pub fn use_X() -> u32 { pub fn use_X() -> u32 {
let x: X = X { x: 22 }; let x: X = X { x: 22 };
x.x as u32 x.x as u32
} }
#[rustc_clean(label="typeck", cfg="rpass2")] #[rustc_clean(cfg="rpass2")]
pub fn use_EmbedX(x: EmbedX) -> u32 { pub fn use_EmbedX(x: EmbedX) -> u32 {
let x: X = X { x: 22 }; let x: X = X { x: 22 };
x.x as u32 x.x as u32
} }
#[rustc_clean(label="typeck", cfg="rpass2")] #[rustc_clean(cfg="rpass2")]
pub fn use_Y() { pub fn use_Y() {
let x: Y = Y { y: 'c' }; let x: Y = Y { y: 'c' };
} }

View File

@ -25,17 +25,17 @@ pub struct Y {
pub y: char pub y: char
} }
#[rustc_dirty(label="typeck", cfg="rpass2")] #[rustc_clean(except="typeck,fn_sig", cfg="rpass2")]
pub fn use_X(x: X) -> u32 { pub fn use_X(x: X) -> u32 {
x.x as u32 x.x as u32
} }
#[rustc_dirty(label="typeck", cfg="rpass2")] #[rustc_clean(except="typeck", cfg="rpass2")]
pub fn use_EmbedX(embed: EmbedX) -> u32 { pub fn use_EmbedX(embed: EmbedX) -> u32 {
embed.x.x as u32 embed.x.x as u32
} }
#[rustc_clean(label="typeck", cfg="rpass2")] #[rustc_clean(cfg="rpass2")]
pub fn use_Y() { pub fn use_Y() {
let x: Y = Y { y: 'c' }; let x: Y = Y { y: 'c' };
} }

View File

@ -6,15 +6,15 @@
extern crate a; extern crate a;
#[rustc_dirty(label="typeck", cfg="rpass2")] #[rustc_clean(except="typeck", cfg="rpass2")]
#[rustc_clean(label="typeck", cfg="rpass3")] #[rustc_clean(cfg="rpass3")]
pub fn use_X() -> u32 { pub fn use_X() -> u32 {
let x: a::X = 22; let x: a::X = 22;
x as u32 x as u32
} }
#[rustc_clean(label="typeck", cfg="rpass2")] #[rustc_clean(cfg="rpass2")]
#[rustc_clean(label="typeck", cfg="rpass3")] #[rustc_clean(cfg="rpass3")]
pub fn use_Y() { pub fn use_Y() {
let x: a::Y = 'c'; let x: a::Y = 'c';
} }

View File

@ -4,31 +4,31 @@
#![allow(warnings)] #![allow(warnings)]
#![feature(rustc_attrs)] #![feature(rustc_attrs)]
// Sanity check for the dirty-clean system. We add #[rustc_dirty]/#[rustc_clean] // Sanity check for the dirty-clean system. We add #[rustc_clean]
// attributes in places that are not checked and make sure that this causes an // attributes in places that are not checked and make sure that this causes an
// error. // error.
fn main() { fn main() {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner", cfg="cfail2")]
//[cfail2]~^ ERROR found unchecked `#[rustc_dirty]` / `#[rustc_clean]` attribute //[cfail2]~^ ERROR found unchecked `#[rustc_clean]` attribute
{ {
// empty block // empty block
} }
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
//[cfail2]~^ ERROR found unchecked `#[rustc_dirty]` / `#[rustc_clean]` attribute //[cfail2]~^ ERROR found unchecked `#[rustc_clean]` attribute
{ {
// empty block // empty block
} }
} }
struct _Struct { struct _Struct {
#[rustc_dirty(label="hir_owner", cfg="cfail2")] #[rustc_clean(except="hir_owner", cfg="cfail2")]
//[cfail2]~^ ERROR found unchecked `#[rustc_dirty]` / `#[rustc_clean]` attribute //[cfail2]~^ ERROR found unchecked `#[rustc_clean]` attribute
_field1: i32, _field1: i32,
#[rustc_clean(label="hir_owner", cfg="cfail2")] #[rustc_clean(cfg="cfail2")]
//[cfail2]~^ ERROR found unchecked `#[rustc_dirty]` / `#[rustc_clean]` attribute //[cfail2]~^ ERROR found unchecked `#[rustc_clean]` attribute
_field2: i32, _field2: i32,
} }

View File

@ -5,7 +5,7 @@
#![allow(dead_code)] #![allow(dead_code)]
#![allow(unused_variables)] #![allow(unused_variables)]
#[rustc_dirty(hir_owner)] //~ ERROR attribute requires -Z query-dep-graph #[rustc_clean(hir_owner)] //~ ERROR attribute requires -Z query-dep-graph
fn main() {} fn main() {}
#[rustc_if_this_changed(hir_owner)] //~ ERROR attribute requires -Z query-dep-graph #[rustc_if_this_changed(hir_owner)] //~ ERROR attribute requires -Z query-dep-graph

View File

@ -1,7 +1,7 @@
error: attribute requires -Z query-dep-graph to be enabled error: attribute requires -Z query-dep-graph to be enabled
--> $DIR/dep-graph-check-attr.rs:8:1 --> $DIR/dep-graph-check-attr.rs:8:1
| |
LL | #[rustc_dirty(hir_owner)] LL | #[rustc_clean(hir_owner)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^
error: attribute requires -Z query-dep-graph to be enabled error: attribute requires -Z query-dep-graph to be enabled