self.resolver.definitions().create_def_with_parent(
parent_id.index,
def_node_id,
- DefPathData::LifetimeDef(str_name),
+ DefPathData::LifetimeDef(str_name.as_interned_str()),
DefIndexAddressSpace::High,
Mark::root(),
span,
self.context.resolver.definitions().create_def_with_parent(
self.parent,
def_node_id,
- DefPathData::LifetimeDef(name.name().as_str()),
+ DefPathData::LifetimeDef(name.name().as_interned_str()),
DefIndexAddressSpace::High,
Mark::root(),
lifetime.span,
}
fn maybe_lint_bare_trait(&self, span: Span, id: NodeId, is_global: bool) {
- if self.sess.features_untracked().dyn_trait {
- self.sess.buffer_lint_with_diagnostic(
- builtin::BARE_TRAIT_OBJECT,
- id,
- span,
- "trait objects without an explicit `dyn` are deprecated",
- builtin::BuiltinLintDiagnostics::BareTraitObject(span, is_global),
- )
- }
+ self.sess.buffer_lint_with_diagnostic(
+ builtin::BARE_TRAIT_OBJECT,
+ id,
+ span,
+ "trait objects without an explicit `dyn` are deprecated",
+ builtin::BuiltinLintDiagnostics::BareTraitObject(span, is_global),
+ )
}
fn wrap_in_try_constructor(
#![feature(const_fn)]
#![feature(core_intrinsics)]
#![feature(drain_filter)]
- #![feature(dyn_trait)]
#![feature(entry_or_default)]
+ #![cfg_attr(stage0, feature(dyn_trait))]
#![feature(from_ref)]
#![feature(fs_read_write)]
#![cfg_attr(windows, feature(libc))]
#![feature(nonzero)]
#![feature(proc_macro_internals)]
#![feature(quote)]
+#![feature(optin_builtin_traits)]
#![feature(refcell_replace_swap)]
#![feature(rustc_diagnostic_macros)]
#![feature(slice_patterns)]
#[macro_use] extern crate lazy_static;
#[cfg(windows)]
extern crate libc;
-extern crate rustc_back;
+extern crate rustc_target;
#[macro_use] extern crate rustc_data_structures;
extern crate serialize;
extern crate rustc_const_math;
#![feature(const_fn)]
#![feature(core_intrinsics)]
#![feature(decl_macro)]
- #![feature(dyn_trait)]
+ #![cfg_attr(stage0, feature(dyn_trait))]
#![feature(fs_read_write)]
#![feature(macro_vis_matcher)]
#![feature(exhaustive_patterns)]
#[macro_use]
extern crate syntax;
extern crate syntax_pos;
-extern crate rustc_back;
+extern crate rustc_target;
extern crate rustc_const_math;
extern crate core; // for NonZero
extern crate log_settings;
#![allow(non_camel_case_types)]
+ #![cfg_attr(stage0, feature(dyn_trait))]
+
#![feature(box_patterns)]
#![feature(box_syntax)]
#![feature(crate_visibility_modifier)]
#![feature(rustc_diagnostic_macros)]
#![feature(slice_patterns)]
#![feature(slice_sort_by_cached_key)]
- #![feature(dyn_trait)]
#![feature(never_type)]
#[macro_use] extern crate log;
extern crate rustc_const_math;
extern crate rustc_data_structures;
extern crate rustc_errors as errors;
+extern crate rustc_target;
use rustc::hir;
use rustc::lint;
use util::common::time;
use syntax::ast;
-use syntax::abi::Abi;
+use rustc_target::spec::abi::Abi;
use syntax_pos::Span;
use std::iter;
tcx.mk_nil()
};
- let se_ty = tcx.mk_fn_ptr(ty::Binder(
+ let se_ty = tcx.mk_fn_ptr(ty::Binder::bind(
tcx.mk_fn_sig(
iter::empty(),
expected_return_type,
_ => ()
}
- let se_ty = tcx.mk_fn_ptr(ty::Binder(
+ let se_ty = tcx.mk_fn_ptr(ty::Binder::bind(
tcx.mk_fn_sig(
[
tcx.types.isize,
html_root_url = "https://doc.rust-lang.org/nightly/",
html_playground_url = "https://play.rust-lang.org/")]
+ #![cfg_attr(stage0, feature(dyn_trait))]
+
#![feature(ascii_ctype)]
#![feature(rustc_private)]
#![feature(box_patterns)]
#![feature(test)]
#![feature(vec_remove_item)]
#![feature(entry_and_modify)]
- #![feature(dyn_trait)]
extern crate arena;
extern crate getopts;
extern crate rustc_driver;
extern crate rustc_resolve;
extern crate rustc_lint;
-extern crate rustc_back;
extern crate rustc_metadata;
+extern crate rustc_target;
extern crate rustc_typeck;
extern crate serialize;
#[macro_use] extern crate syntax;
use rustc::session::search_paths::SearchPaths;
use rustc::session::config::{ErrorOutputType, RustcOptGroup, Externs, CodegenOptions};
use rustc::session::config::{nightly_options, build_codegen_options};
-use rustc_back::target::TargetTriple;
+use rustc_target::spec::TargetTriple;
#[macro_use]
pub mod externalfiles;
use self::AttributeType::*;
use self::AttributeGate::*;
-use abi::Abi;
+use rustc_target::spec::abi::Abi;
use ast::{self, NodeId, PatKind, RangeEnd};
use attr;
use edition::{ALL_EDITIONS, Edition};
// Future-proofing enums/structs with #[non_exhaustive] attribute (RFC 2008)
(active, non_exhaustive, "1.22.0", Some(44109), None),
- // Trait object syntax with `dyn` prefix
- (active, dyn_trait, "1.22.0", Some(44662), Some(Edition::Edition2018)),
-
// `crate` as visibility modifier, synonymous to `pub(crate)`
(active, crate_visibility_modifier, "1.23.0", Some(45388), Some(Edition::Edition2018)),
(accepted, cfg_target_feature, "1.27.0", Some(29717), None),
// Allows #[target_feature(...)]
(accepted, target_feature, "1.27.0", None, None),
+ // Trait object syntax with `dyn` prefix
+ (accepted, dyn_trait, "1.27.0", Some(44662), None),
);
// If you change this, please modify src/doc/unstable-book as well. You must
"the `#[naked]` attribute \
is an experimental feature",
cfg_fn!(naked_functions))),
- ("target_feature", Normal, Ungated),
+ ("target_feature", Whitelisted, Ungated),
("export_name", Whitelisted, Ungated),
("inline", Whitelisted, Ungated),
("link", Whitelisted, Ungated),
gate_feature_post!(&self, never_type, ty.span,
"The `!` type is experimental");
}
- ast::TyKind::TraitObject(_, ast::TraitObjectSyntax::Dyn) => {
- gate_feature_post!(&self, dyn_trait, ty.span,
- "`dyn Trait` syntax is unstable");
- }
_ => {}
}
visit::walk_ty(self, ty)