Skip to content
This repository was archived by the owner on Jul 6, 2019. It is now read-only.

Commit 7c7af50

Browse files
committed
ioreg::getter: Associate correct span with Getter type
1 parent e58f0fc commit 7c7af50

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ioreg/builder/getter.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// See the License for the specific language governing permissions and
1414
// limitations under the License.
1515

16+
use std::gc::GC;
1617
use syntax::ast;
1718
use syntax::ast::P;
1819
use syntax::ext::base::ExtCtxt;
@@ -72,7 +73,9 @@ fn build_type<'a>(cx: &'a ExtCtxt, path: &Vec<String>,
7273
value: $packed_ty,
7374
}
7475
);
75-
item.unwrap()
76+
let mut item: ast::Item = item.unwrap().deref().clone();
77+
item.span = reg.name.span;
78+
box(GC) item
7679
}
7780

7881
fn build_new<'a>(cx: &'a ExtCtxt, path: &Vec<String>)

0 commit comments

Comments
 (0)