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

Commit 7337ec9

Browse files
committed
ioreg::setter: Associate correct span with Setter type
1 parent 7c7af50 commit 7337ec9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ioreg/builder/setter.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;
@@ -81,7 +82,9 @@ fn build_type<'a>(cx: &'a ExtCtxt, path: &Vec<String>,
8182
reg: &'a $reg_ty,
8283
}
8384
);
84-
item.unwrap()
85+
let mut item: ast::Item = item.unwrap().deref().clone();
86+
item.span = reg.name.span;
87+
box(GC) item
8588
}
8689

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

0 commit comments

Comments
 (0)