Skip to content
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

Remove deprecated unstable attribute #[simd] #47251

Merged
merged 1 commit into from
Jan 13, 2018
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/ty/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1553,11 +1553,6 @@ impl ReprOptions {
}
}

// FIXME(eddyb) This is deprecated and should be removed.
if tcx.has_attr(did, "simd") {
flags.insert(ReprFlags::IS_SIMD);
}

// This is here instead of layout because the choice must make it into metadata.
if !tcx.consider_optimizing(|| format!("Reorder fields of {:?}", tcx.item_path_str(did))) {
flags.insert(ReprFlags::IS_LINEAR);
Expand Down
12 changes: 2 additions & 10 deletions src/libsyntax/feature_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ declare_features! (
(active, link_llvm_intrinsics, "1.0.0", Some(29602)),
(active, linkage, "1.0.0", Some(29603)),
(active, quote, "1.0.0", Some(29601)),
(active, simd, "1.0.0", Some(27731)),


// rustc internal
Expand Down Expand Up @@ -470,6 +469,8 @@ declare_features! (
(removed, unmarked_api, "1.0.0", None),
(removed, pushpop_unsafe, "1.2.0", None),
(removed, allocator, "1.0.0", None),
// Allows the `#[simd]` attribute -- removed in favor of `#[repr(simd)]`
(removed, simd, "1.0.0", Some(27731)),
);

declare_features! (
Expand Down Expand Up @@ -633,7 +634,6 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG
("start", Normal, Ungated),
("test", Normal, Ungated),
("bench", Normal, Ungated),
("simd", Normal, Ungated),
("repr", Normal, Ungated),
("path", Normal, Ungated),
("abi", Normal, Ungated),
Expand Down Expand Up @@ -1501,14 +1501,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
}

ast::ItemKind::Struct(..) => {
if let Some(attr) = attr::find_by_name(&i.attrs[..], "simd") {
gate_feature_post!(&self, simd, attr.span,
"SIMD types are experimental and possibly buggy");
self.context.parse_sess.span_diagnostic.span_warn(attr.span,
"the `#[simd]` attribute \
is deprecated, use \
`#[repr(simd)]` instead");
}
if let Some(attr) = attr::find_by_name(&i.attrs[..], "repr") {
for item in attr.meta_item_list().unwrap_or_else(Vec::new) {
if item.check_name("simd") {
Expand Down
19 changes: 0 additions & 19 deletions src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
#![start = "x4300"] //~ WARN unused attribute
// see issue-43106-gating-of-test.rs for crate-level; but non crate-level is below at "4200"
// see issue-43106-gating-of-bench.rs for crate-level; but non crate-level is below at "4100"
#![simd = "4000"] //~ WARN unused attribute
#![repr = "3900"] //~ WARN unused attribute
#![path = "3800"] //~ WARN unused attribute
#![abi = "3700"] //~ WARN unused attribute
Expand Down Expand Up @@ -328,24 +327,6 @@ mod bench {
impl S { }
}

#[simd = "4000"]
//~^ WARN unused attribute
mod simd {
mod inner { #![simd="4000"] }
//~^ WARN unused attribute

#[simd = "4000"] fn f() { }
//~^ WARN unused attribute

struct S; // for `struct S` case, see feature-gate-repr-simd.rs

#[simd = "4000"] type T = S;
//~^ WARN unused attribute

#[simd = "4000"] impl S { }
//~^ WARN unused attribute
}

#[repr = "3900"]
//~^ WARN unused attribute
mod repr {
Expand Down
Loading