Expand description
Dumps the item bounds of the annotated item.
This ends up calling the item_bounds query and prints the ty::Clause of the item.
See AttributeKind::RustcDumpItemBounds for the internal representation of this attribute.
§Example
ⓘ
//@ dont-require-annotations: ERROR
//@ compile-flags: --crate-type lib -Z ui-testing=no
#![feature(rustc_attrs)]
trait Trait<T> {
#[rustc_dump_item_bounds]
type Assoc: PartialEq<String>;
}produces:
error: rustc_dump_item_bounds
--> $DIR/rustc_dump_item_bounds.rs:8:5
|
8 | type Assoc: PartialEq<String>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: Binder { value: TraitClause(<<Self as Trait<T>>::Assoc as std::cmp::PartialEq<std::string::String>>, polarity:Positive), bound_vars: [] }
= note: Binder { value: TraitClause(<<Self as Trait<T>>::Assoc as std::marker::Sized>, polarity:Positive), bound_vars: [] }
error: aborting due to 1 previous error