Store ForeignItem in a side table.
This commit is contained in:
parent
65ecc481fa
commit
419a9186a4
46 changed files with 270 additions and 55 deletions
|
|
@ -242,6 +242,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
|
|||
match item.kind {
|
||||
hir::ItemKind::ForeignMod(ref fm) => {
|
||||
for item in fm.items {
|
||||
let item = self.cx.tcx.hir().foreign_item(item.id);
|
||||
self.visit_foreign_item(item, None, om);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +1,3 @@
|
|||
error[E0518]: attribute should be applied to function or closure
|
||||
--> $DIR/inline-trait-and-foreign-items.rs:30:5
|
||||
|
|
||||
LL | #[inline]
|
||||
| ^^^^^^^^^
|
||||
LL | static X: u32;
|
||||
| -------------- not a function or closure
|
||||
|
||||
error[E0518]: attribute should be applied to function or closure
|
||||
--> $DIR/inline-trait-and-foreign-items.rs:33:5
|
||||
|
|
||||
LL | #[inline]
|
||||
| ^^^^^^^^^
|
||||
LL | type T;
|
||||
| ------- not a function or closure
|
||||
|
||||
warning: `#[inline]` is ignored on constants
|
||||
--> $DIR/inline-trait-and-foreign-items.rs:7:5
|
||||
|
|
||||
|
|
@ -61,6 +45,22 @@ LL | #[inline]
|
|||
LL | type U = impl Trait;
|
||||
| -------------------- not a function or closure
|
||||
|
||||
error[E0518]: attribute should be applied to function or closure
|
||||
--> $DIR/inline-trait-and-foreign-items.rs:30:5
|
||||
|
|
||||
LL | #[inline]
|
||||
| ^^^^^^^^^
|
||||
LL | static X: u32;
|
||||
| -------------- not a function or closure
|
||||
|
||||
error[E0518]: attribute should be applied to function or closure
|
||||
--> $DIR/inline-trait-and-foreign-items.rs:33:5
|
||||
|
|
||||
LL | #[inline]
|
||||
| ^^^^^^^^^
|
||||
LL | type T;
|
||||
| ------- not a function or closure
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/inline-trait-and-foreign-items.rs:26:14
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error: `#[inline]` is ignored on function prototypes
|
||||
--> $DIR/warn-unused-inline-on-fn-prototypes.rs:9:5
|
||||
--> $DIR/warn-unused-inline-on-fn-prototypes.rs:4:5
|
||||
|
|
||||
LL | #[inline]
|
||||
| ^^^^^^^^^
|
||||
|
|
@ -11,7 +11,7 @@ LL | #![deny(unused_attributes)]
|
|||
| ^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: `#[inline]` is ignored on function prototypes
|
||||
--> $DIR/warn-unused-inline-on-fn-prototypes.rs:4:5
|
||||
--> $DIR/warn-unused-inline-on-fn-prototypes.rs:9:5
|
||||
|
|
||||
LL | #[inline]
|
||||
| ^^^^^^^^^
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue