Skip to content

Commit 8c2571c

Browse files
Rollup merge of #120425 - DaniPopes:query-default-return, r=Nilstrieb
Remove unnecessary unit returns in query declarations For consistency with normal functions.
2 parents 6e046fe + cda898b commit 8c2571c

File tree

1 file changed

+14
-14
lines changed
  • compiler/rustc_middle/src/query

1 file changed

+14
-14
lines changed

compiler/rustc_middle/src/query/mod.rs

+14-14
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ pub use plumbing::{IntoQueryParam, TyCtxtAt, TyCtxtEnsure, TyCtxtEnsureWithValue
109109
// as they will raise an fatal error on query cycles instead.
110110
rustc_queries! {
111111
/// This exists purely for testing the interactions between span_delayed_bug and incremental.
112-
query trigger_span_delayed_bug(key: DefId) -> () {
112+
query trigger_span_delayed_bug(key: DefId) {
113113
desc { "triggering a span delayed bug for testing incremental" }
114114
}
115115

@@ -119,7 +119,7 @@ rustc_queries! {
119119
desc { "compute registered tools for crate" }
120120
}
121121

122-
query early_lint_checks(_: ()) -> () {
122+
query early_lint_checks(_: ()) {
123123
desc { "perform lints prior to macro expansion" }
124124
}
125125

@@ -299,7 +299,7 @@ rustc_queries! {
299299
/// name. This is useful for cases were not all linting code from rustc
300300
/// was called. With the default `None` all registered lints will also
301301
/// be checked for expectation fulfillment.
302-
query check_expectations(key: Option<Symbol>) -> () {
302+
query check_expectations(key: Option<Symbol>) {
303303
eval_always
304304
desc { "checking lint expectations (RFC 2383)" }
305305
}
@@ -906,39 +906,39 @@ rustc_queries! {
906906
}
907907

908908
/// Performs lint checking for the module.
909-
query lint_mod(key: LocalModDefId) -> () {
909+
query lint_mod(key: LocalModDefId) {
910910
desc { |tcx| "linting {}", describe_as_module(key, tcx) }
911911
}
912912

913-
query check_unused_traits(_: ()) -> () {
913+
query check_unused_traits(_: ()) {
914914
desc { "checking unused trait imports in crate" }
915915
}
916916

917917
/// Checks the attributes in the module.
918-
query check_mod_attrs(key: LocalModDefId) -> () {
918+
query check_mod_attrs(key: LocalModDefId) {
919919
desc { |tcx| "checking attributes in {}", describe_as_module(key, tcx) }
920920
}
921921

922922
/// Checks for uses of unstable APIs in the module.
923-
query check_mod_unstable_api_usage(key: LocalModDefId) -> () {
923+
query check_mod_unstable_api_usage(key: LocalModDefId) {
924924
desc { |tcx| "checking for unstable API usage in {}", describe_as_module(key, tcx) }
925925
}
926926

927927
/// Checks the const bodies in the module for illegal operations (e.g. `if` or `loop`).
928-
query check_mod_const_bodies(key: LocalModDefId) -> () {
928+
query check_mod_const_bodies(key: LocalModDefId) {
929929
desc { |tcx| "checking consts in {}", describe_as_module(key, tcx) }
930930
}
931931

932932
/// Checks the loops in the module.
933-
query check_mod_loops(key: LocalModDefId) -> () {
933+
query check_mod_loops(key: LocalModDefId) {
934934
desc { |tcx| "checking loops in {}", describe_as_module(key, tcx) }
935935
}
936936

937-
query check_mod_naked_functions(key: LocalModDefId) -> () {
937+
query check_mod_naked_functions(key: LocalModDefId) {
938938
desc { |tcx| "checking naked functions in {}", describe_as_module(key, tcx) }
939939
}
940940

941-
query check_mod_privacy(key: LocalModDefId) -> () {
941+
query check_mod_privacy(key: LocalModDefId) {
942942
desc { |tcx| "checking privacy in {}", describe_as_module(key.to_local_def_id(), tcx) }
943943
}
944944

@@ -958,7 +958,7 @@ rustc_queries! {
958958
desc { "finding live symbols in crate" }
959959
}
960960

961-
query check_mod_deathness(key: LocalModDefId) -> () {
961+
query check_mod_deathness(key: LocalModDefId) {
962962
desc { |tcx| "checking deathness of variables in {}", describe_as_module(key, tcx) }
963963
}
964964

@@ -972,7 +972,7 @@ rustc_queries! {
972972
ensure_forwards_result_if_red
973973
}
974974

975-
query collect_mod_item_types(key: LocalModDefId) -> () {
975+
query collect_mod_item_types(key: LocalModDefId) {
976976
desc { |tcx| "collecting item types in {}", describe_as_module(key, tcx) }
977977
}
978978

@@ -1121,7 +1121,7 @@ rustc_queries! {
11211121
eval_always
11221122
desc { "checking effective visibilities" }
11231123
}
1124-
query check_private_in_public(_: ()) -> () {
1124+
query check_private_in_public(_: ()) {
11251125
eval_always
11261126
desc { "checking for private elements in public interfaces" }
11271127
}

0 commit comments

Comments
 (0)