Skip to content

Commit 1375be8

Browse files
authored
Rollup merge of #46690 - mystor:pub_line_column, r=jseyfried
Expose the line and column fields from the proc_macro::LineColumn struct Right now the `LineColumn` struct is pretty useless because the fields are private. This patch just marks the fields as public, which seems like the easiest solution.
2 parents 6e95629 + 0ccf1af commit 1375be8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/libproc_macro/lib.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,12 @@ impl Span {
265265
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
266266
pub struct LineColumn {
267267
/// The 1-indexed line in the source file on which the span starts or ends (inclusive).
268-
line: usize,
268+
#[unstable(feature = "proc_macro", issue = "38356")]
269+
pub line: usize,
269270
/// The 0-indexed column (in UTF-8 characters) in the source file on which
270271
/// the span starts or ends (inclusive).
271-
column: usize
272+
#[unstable(feature = "proc_macro", issue = "38356")]
273+
pub column: usize
272274
}
273275

274276
/// The source file of a given `Span`.

0 commit comments

Comments
 (0)