Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 2 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a0fcc8e
Add `display` method to `OsStr`
riverbl Jan 7, 2024
e060274
tests: Fix typo unix_sigpipe-error.rs -> unix_sigpipe-sig_ign.rs
Enselic Feb 9, 2024
a1cb3db
tests: Rename unix_sigpipe.rs to unix_sigpipe-bare.rs for clarity
Enselic Feb 9, 2024
d14f158
tests: Combine unix_sigpipe-not-used.rs and unix_sigpipe-only-feature.rs
Enselic Feb 9, 2024
948b1d6
tests: Add unix_sigpipe-different-duplicates.rs test variant
Enselic Feb 9, 2024
0da1b71
Add test case for primitive links in alias js
notriddle Feb 24, 2024
3bcef2d
Fix issues in suggesting importing extern crate paths
chenyukang Feb 17, 2024
03a10a9
Changing some attributes to only_local.
surechen Feb 27, 2024
8719b74
Fix link generation for locate foreign macro in jump to definition fe…
GuillaumeGomez Feb 27, 2024
4dd05e6
Add regression test for link generation on foreign macro in jump to d…
GuillaumeGomez Feb 27, 2024
7e10a5c
handle unavailable creation time as `io::ErrorKind::Unsupported`
janstarke Feb 27, 2024
1feef44
rename RPITIT from opaque to synthetic
compiler-errors Feb 27, 2024
b57ddfe
Print RPITIT like an opaque
compiler-errors Feb 27, 2024
8a6d353
Split rustc_type_ir to avoid rustc_ast from depending on it
oli-obk Feb 27, 2024
c7476f8
CFI: Fix typo in test file names
rcvalle Feb 27, 2024
cc584ba
Process alias-relate obligations in CoerceUnsized loop
compiler-errors Feb 27, 2024
5e29e26
Remove the `UntranslatableDiagnosticTrivial` lint.
nnethercote Feb 5, 2024
d840408
Rollup merge of #120051 - riverbl:os-str-display, r=m-ou-se
GuillaumeGomez Feb 28, 2024
c5dafe6
Rollup merge of #121226 - chenyukang:yukang-fix-import-alias, r=david…
GuillaumeGomez Feb 28, 2024
587d828
Rollup merge of #121423 - nnethercote:rm-UntranslatableDiagnosticTriv…
GuillaumeGomez Feb 28, 2024
d8e6550
Rollup merge of #121527 - Enselic:unix_sigpipe-tests-fixes, r=davidtwco
GuillaumeGomez Feb 28, 2024
65b190d
Rollup merge of #121572 - notriddle:notriddle/test-case-121106, r=Gui…
GuillaumeGomez Feb 28, 2024
796af69
Rollup merge of #121661 - surechen:change_attribute_to_local_20240226…
GuillaumeGomez Feb 28, 2024
b609afe
Rollup merge of #121680 - GuillaumeGomez:foreign-macro-jump-to-def, r…
GuillaumeGomez Feb 28, 2024
a0027e8
Rollup merge of #121686 - compiler-errors:rpitit-printing, r=lcnr
GuillaumeGomez Feb 28, 2024
2492f93
Rollup merge of #121691 - janstarke:handle-missing-creation-time-as-u…
GuillaumeGomez Feb 28, 2024
a62cfe0
Rollup merge of #121695 - oli-obk:split_ty_utils, r=compiler-errors
GuillaumeGomez Feb 28, 2024
ca69a1f
Rollup merge of #121698 - rcvalle:rust-cfi-fix-typo, r=compiler-errors
GuillaumeGomez Feb 28, 2024
1b08d1a
Rollup merge of #121702 - compiler-errors:coerce-alias-relate, r=lcnr
GuillaumeGomez Feb 28, 2024
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
63 changes: 41 additions & 22 deletions compiler/rustc_feature/src/builtin_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,20 +390,21 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[

// Entry point:
gated!(unix_sigpipe, Normal, template!(Word, NameValueStr: "inherit|sig_ign|sig_dfl"), ErrorFollowing, experimental!(unix_sigpipe)),
ungated!(start, Normal, template!(Word), WarnFollowing),
ungated!(no_start, CrateLevel, template!(Word), WarnFollowing),
ungated!(no_main, CrateLevel, template!(Word), WarnFollowing),
ungated!(start, Normal, template!(Word), WarnFollowing, @only_local: true),
ungated!(no_start, CrateLevel, template!(Word), WarnFollowing, @only_local: true),
ungated!(no_main, CrateLevel, template!(Word), WarnFollowing, @only_local: true),

// Modules, prelude, and resolution:
ungated!(path, Normal, template!(NameValueStr: "file"), FutureWarnFollowing),
ungated!(no_std, CrateLevel, template!(Word), WarnFollowing),
ungated!(no_implicit_prelude, Normal, template!(Word), WarnFollowing),
ungated!(path, Normal, template!(NameValueStr: "file"), FutureWarnFollowing, @only_local: true),
ungated!(no_std, CrateLevel, template!(Word), WarnFollowing, @only_local: true),
ungated!(no_implicit_prelude, Normal, template!(Word), WarnFollowing, @only_local: true),
ungated!(non_exhaustive, Normal, template!(Word), WarnFollowing),

// Runtime
ungated!(
windows_subsystem, CrateLevel,
template!(NameValueStr: "windows|console"), FutureWarnFollowing
template!(NameValueStr: "windows|console"), FutureWarnFollowing,
@only_local: true
),
ungated!(panic_handler, Normal, template!(Word), WarnFollowing), // RFC 2070

Expand All @@ -416,13 +417,17 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
DuplicatesOk, @only_local: true,
),
ungated!(track_caller, Normal, template!(Word), WarnFollowing),
ungated!(instruction_set, Normal, template!(List: "set"), ErrorPreceding),
ungated!(instruction_set, Normal, template!(List: "set"), ErrorPreceding, @only_local: true),
gated!(
no_sanitize, Normal,
template!(List: "address, kcfi, memory, thread"), DuplicatesOk,
experimental!(no_sanitize)
@only_local: true, experimental!(no_sanitize)
),
gated!(
coverage, Normal, template!(Word, List: "on|off"),
WarnFollowing, @only_local: true,
coverage_attribute, experimental!(coverage)
),
gated!(coverage, Normal, template!(Word, List: "on|off"), WarnFollowing, coverage_attribute, experimental!(coverage)),

ungated!(
doc, Normal, template!(List: "hidden|inline|...", NameValueStr: "string"), DuplicatesOk
Expand All @@ -431,7 +436,8 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
// Debugging
ungated!(
debugger_visualizer, Normal,
template!(List: r#"natvis_file = "...", gdb_script_file = "...""#), DuplicatesOk
template!(List: r#"natvis_file = "...", gdb_script_file = "...""#),
DuplicatesOk, @only_local: true
),

// ==========================================================================
Expand All @@ -455,26 +461,35 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
marker_trait_attr, experimental!(marker)
),
gated!(
thread_local, Normal, template!(Word), WarnFollowing,
thread_local, Normal, template!(Word), WarnFollowing, @only_local: true,
"`#[thread_local]` is an experimental feature, and does not currently handle destructors",
),
gated!(no_core, CrateLevel, template!(Word), WarnFollowing, experimental!(no_core)),
gated!(
no_core, CrateLevel, template!(Word), WarnFollowing,
@only_local: true, experimental!(no_core)
),
// RFC 2412
gated!(
optimize, Normal, template!(List: "size|speed"), ErrorPreceding, optimize_attribute,
experimental!(optimize),
optimize, Normal, template!(List: "size|speed"), ErrorPreceding,
@only_local: true, optimize_attribute, experimental!(optimize)
),

gated!(ffi_pure, Normal, template!(Word), WarnFollowing, experimental!(ffi_pure)),
gated!(ffi_const, Normal, template!(Word), WarnFollowing, experimental!(ffi_const)),
gated!(
ffi_pure, Normal, template!(Word), WarnFollowing,
@only_local: true, experimental!(ffi_pure)
),
gated!(
ffi_const, Normal, template!(Word), WarnFollowing,
@only_local: true, experimental!(ffi_const)
),
gated!(
register_tool, CrateLevel, template!(List: "tool1, tool2, ..."), DuplicatesOk,
experimental!(register_tool),
@only_local: true, experimental!(register_tool),
),

gated!(
cmse_nonsecure_entry, Normal, template!(Word), WarnFollowing,
experimental!(cmse_nonsecure_entry)
@only_local: true, experimental!(cmse_nonsecure_entry)
),
// RFC 2632
gated!(
Expand All @@ -492,11 +507,14 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
// `#[collapse_debuginfo]`
gated!(
collapse_debuginfo, Normal, template!(Word, List: "no|external|yes"), ErrorFollowing,
experimental!(collapse_debuginfo)
@only_local: true, experimental!(collapse_debuginfo)
),

// RFC 2397
gated!(do_not_recommend, Normal, template!(Word), WarnFollowing, experimental!(do_not_recommend)),
gated!(
do_not_recommend, Normal, template!(Word), WarnFollowing,
@only_local: true, experimental!(do_not_recommend)
),

// `#[cfi_encoding = ""]`
gated!(
Expand Down Expand Up @@ -528,7 +546,8 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
),
ungated!(
rustc_default_body_unstable, Normal,
template!(List: r#"feature = "name", reason = "...", issue = "N""#), DuplicatesOk
template!(List: r#"feature = "name", reason = "...", issue = "N""#),
DuplicatesOk, @only_local: true
),
gated!(
allow_internal_unstable, Normal, template!(Word, List: "feat1, feat2, ..."), DuplicatesOk,
Expand Down