Skip to content

Commit c0578b4

Browse files
committed
auto merge of #11632 : brson/rust/issue-11602, r=huonw
2 parents d0f6ef0 + f52bd5e commit c0578b4

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

src/librustc/front/feature_gate.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
4545
("link_args", Active),
4646
("phase", Active),
4747
("macro_registrar", Active),
48+
("log_syntax", Active),
4849

4950
// These are used to test this portion of the compiler, they don't actually
5051
// mean anything
@@ -187,6 +188,11 @@ impl Visitor<()> for Context {
187188
self.gate_feature("asm", path.span, "inline assembly is not \
188189
stable enough for use and is subject to change");
189190
}
191+
192+
else if path.segments.last().identifier == self.sess.ident_of("log_syntax") {
193+
self.gate_feature("log_syntax", path.span, "`log_syntax!` is not \
194+
stable enough for use and is subject to change");
195+
}
190196
}
191197

192198
fn visit_ty(&mut self, t: &ast::Ty, _: ()) {
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
fn main() {
12+
log_syntax!() //~ ERROR `log_syntax!` is not stable enough
13+
}

0 commit comments

Comments
 (0)