Skip to content

Commit 941653b

Browse files
committed
Address review comments + Fix rebase
1 parent b6d522a commit 941653b

File tree

5 files changed

+22
-12
lines changed

5 files changed

+22
-12
lines changed

src/librustc_resolve/macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use syntax::ext::base::{MacroKind, SyntaxExtension};
1919
use syntax::ext::expand::{AstFragment, Invocation, InvocationKind};
2020
use syntax::ext::hygiene::Mark;
2121
use syntax::ext::tt::macro_rules;
22-
use syntax::feature_gate::{feature_err, is_builtin_attr_name};
22+
use syntax::feature_gate::{feature_err, emit_feature_err, is_builtin_attr_name};
2323
use syntax::feature_gate::{AttributeGate, GateIssue, Stability, BUILTIN_ATTRIBUTES};
2424
use syntax::symbol::{Symbol, kw, sym};
2525
use syntax::visit::Visitor;

src/libserialize/json.rs

+7-9
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,8 @@
103103
//!
104104
//! ```rust
105105
//! # #![feature(rustc_private)]
106-
//! # #![allow(deprecated)]
107-
//! extern crate serialize;
108-
//! use serialize::json::{self, ToJson, Json};
106+
//! extern crate serialize as rustc_serialize;
107+
//! use rustc_serialize::json::{self, ToJson, Json};
109108
//!
110109
//! // A custom data structure
111110
//! struct ComplexNum {
@@ -121,7 +120,7 @@
121120
//! }
122121
//!
123122
//! // Only generate `RustcEncodable` trait implementation
124-
//! #[derive(Encodable)]
123+
//! #[derive(RustcEncodable)]
125124
//! pub struct ComplexNumRecord {
126125
//! uid: u8,
127126
//! dsc: String,
@@ -144,13 +143,12 @@
144143
//!
145144
//! ```rust
146145
//! # #![feature(rustc_private)]
147-
//! # #![allow(deprecated)]
148-
//! extern crate serialize;
146+
//! extern crate serialize as rustc_serialize;
149147
//! use std::collections::BTreeMap;
150-
//! use serialize::json::{self, Json, ToJson};
148+
//! use rustc_serialize::json::{self, Json, ToJson};
151149
//!
152-
//! // Only generate `Decodable` trait implementation
153-
//! #[derive(Decodable)]
150+
//! // Only generate `RustcDecodable` trait implementation
151+
//! #[derive(RustcDecodable)]
154152
//! pub struct TestStruct {
155153
//! data_int: u8,
156154
//! data_str: String,
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
#![test_runner(main)] //~ ERROR custom test frameworks are an unstable feature
22

3+
#[test_case] //~ ERROR custom test frameworks are an unstable feature
4+
fn f() {}
5+
36
fn main() {}

src/test/ui/feature-gates/feature-gate-custom_test_frameworks.stderr

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
error[E0658]: use of unstable library feature 'custom_test_frameworks': custom test frameworks are an unstable feature
2+
--> $DIR/feature-gate-custom_test_frameworks.rs:3:1
3+
|
4+
LL | #[test_case]
5+
| ^^^^^^^^^^^^
6+
|
7+
= note: for more information, see https://github.com/rust-lang/rust/issues/50297
8+
= help: add #![feature(custom_test_frameworks)] to the crate attributes to enable
9+
110
error[E0658]: custom test frameworks are an unstable feature
211
--> $DIR/feature-gate-custom_test_frameworks.rs:1:1
312
|
@@ -7,6 +16,6 @@ LL | #![test_runner(main)]
716
= note: for more information, see https://github.com/rust-lang/rust/issues/50297
817
= help: add #![feature(custom_test_frameworks)] to the crate attributes to enable
918

10-
error: aborting due to previous error
19+
error: aborting due to 2 previous errors
1120

1221
For more information about this error, try `rustc --explain E0658`.

src/test/ui/macros/macro-deprecation.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-pass
1+
// check-pass
22
// aux-build:deprecated-macros.rs
33

44
#[macro_use] extern crate deprecated_macros;

0 commit comments

Comments
 (0)