Skip to content

rustc: Remove some long deprecated features: #23506

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/librustc_trans/trans/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -428,11 +428,6 @@ pub fn set_llvm_fn_attrs(ccx: &CrateContext, attrs: &[ast::Attribute], llfn: Val
let mut used = true;
match &attr.name()[..] {
"no_stack_check" => unset_split_stack(llfn),
"no_split_stack" => {
unset_split_stack(llfn);
ccx.sess().span_warn(attr.span,
"no_split_stack is a deprecated synonym for no_stack_check");
}
"cold" => unsafe {
llvm::LLVMAddFunctionAttribute(llfn,
llvm::FunctionIndex as c_uint,
Expand Down
10 changes: 0 additions & 10 deletions src/libsyntax/ext/deriving/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,6 @@ pub mod totalord;

pub mod generic;

fn expand_deprecated_deriving(cx: &mut ExtCtxt,
span: Span,
_: &MetaItem,
_: &Item,
_: &mut FnMut(P<Item>)) {
cx.span_err(span, "`deriving` has been renamed to `derive`");
}

fn expand_derive(cx: &mut ExtCtxt,
_: Span,
mitem: &MetaItem,
Expand Down Expand Up @@ -151,8 +143,6 @@ macro_rules! derive_traits {

env.insert(intern("derive"),
Modifier(Box::new(expand_derive)));
env.insert(intern("deriving"),
Decorator(Box::new(expand_deprecated_deriving)));
}

fn is_builtin_trait(name: &str) -> bool {
Expand Down
2 changes: 0 additions & 2 deletions src/libsyntax/feature_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ pub const KNOWN_ATTRIBUTES: &'static [(&'static str, AttributeType)] = &[
("no_mangle", Normal),
("no_link", Normal),
("derive", Normal),
("deriving", Normal), // deprecation err in expansion
("should_fail", Normal),
("should_panic", Normal),
("ignore", Normal),
Expand Down Expand Up @@ -259,7 +258,6 @@ pub const KNOWN_ATTRIBUTES: &'static [(&'static str, AttributeType)] = &[
("link_section", Whitelisted),
("no_builtins", Whitelisted),
("no_mangle", Whitelisted),
("no_split_stack", Whitelisted),
("no_stack_check", Whitelisted),
("packed", Whitelisted),
("static_assert", Gated("static_assert",
Expand Down
19 changes: 0 additions & 19 deletions src/libsyntax/parse/obsolete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ use ptr::P;
/// The specific types of unsupported syntax
#[derive(Copy, PartialEq, Eq, Hash)]
pub enum ObsoleteSyntax {
Sized,
ForSized,
ClosureType,
ClosureKind,
EmptyIndex,
}
Expand All @@ -49,27 +46,11 @@ impl<'a> ParserObsoleteMethods for parser::Parser<'a> {
/// Reports an obsolete syntax non-fatal error.
fn obsolete(&mut self, sp: Span, kind: ObsoleteSyntax) {
let (kind_str, desc, error) = match kind {
ObsoleteSyntax::ForSized => (
"for Sized?",
"no longer required. Traits (and their `Self` type) do not have the `Sized` bound \
by default",
true,
),
ObsoleteSyntax::ClosureType => (
"`|usize| -> bool` closure type",
"use unboxed closures instead, no type annotation needed",
true,
),
ObsoleteSyntax::ClosureKind => (
"`:`, `&mut:`, or `&:`",
"rely on inference instead",
true,
),
ObsoleteSyntax::Sized => (
"`Sized? T` for removing the `Sized` bound",
"write `T: ?Sized` instead",
true,
),
ObsoleteSyntax::EmptyIndex => (
"[]",
"write `[..]` instead",
Expand Down
Loading