Skip to content

Commit f945190

Browse files
committed
rustc: Remove some long deprecated features:
* no_split_stack was renamed to no_stack_check * deriving was renamed to derive * `use foo::mod` was renamed to `use foo::self`; * legacy lifetime definitions in closures have been replaced with `for` syntax * `fn foo() -> &A + B` has been deprecated for some time (needs parens) * Obsolete `for Sized?` syntax * Obsolete `Sized? Foo` syntax * Obsolete `|T| -> U` syntax
1 parent 46f649c commit f945190

File tree

10 files changed

+29
-379
lines changed

10 files changed

+29
-379
lines changed

src/librustc_trans/trans/base.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -428,11 +428,6 @@ pub fn set_llvm_fn_attrs(ccx: &CrateContext, attrs: &[ast::Attribute], llfn: Val
428428
let mut used = true;
429429
match &attr.name()[..] {
430430
"no_stack_check" => unset_split_stack(llfn),
431-
"no_split_stack" => {
432-
unset_split_stack(llfn);
433-
ccx.sess().span_warn(attr.span,
434-
"no_split_stack is a deprecated synonym for no_stack_check");
435-
}
436431
"cold" => unsafe {
437432
llvm::LLVMAddFunctionAttribute(llfn,
438433
llvm::FunctionIndex as c_uint,

src/libsyntax/ext/deriving/mod.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,6 @@ pub mod totalord;
7878

7979
pub mod generic;
8080

81-
fn expand_deprecated_deriving(cx: &mut ExtCtxt,
82-
span: Span,
83-
_: &MetaItem,
84-
_: &Item,
85-
_: &mut FnMut(P<Item>)) {
86-
cx.span_err(span, "`deriving` has been renamed to `derive`");
87-
}
88-
8981
fn expand_derive(cx: &mut ExtCtxt,
9082
_: Span,
9183
mitem: &MetaItem,
@@ -151,8 +143,6 @@ macro_rules! derive_traits {
151143

152144
env.insert(intern("derive"),
153145
Modifier(Box::new(expand_derive)));
154-
env.insert(intern("deriving"),
155-
Decorator(Box::new(expand_deprecated_deriving)));
156146
}
157147

158148
fn is_builtin_trait(name: &str) -> bool {

src/libsyntax/feature_gate.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ pub const KNOWN_ATTRIBUTES: &'static [(&'static str, AttributeType)] = &[
201201
("no_mangle", Normal),
202202
("no_link", Normal),
203203
("derive", Normal),
204-
("deriving", Normal), // deprecation err in expansion
205204
("should_fail", Normal),
206205
("should_panic", Normal),
207206
("ignore", Normal),
@@ -259,7 +258,6 @@ pub const KNOWN_ATTRIBUTES: &'static [(&'static str, AttributeType)] = &[
259258
("link_section", Whitelisted),
260259
("no_builtins", Whitelisted),
261260
("no_mangle", Whitelisted),
262-
("no_split_stack", Whitelisted),
263261
("no_stack_check", Whitelisted),
264262
("packed", Whitelisted),
265263
("static_assert", Gated("static_assert",

src/libsyntax/parse/obsolete.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ use ptr::P;
2222
/// The specific types of unsupported syntax
2323
#[derive(Copy, PartialEq, Eq, Hash)]
2424
pub enum ObsoleteSyntax {
25-
Sized,
26-
ForSized,
27-
ClosureType,
2825
ClosureKind,
2926
EmptyIndex,
3027
}
@@ -49,27 +46,11 @@ impl<'a> ParserObsoleteMethods for parser::Parser<'a> {
4946
/// Reports an obsolete syntax non-fatal error.
5047
fn obsolete(&mut self, sp: Span, kind: ObsoleteSyntax) {
5148
let (kind_str, desc, error) = match kind {
52-
ObsoleteSyntax::ForSized => (
53-
"for Sized?",
54-
"no longer required. Traits (and their `Self` type) do not have the `Sized` bound \
55-
by default",
56-
true,
57-
),
58-
ObsoleteSyntax::ClosureType => (
59-
"`|usize| -> bool` closure type",
60-
"use unboxed closures instead, no type annotation needed",
61-
true,
62-
),
6349
ObsoleteSyntax::ClosureKind => (
6450
"`:`, `&mut:`, or `&:`",
6551
"rely on inference instead",
6652
true,
6753
),
68-
ObsoleteSyntax::Sized => (
69-
"`Sized? T` for removing the `Sized` bound",
70-
"write `T: ?Sized` instead",
71-
true,
72-
),
7354
ObsoleteSyntax::EmptyIndex => (
7455
"[]",
7556
"write `[..]` instead",

0 commit comments

Comments
 (0)