@@ -894,56 +894,93 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
894894 ) ,
895895 rustc_attr ! ( TEST , rustc_insignificant_dtor, Normal , template!( Word ) , WarnFollowing ) ,
896896 rustc_attr ! ( TEST , rustc_strict_coherence, Normal , template!( Word ) , WarnFollowing ) ,
897- rustc_attr ! ( TEST , rustc_variance, Normal , template!( Word ) , WarnFollowing ) ,
898- rustc_attr ! ( TEST , rustc_variance_of_opaques, Normal , template!( Word ) , WarnFollowing ) ,
899- rustc_attr ! ( TEST , rustc_hidden_type_of_opaques, Normal , template!( Word ) , WarnFollowing ) ,
897+ rustc_attr ! ( TEST , rustc_variance, Normal , template!( Word ) , WarnFollowing , @only_local: true ) ,
898+ rustc_attr ! (
899+ TEST , rustc_variance_of_opaques, Normal , template!( Word ) ,
900+ WarnFollowing , @only_local: true
901+ ) ,
902+ rustc_attr ! (
903+ TEST , rustc_hidden_type_of_opaques, Normal , template!( Word ) ,
904+ WarnFollowing , @only_local: true ) ,
900905 rustc_attr ! ( TEST , rustc_layout, Normal , template!( List : "field1, field2, ..." ) , WarnFollowing ) ,
901- rustc_attr ! ( TEST , rustc_abi, Normal , template!( List : "field1, field2, ..." ) , WarnFollowing ) ,
902- rustc_attr ! ( TEST , rustc_regions, Normal , template!( Word ) , WarnFollowing ) ,
906+ rustc_attr ! (
907+ TEST , rustc_abi, Normal , template!( List : "field1, field2, ..." ) ,
908+ WarnFollowing , @only_local: true
909+ ) ,
910+ rustc_attr ! (
911+ TEST , rustc_regions, Normal , template!( Word ) ,
912+ WarnFollowing , @only_local: true
913+ ) ,
903914 rustc_attr ! (
904915 TEST , rustc_error, Normal ,
905916 template!( Word , List : "delayed_bug_from_inside_query" ) , WarnFollowingWordOnly
906917 ) ,
907- rustc_attr ! ( TEST , rustc_dump_user_args, Normal , template!( Word ) , WarnFollowing ) ,
918+ rustc_attr ! (
919+ TEST , rustc_dump_user_args, Normal , template!( Word ) , WarnFollowing ,
920+ @only_local: true
921+ ) ,
908922 rustc_attr ! ( TEST , rustc_evaluate_where_clauses, Normal , template!( Word ) , WarnFollowing ) ,
909923 rustc_attr ! (
910- TEST , rustc_if_this_changed, Normal , template!( Word , List : "DepNode" ) , DuplicatesOk
924+ TEST , rustc_if_this_changed, Normal , template!( Word , List : "DepNode" ) ,
925+ DuplicatesOk , @only_local: true
911926 ) ,
912927 rustc_attr ! (
913- TEST , rustc_then_this_would_need, Normal , template!( List : "DepNode" ) , DuplicatesOk
928+ TEST , rustc_then_this_would_need, Normal , template!( List : "DepNode" ) ,
929+ DuplicatesOk , @only_local: true
914930 ) ,
915931 rustc_attr ! (
916932 TEST , rustc_clean, Normal ,
917933 template!( List : r#"cfg = "...", /*opt*/ label = "...", /*opt*/ except = "...""# ) ,
918- DuplicatesOk ,
934+ DuplicatesOk , @only_local : true
919935 ) ,
920936 rustc_attr ! (
921937 TEST , rustc_partition_reused, Normal ,
922- template!( List : r#"cfg = "...", module = "...""# ) , DuplicatesOk ,
938+ template!( List : r#"cfg = "...", module = "...""# ) , DuplicatesOk , @only_local : true
923939 ) ,
924940 rustc_attr ! (
925941 TEST , rustc_partition_codegened, Normal ,
926- template!( List : r#"cfg = "...", module = "...""# ) , DuplicatesOk ,
942+ template!( List : r#"cfg = "...", module = "...""# ) , DuplicatesOk , @only_local : true
927943 ) ,
928944 rustc_attr ! (
929945 TEST , rustc_expected_cgu_reuse, Normal ,
930946 template!( List : r#"cfg = "...", module = "...", kind = "...""# ) , DuplicatesOk ,
947+ @only_local: true
948+ ) ,
949+ rustc_attr ! (
950+ TEST , rustc_symbol_name, Normal , template!( Word ) , WarnFollowing ,
951+ @only_local: true
931952 ) ,
932- rustc_attr ! ( TEST , rustc_symbol_name, Normal , template!( Word ) , WarnFollowing ) ,
933953 rustc_attr ! ( TEST , rustc_polymorphize_error, Normal , template!( Word ) , WarnFollowing ) ,
934- rustc_attr ! ( TEST , rustc_def_path, Normal , template!( Word ) , WarnFollowing ) ,
954+ rustc_attr ! (
955+ TEST , rustc_def_path, Normal , template!( Word ) , WarnFollowing ,
956+ @only_local: true
957+ ) ,
935958 rustc_attr ! ( TEST , rustc_mir, Normal , template!( List : "arg1, arg2, ..." ) , DuplicatesOk ) ,
936959 gated ! (
937960 custom_mir, Normal , template!( List : r#"dialect = "...", phase = "...""# ) ,
938- ErrorFollowing , "the `#[custom_mir]` attribute is just used for the Rust test suite" ,
961+ ErrorFollowing , @only_local: true ,
962+ "the `#[custom_mir]` attribute is just used for the Rust test suite" ,
963+ ) ,
964+ rustc_attr ! (
965+ TEST , rustc_dump_program_clauses, Normal , template!( Word ) , WarnFollowing ,
966+ @only_local: true
967+ ) ,
968+ rustc_attr ! (
969+ TEST , rustc_dump_env_program_clauses, Normal , template!( Word ) , WarnFollowing ,
970+ @only_local: true
971+ ) ,
972+ rustc_attr ! (
973+ TEST , rustc_object_lifetime_default, Normal , template!( Word ) , WarnFollowing ,
974+ @only_local: true
939975 ) ,
940- rustc_attr ! ( TEST , rustc_dump_program_clauses, Normal , template!( Word ) , WarnFollowing ) ,
941- rustc_attr ! ( TEST , rustc_dump_env_program_clauses, Normal , template!( Word ) , WarnFollowing ) ,
942- rustc_attr ! ( TEST , rustc_object_lifetime_default, Normal , template!( Word ) , WarnFollowing ) ,
943976 rustc_attr ! ( TEST , rustc_dump_vtable, Normal , template!( Word ) , WarnFollowing ) ,
944- rustc_attr ! ( TEST , rustc_dummy, Normal , template!( Word /* doesn't matter*/ ) , DuplicatesOk ) ,
977+ rustc_attr ! (
978+ TEST , rustc_dummy, Normal , template!( Word /* doesn't matter*/ ) , DuplicatesOk ,
979+ @only_local: true
980+ ) ,
945981 gated ! (
946982 omit_gdb_pretty_printer_section, Normal , template!( Word ) , WarnFollowing ,
983+ @only_local: true ,
947984 "the `#[omit_gdb_pretty_printer_section]` attribute is just used for the Rust test suite" ,
948985 ) ,
949986 rustc_attr ! (
0 commit comments