Address review comments + Fix rebase

This commit is contained in:
Vadim Petrochenkov 2019-07-06 01:58:52 +03:00
parent b6d522a101
commit 941653b528
5 changed files with 22 additions and 12 deletions

View File

@ -19,7 +19,7 @@ use syntax::ext::base::{MacroKind, SyntaxExtension};
use syntax::ext::expand::{AstFragment, Invocation, InvocationKind}; use syntax::ext::expand::{AstFragment, Invocation, InvocationKind};
use syntax::ext::hygiene::Mark; use syntax::ext::hygiene::Mark;
use syntax::ext::tt::macro_rules; use syntax::ext::tt::macro_rules;
use syntax::feature_gate::{feature_err, is_builtin_attr_name}; use syntax::feature_gate::{feature_err, emit_feature_err, is_builtin_attr_name};
use syntax::feature_gate::{AttributeGate, GateIssue, Stability, BUILTIN_ATTRIBUTES}; use syntax::feature_gate::{AttributeGate, GateIssue, Stability, BUILTIN_ATTRIBUTES};
use syntax::symbol::{Symbol, kw, sym}; use syntax::symbol::{Symbol, kw, sym};
use syntax::visit::Visitor; use syntax::visit::Visitor;

View File

@ -103,9 +103,8 @@
//! //!
//! ```rust //! ```rust
//! # #![feature(rustc_private)] //! # #![feature(rustc_private)]
//! # #![allow(deprecated)] //! extern crate serialize as rustc_serialize;
//! extern crate serialize; //! use rustc_serialize::json::{self, ToJson, Json};
//! use serialize::json::{self, ToJson, Json};
//! //!
//! // A custom data structure //! // A custom data structure
//! struct ComplexNum { //! struct ComplexNum {
@ -121,7 +120,7 @@
//! } //! }
//! //!
//! // Only generate `RustcEncodable` trait implementation //! // Only generate `RustcEncodable` trait implementation
//! #[derive(Encodable)] //! #[derive(RustcEncodable)]
//! pub struct ComplexNumRecord { //! pub struct ComplexNumRecord {
//! uid: u8, //! uid: u8,
//! dsc: String, //! dsc: String,
@ -144,13 +143,12 @@
//! //!
//! ```rust //! ```rust
//! # #![feature(rustc_private)] //! # #![feature(rustc_private)]
//! # #![allow(deprecated)] //! extern crate serialize as rustc_serialize;
//! extern crate serialize;
//! use std::collections::BTreeMap; //! use std::collections::BTreeMap;
//! use serialize::json::{self, Json, ToJson}; //! use rustc_serialize::json::{self, Json, ToJson};
//! //!
//! // Only generate `Decodable` trait implementation //! // Only generate `RustcDecodable` trait implementation
//! #[derive(Decodable)] //! #[derive(RustcDecodable)]
//! pub struct TestStruct { //! pub struct TestStruct {
//! data_int: u8, //! data_int: u8,
//! data_str: String, //! data_str: String,

View File

@ -1,3 +1,6 @@
#![test_runner(main)] //~ ERROR custom test frameworks are an unstable feature #![test_runner(main)] //~ ERROR custom test frameworks are an unstable feature
#[test_case] //~ ERROR custom test frameworks are an unstable feature
fn f() {}
fn main() {} fn main() {}

View File

@ -1,3 +1,12 @@
error[E0658]: use of unstable library feature 'custom_test_frameworks': custom test frameworks are an unstable feature
--> $DIR/feature-gate-custom_test_frameworks.rs:3:1
|
LL | #[test_case]
| ^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/50297
= help: add #![feature(custom_test_frameworks)] to the crate attributes to enable
error[E0658]: custom test frameworks are an unstable feature error[E0658]: custom test frameworks are an unstable feature
--> $DIR/feature-gate-custom_test_frameworks.rs:1:1 --> $DIR/feature-gate-custom_test_frameworks.rs:1:1
| |
@ -7,6 +16,6 @@ LL | #![test_runner(main)]
= note: for more information, see https://github.com/rust-lang/rust/issues/50297 = note: for more information, see https://github.com/rust-lang/rust/issues/50297
= help: add #![feature(custom_test_frameworks)] to the crate attributes to enable = help: add #![feature(custom_test_frameworks)] to the crate attributes to enable
error: aborting due to previous error error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0658`. For more information about this error, try `rustc --explain E0658`.

View File

@ -1,4 +1,4 @@
// compile-pass // check-pass
// aux-build:deprecated-macros.rs // aux-build:deprecated-macros.rs
#[macro_use] extern crate deprecated_macros; #[macro_use] extern crate deprecated_macros;