Skip to content

Commit 73704bc

Browse files
committed
---
yaml --- r: 231837 b: refs/heads/auto c: 5fbdf3c h: refs/heads/master i: 231835: 865e0a8 v: v3
1 parent 5350a34 commit 73704bc

File tree

15 files changed

+132
-147
lines changed

15 files changed

+132
-147
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: d2a5b117c1933d16072e78bb9b58604984597fca
11+
refs/heads/auto: 5fbdf3ccd0407533d7da95c2bd3c33944c71f1b0
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/src/etc/featureck.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,24 +47,20 @@
4747
is_feature_line = True
4848

4949
if is_feature_line:
50-
# turn ` ("foo", "1.0.0", Some(10), Active)` into
51-
# `"foo", "1.0.0", Some(10), Active`
52-
line = line.strip(' ,()')
50+
line = line.replace("(", "").replace("),", "").replace(")", "")
5351
parts = line.split(",")
54-
if len(parts) != 4:
52+
if len(parts) != 3:
5553
print("error: unexpected number of components in line: " + original_line)
5654
sys.exit(1)
5755
feature_name = parts[0].strip().replace('"', "")
5856
since = parts[1].strip().replace('"', "")
59-
issue = parts[2].strip()
60-
status = parts[3].strip()
57+
status = parts[2].strip()
6158
assert len(feature_name) > 0
6259
assert len(since) > 0
63-
assert len(issue) > 0
6460
assert len(status) > 0
6561

6662
language_feature_names += [feature_name]
67-
language_features += [(feature_name, since, issue, status)]
63+
language_features += [(feature_name, since, status)]
6864

6965
assert len(language_features) > 0
7066

@@ -162,7 +158,7 @@
162158
status = "unstable"
163159
stable_since = None
164160

165-
if f[3] == "Accepted":
161+
if f[2] == "Accepted":
166162
status = "stable"
167163
if status == "stable":
168164
stable_since = f[1]

branches/auto/src/librustc/middle/check_static_recursion.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use util::nodemap::NodeMap;
1818

1919
use syntax::{ast};
2020
use syntax::codemap::Span;
21-
use syntax::feature_gate::{GateIssue, emit_feature_err};
21+
use syntax::feature_gate::emit_feature_err;
2222
use rustc_front::visit::Visitor;
2323
use rustc_front::visit;
2424
use rustc_front::hir;
@@ -143,7 +143,7 @@ impl<'a, 'ast: 'a> CheckItemRecursionVisitor<'a, 'ast> {
143143
if !self.sess.features.borrow().static_recursion {
144144
emit_feature_err(&self.sess.parse_sess.span_diagnostic,
145145
"static_recursion",
146-
*self.root_span, GateIssue::Language, "recursive static");
146+
*self.root_span, "recursive static");
147147
}
148148
} else {
149149
span_err!(self.sess, *self.root_span, E0265, "recursive constant");

branches/auto/src/librustc/middle/stability.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use syntax::parse::token::InternedString;
2222
use syntax::codemap::{Span, DUMMY_SP};
2323
use syntax::ast;
2424
use syntax::ast::NodeId;
25-
use syntax::feature_gate::{GateIssue, emit_feature_err};
25+
use syntax::feature_gate::emit_feature_err;
2626
use util::nodemap::{DefIdMap, FnvHashSet, FnvHashMap};
2727

2828
use rustc_front::hir;
@@ -294,14 +294,18 @@ impl<'a, 'tcx> Checker<'a, 'tcx> {
294294
self.used_features.insert(feature.clone(), attr::Unstable);
295295

296296
if !self.active_features.contains(feature) {
297-
let msg = match *reason {
297+
let mut msg = match *reason {
298298
Some(ref r) => format!("use of unstable library feature '{}': {}",
299299
&feature, &r),
300300
None => format!("use of unstable library feature '{}'", &feature)
301301
};
302+
if let Some(n) = issue {
303+
use std::fmt::Write;
304+
write!(&mut msg, " (see issue #{})", n).unwrap();
305+
}
302306

303307
emit_feature_err(&self.tcx.sess.parse_sess.span_diagnostic,
304-
&feature, span, GateIssue::Library(issue), &msg);
308+
&feature, span, &msg);
305309
}
306310
}
307311
Some(&Stability { level, ref feature, .. }) => {

branches/auto/src/librustc_typeck/astconv.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ use util::nodemap::FnvHashSet;
7070
use std::slice;
7171
use syntax::{abi, ast};
7272
use syntax::codemap::{Span, Pos};
73-
use syntax::feature_gate::{GateIssue, emit_feature_err};
73+
use syntax::feature_gate::emit_feature_err;
7474
use syntax::parse::token;
7575

7676
use rustc_front::print::pprust;
@@ -797,7 +797,7 @@ fn create_substs_for_ast_trait_ref<'a,'tcx>(this: &AstConv<'tcx>,
797797
// only with `Fn()` etc.
798798
if !this.tcx().sess.features.borrow().unboxed_closures && trait_def.paren_sugar {
799799
emit_feature_err(&this.tcx().sess.parse_sess.span_diagnostic,
800-
"unboxed_closures", span, GateIssue::Language,
800+
"unboxed_closures", span,
801801
"\
802802
the precise format of `Fn`-family traits' type parameters is \
803803
subject to change. Use parenthetical notation (Fn(Foo, Bar) -> Baz) instead");
@@ -810,7 +810,7 @@ fn create_substs_for_ast_trait_ref<'a,'tcx>(this: &AstConv<'tcx>,
810810
// only with `Fn()` etc.
811811
if !this.tcx().sess.features.borrow().unboxed_closures && !trait_def.paren_sugar {
812812
emit_feature_err(&this.tcx().sess.parse_sess.span_diagnostic,
813-
"unboxed_closures", span, GateIssue::Language,
813+
"unboxed_closures", span,
814814
"\
815815
parenthetical notation is only stable when used with `Fn`-family traits");
816816
}

branches/auto/src/libsyntax/ext/asm.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ pub fn expand_asm<'cx>(cx: &'cx mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
5151
-> Box<base::MacResult+'cx> {
5252
if !cx.ecfg.enable_asm() {
5353
feature_gate::emit_feature_err(
54-
&cx.parse_sess.span_diagnostic, "asm", sp,
55-
feature_gate::GateIssue::Language,
56-
feature_gate::EXPLAIN_ASM);
54+
&cx.parse_sess.span_diagnostic, "asm", sp, feature_gate::EXPLAIN_ASM);
5755
return DummyResult::expr(sp);
5856
}
5957

branches/auto/src/libsyntax/ext/concat_idents.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ pub fn expand_syntax_ext<'cx>(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree]
2323
feature_gate::emit_feature_err(&cx.parse_sess.span_diagnostic,
2424
"concat_idents",
2525
sp,
26-
feature_gate::GateIssue::Language,
2726
feature_gate::EXPLAIN_CONCAT_IDENTS);
2827
return base::DummyResult::expr(sp);
2928
}

branches/auto/src/libsyntax/ext/deriving/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ fn expand_derive(cx: &mut ExtCtxt,
105105
feature_gate::emit_feature_err(&cx.parse_sess.span_diagnostic,
106106
"custom_derive",
107107
titem.span,
108-
feature_gate::GateIssue::Language,
109108
feature_gate::EXPLAIN_CUSTOM_DERIVE);
110109
continue;
111110
}

branches/auto/src/libsyntax/ext/expand.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,6 @@ pub fn expand_item_mac(it: P<ast::Item>,
778778
&fld.cx.parse_sess.span_diagnostic,
779779
"allow_internal_unstable",
780780
it.span,
781-
feature_gate::GateIssue::Language,
782781
feature_gate::EXPLAIN_ALLOW_INTERNAL_UNSTABLE)
783782
}
784783

@@ -1470,8 +1469,7 @@ pub fn expand_type(t: P<ast::Ty>, fld: &mut MacroExpander) -> P<ast::Ty> {
14701469
&fld.cx.parse_sess.span_diagnostic,
14711470
"type_macros",
14721471
t.span,
1473-
feature_gate::GateIssue::Language,
1474-
"type macros are experimental");
1472+
"type macros are experimental (see issue: #27336)");
14751473

14761474
DummyResult::raw_ty(t.span)
14771475
}

branches/auto/src/libsyntax/ext/log_syntax.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ pub fn expand_syntax_ext<'cx>(cx: &'cx mut base::ExtCtxt,
2222
feature_gate::emit_feature_err(&cx.parse_sess.span_diagnostic,
2323
"log_syntax",
2424
sp,
25-
feature_gate::GateIssue::Language,
2625
feature_gate::EXPLAIN_LOG_SYNTAX);
2726
return base::DummyResult::any(sp);
2827
}

branches/auto/src/libsyntax/ext/trace_macros.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ pub fn expand_trace_macros(cx: &mut ExtCtxt,
2424
feature_gate::emit_feature_err(&cx.parse_sess.span_diagnostic,
2525
"trace_macros",
2626
sp,
27-
feature_gate::GateIssue::Language,
2827
feature_gate::EXPLAIN_TRACE_MACROS);
2928
return base::DummyResult::any(sp);
3029
}

0 commit comments

Comments
 (0)