Skip to content

Commit 57db500

Browse files
authored
Rollup merge of rust-lang#54728 - alexcrichton:renumber-issues, r=nikomatsakis
Renumber `proc_macro` tracking issues Lots of issue links in the compiler still point to rust-lang#38356 which is a bit of a monster issue that isn't serving much purpose any more. I've split the issue into a number of more fine-grained tracking issues to track stabilizations.
2 parents abb8140 + 6152144 commit 57db500

File tree

6 files changed

+38
-38
lines changed

6 files changed

+38
-38
lines changed

src/libproc_macro/lib.rs

+28-28
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ impl fmt::Debug for TokenStream {
142142
}
143143
}
144144

145-
#[unstable(feature = "proc_macro_quote", issue = "38356")]
145+
#[unstable(feature = "proc_macro_quote", issue = "54722")]
146146
pub use quote::{quote, quote_span};
147147

148148
/// Creates a token stream containing a single token tree.
@@ -252,7 +252,7 @@ pub mod token_stream {
252252
/// To quote `$` itself, use `$$`.
253253
///
254254
/// This is a dummy macro, the actual implementation is in `quote::quote`.`
255-
#[unstable(feature = "proc_macro_quote", issue = "38356")]
255+
#[unstable(feature = "proc_macro_quote", issue = "54722")]
256256
#[macro_export]
257257
macro_rules! quote { () => {} }
258258

@@ -283,7 +283,7 @@ macro_rules! diagnostic_method {
283283

284284
impl Span {
285285
/// A span that resolves at the macro definition site.
286-
#[unstable(feature = "proc_macro_span", issue = "38356")]
286+
#[unstable(feature = "proc_macro_def_site", issue = "54724")]
287287
pub fn def_site() -> Span {
288288
::__internal::with_sess(|_, data| data.def_site)
289289
}
@@ -298,7 +298,7 @@ impl Span {
298298
}
299299

300300
/// The original source file into which this span points.
301-
#[unstable(feature = "proc_macro_span", issue = "38356")]
301+
#[unstable(feature = "proc_macro_span", issue = "54725")]
302302
pub fn source_file(&self) -> SourceFile {
303303
SourceFile {
304304
source_file: __internal::lookup_char_pos(self.0.lo()).file,
@@ -307,21 +307,21 @@ impl Span {
307307

308308
/// The `Span` for the tokens in the previous macro expansion from which
309309
/// `self` was generated from, if any.
310-
#[unstable(feature = "proc_macro_span", issue = "38356")]
310+
#[unstable(feature = "proc_macro_span", issue = "54725")]
311311
pub fn parent(&self) -> Option<Span> {
312312
self.0.parent().map(Span)
313313
}
314314

315315
/// The span for the origin source code that `self` was generated from. If
316316
/// this `Span` wasn't generated from other macro expansions then the return
317317
/// value is the same as `*self`.
318-
#[unstable(feature = "proc_macro_span", issue = "38356")]
318+
#[unstable(feature = "proc_macro_span", issue = "54725")]
319319
pub fn source(&self) -> Span {
320320
Span(self.0.source_callsite())
321321
}
322322

323323
/// Get the starting line/column in the source file for this span.
324-
#[unstable(feature = "proc_macro_span", issue = "38356")]
324+
#[unstable(feature = "proc_macro_span", issue = "54725")]
325325
pub fn start(&self) -> LineColumn {
326326
let loc = __internal::lookup_char_pos(self.0.lo());
327327
LineColumn {
@@ -331,7 +331,7 @@ impl Span {
331331
}
332332

333333
/// Get the ending line/column in the source file for this span.
334-
#[unstable(feature = "proc_macro_span", issue = "38356")]
334+
#[unstable(feature = "proc_macro_span", issue = "54725")]
335335
pub fn end(&self) -> LineColumn {
336336
let loc = __internal::lookup_char_pos(self.0.hi());
337337
LineColumn {
@@ -343,7 +343,7 @@ impl Span {
343343
/// Create a new span encompassing `self` and `other`.
344344
///
345345
/// Returns `None` if `self` and `other` are from different files.
346-
#[unstable(feature = "proc_macro_span", issue = "38356")]
346+
#[unstable(feature = "proc_macro_span", issue = "54725")]
347347
pub fn join(&self, other: Span) -> Option<Span> {
348348
let self_loc = __internal::lookup_char_pos(self.0.lo());
349349
let other_loc = __internal::lookup_char_pos(other.0.lo());
@@ -355,20 +355,20 @@ impl Span {
355355

356356
/// Creates a new span with the same line/column information as `self` but
357357
/// that resolves symbols as though it were at `other`.
358-
#[unstable(feature = "proc_macro_span", issue = "38356")]
358+
#[unstable(feature = "proc_macro_span", issue = "54725")]
359359
pub fn resolved_at(&self, other: Span) -> Span {
360360
Span(self.0.with_ctxt(other.0.ctxt()))
361361
}
362362

363363
/// Creates a new span with the same name resolution behavior as `self` but
364364
/// with the line/column information of `other`.
365-
#[unstable(feature = "proc_macro_span", issue = "38356")]
365+
#[unstable(feature = "proc_macro_span", issue = "54725")]
366366
pub fn located_at(&self, other: Span) -> Span {
367367
other.resolved_at(*self)
368368
}
369369

370370
/// Compares to spans to see if they're equal.
371-
#[unstable(feature = "proc_macro_span", issue = "38356")]
371+
#[unstable(feature = "proc_macro_span", issue = "54725")]
372372
pub fn eq(&self, other: &Span) -> bool {
373373
self.0 == other.0
374374
}
@@ -391,33 +391,33 @@ impl fmt::Debug for Span {
391391
}
392392

393393
/// A line-column pair representing the start or end of a `Span`.
394-
#[unstable(feature = "proc_macro_span", issue = "38356")]
394+
#[unstable(feature = "proc_macro_span", issue = "54725")]
395395
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
396396
pub struct LineColumn {
397397
/// The 1-indexed line in the source file on which the span starts or ends (inclusive).
398-
#[unstable(feature = "proc_macro_span", issue = "38356")]
398+
#[unstable(feature = "proc_macro_span", issue = "54725")]
399399
pub line: usize,
400400
/// The 0-indexed column (in UTF-8 characters) in the source file on which
401401
/// the span starts or ends (inclusive).
402-
#[unstable(feature = "proc_macro_span", issue = "38356")]
402+
#[unstable(feature = "proc_macro_span", issue = "54725")]
403403
pub column: usize
404404
}
405405

406-
#[unstable(feature = "proc_macro_span", issue = "38356")]
406+
#[unstable(feature = "proc_macro_span", issue = "54725")]
407407
impl !Send for LineColumn {}
408-
#[unstable(feature = "proc_macro_span", issue = "38356")]
408+
#[unstable(feature = "proc_macro_span", issue = "54725")]
409409
impl !Sync for LineColumn {}
410410

411411
/// The source file of a given `Span`.
412-
#[unstable(feature = "proc_macro_span", issue = "38356")]
412+
#[unstable(feature = "proc_macro_span", issue = "54725")]
413413
#[derive(Clone)]
414414
pub struct SourceFile {
415415
source_file: Lrc<syntax_pos::SourceFile>,
416416
}
417417

418-
#[unstable(feature = "proc_macro_span", issue = "38356")]
418+
#[unstable(feature = "proc_macro_span", issue = "54725")]
419419
impl !Send for SourceFile {}
420-
#[unstable(feature = "proc_macro_span", issue = "38356")]
420+
#[unstable(feature = "proc_macro_span", issue = "54725")]
421421
impl !Sync for SourceFile {}
422422

423423
impl SourceFile {
@@ -431,7 +431,7 @@ impl SourceFile {
431431
/// the command line, the path as given may not actually be valid.
432432
///
433433
/// [`is_real`]: #method.is_real
434-
#[unstable(feature = "proc_macro_span", issue = "38356")]
434+
#[unstable(feature = "proc_macro_span", issue = "54725")]
435435
pub fn path(&self) -> PathBuf {
436436
match self.source_file.name {
437437
FileName::Real(ref path) => path.clone(),
@@ -441,7 +441,7 @@ impl SourceFile {
441441

442442
/// Returns `true` if this source file is a real source file, and not generated by an external
443443
/// macro's expansion.
444-
#[unstable(feature = "proc_macro_span", issue = "38356")]
444+
#[unstable(feature = "proc_macro_span", issue = "54725")]
445445
pub fn is_real(&self) -> bool {
446446
// This is a hack until intercrate spans are implemented and we can have real source files
447447
// for spans generated in external macros.
@@ -451,7 +451,7 @@ impl SourceFile {
451451
}
452452

453453

454-
#[unstable(feature = "proc_macro_span", issue = "38356")]
454+
#[unstable(feature = "proc_macro_span", issue = "54725")]
455455
impl fmt::Debug for SourceFile {
456456
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
457457
f.debug_struct("SourceFile")
@@ -461,14 +461,14 @@ impl fmt::Debug for SourceFile {
461461
}
462462
}
463463

464-
#[unstable(feature = "proc_macro_span", issue = "38356")]
464+
#[unstable(feature = "proc_macro_span", issue = "54725")]
465465
impl PartialEq for SourceFile {
466466
fn eq(&self, other: &Self) -> bool {
467467
Lrc::ptr_eq(&self.source_file, &other.source_file)
468468
}
469469
}
470470

471-
#[unstable(feature = "proc_macro_span", issue = "38356")]
471+
#[unstable(feature = "proc_macro_span", issue = "54725")]
472472
impl Eq for SourceFile {}
473473

474474
/// A single token or a delimited sequence of token trees (e.g. `[1, (), ..]`).
@@ -679,7 +679,7 @@ impl Group {
679679
/// pub fn span_open(&self) -> Span {
680680
/// ^
681681
/// ```
682-
#[unstable(feature = "proc_macro_span", issue = "38356")]
682+
#[unstable(feature = "proc_macro_span", issue = "54725")]
683683
pub fn span_open(&self) -> Span {
684684
Span(self.span.open)
685685
}
@@ -690,7 +690,7 @@ impl Group {
690690
/// pub fn span_close(&self) -> Span {
691691
/// ^
692692
/// ```
693-
#[unstable(feature = "proc_macro_span", issue = "38356")]
693+
#[unstable(feature = "proc_macro_span", issue = "54725")]
694694
pub fn span_close(&self) -> Span {
695695
Span(self.span.close)
696696
}
@@ -881,7 +881,7 @@ impl Ident {
881881
}
882882

883883
/// Same as `Ident::new`, but creates a raw identifier (`r#ident`).
884-
#[unstable(feature = "proc_macro_raw_ident", issue = "38356")]
884+
#[unstable(feature = "proc_macro_raw_ident", issue = "54723")]
885885
pub fn new_raw(string: &str, span: Span) -> Ident {
886886
if !Ident::is_valid(string) {
887887
panic!("`{:?}` is not a valid identifier", string)

src/libproc_macro/quote.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ macro_rules! quote {
7070
/// This is the actual `quote!()` proc macro.
7171
///
7272
/// It is manually loaded in `CStore::load_macro_untracked`.
73-
#[unstable(feature = "proc_macro_quote", issue = "38356")]
73+
#[unstable(feature = "proc_macro_quote", issue = "54722")]
7474
pub fn quote(stream: TokenStream) -> TokenStream {
7575
if stream.is_empty() {
7676
return quote!(::TokenStream::new());
@@ -144,7 +144,7 @@ pub fn quote(stream: TokenStream) -> TokenStream {
144144

145145
/// Quote a `Span` into a `TokenStream`.
146146
/// This is needed to implement a custom quoter.
147-
#[unstable(feature = "proc_macro_quote", issue = "38356")]
147+
#[unstable(feature = "proc_macro_quote", issue = "54722")]
148148
pub fn quote_span(_: Span) -> TokenStream {
149149
quote!(::Span::def_site())
150150
}

src/libsyntax/feature_gate.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -441,10 +441,10 @@ declare_features! (
441441

442442
// Allows macro invocations on modules expressions and statements and
443443
// procedural macros to expand to non-items.
444-
(active, proc_macro_mod, "1.27.0", Some(38356), None),
445-
(active, proc_macro_expr, "1.27.0", Some(38356), None),
446-
(active, proc_macro_non_items, "1.27.0", Some(38356), None),
447-
(active, proc_macro_gen, "1.27.0", Some(38356), None),
444+
(active, proc_macro_mod, "1.27.0", Some(54727), None),
445+
(active, proc_macro_expr, "1.27.0", Some(54727), None),
446+
(active, proc_macro_non_items, "1.27.0", Some(54727), None),
447+
(active, proc_macro_gen, "1.27.0", Some(54727), None),
448448

449449
// #[doc(alias = "...")]
450450
(active, doc_alias, "1.27.0", Some(50146), None),
@@ -502,7 +502,7 @@ declare_features! (
502502
(active, custom_test_frameworks, "1.30.0", Some(50297), None),
503503

504504
// Non-builtin attributes in inner attribute position
505-
(active, custom_inner_attributes, "1.30.0", Some(38356), None),
505+
(active, custom_inner_attributes, "1.30.0", Some(54726), None),
506506

507507
// Self struct constructor (RFC 2302)
508508
(active, self_struct_ctor, "1.30.0", Some(51994), None),

src/test/ui-fulldeps/proc-macro/auxiliary/multispan.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// no-prefer-dynamic
1212

1313
#![crate_type = "proc-macro"]
14-
#![feature(proc_macro_diagnostic, proc_macro_span)]
14+
#![feature(proc_macro_diagnostic, proc_macro_span, proc_macro_def_site)]
1515

1616
extern crate proc_macro;
1717

src/test/ui-fulldeps/proc-macro/auxiliary/three-equals.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// no-prefer-dynamic
1212

1313
#![crate_type = "proc-macro"]
14-
#![feature(proc_macro_diagnostic, proc_macro_span)]
14+
#![feature(proc_macro_diagnostic, proc_macro_span, proc_macro_def_site)]
1515

1616
extern crate proc_macro;
1717

src/test/ui/span/issue-36530.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | #[foo] //~ ERROR is currently unknown to the compiler
66
|
77
= help: add #![feature(custom_attribute)] to the crate attributes to enable
88

9-
error[E0658]: non-builtin inner attributes are unstable (see issue #38356)
9+
error[E0658]: non-builtin inner attributes are unstable (see issue #54726)
1010
--> $DIR/issue-36530.rs:15:5
1111
|
1212
LL | #![foo] //~ ERROR is currently unknown to the compiler

0 commit comments

Comments
 (0)