diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-02-09 23:29:56 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-09 23:29:56 +0100 |
| commit | 3f4aaf4f2e9fd49736e660475f446619e8734e09 (patch) | |
| tree | ee6ff4aed191d3baab16454560fe605299af423c /compiler/rustc_feature/src | |
| parent | 9634559599537e334cbfa854446d048e6ebe5ee9 (diff) | |
| parent | 170593313a6ac2206107ec52a0d3bb9cc873a97c (diff) | |
| download | rust-3f4aaf4f2e9fd49736e660475f446619e8734e09.tar.gz rust-3f4aaf4f2e9fd49736e660475f446619e8734e09.zip | |
Rollup merge of #91504 - cynecx:used_retain, r=nikic
`#[used(linker)]` attribute See https://github.com/dtolnay/linkme/issues/41#issuecomment-927255631.
Diffstat (limited to 'compiler/rustc_feature/src')
| -rw-r--r-- | compiler/rustc_feature/src/active.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_feature/src/builtin_attrs.rs | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index e5232bf3dd0..0248d3235df 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -531,6 +531,8 @@ declare_features! ( /// /// NOTE: A limited form of `union U { ... }` was accepted in 1.19.0. (active, untagged_unions, "1.13.0", Some(55149), None), + /// Allows using the `#[used(linker)]` (or `#[used(compiler)]`) attribute. + (active, used_with_arg, "1.60.0", Some(93798), None), /// Allows `extern "wasm" fn` (active, wasm_abi, "1.53.0", Some(83788), None), // !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs index cb2562d09a5..e1f645a62da 100644 --- a/compiler/rustc_feature/src/builtin_attrs.rs +++ b/compiler/rustc_feature/src/builtin_attrs.rs @@ -324,7 +324,7 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ ungated!(export_name, Normal, template!(NameValueStr: "name"), FutureWarnPreceding), ungated!(link_section, Normal, template!(NameValueStr: "name"), FutureWarnPreceding), ungated!(no_mangle, Normal, template!(Word), WarnFollowing), - ungated!(used, Normal, template!(Word), WarnFollowing), + ungated!(used, Normal, template!(Word, List: "compiler|linker"), WarnFollowing), // Limits: ungated!(recursion_limit, CrateLevel, template!(NameValueStr: "N"), FutureWarnFollowing), |
