Skip to content

Commit 629a62b

Browse files
authored
Unrolled build for rust-lang#141253
Rollup merge of rust-lang#141253 - azhogin:azhogin/async-drop-feature-inconsistency-warning, r=oli-obk Warning added when dependency crate has async drop types, and the feature is disabled In continue of rust-lang#141031. When dependency crate has non-empty `adt_async_destructor` table in metadata, and `async_drop` feature is disabled for local crate, warning will be emitted. Test `dependency-dropped` has two revisions - with and without feature enabled. With feature enabled, async drop for dropee is executed ("Async drop" printed). Without the feature enabled, sync drop is executed ("Sync drop" printed) and warning is emitted. Warning example: ``` warning: found async drop types in dependecy `async_drop_dep`, but async_drop feature is disabled for `dependency_dropped` --> $DIR/dependency-dropped.rs:7:1 | LL | #![cfg_attr(with_feature, feature(async_drop))] | ^ | = help: if async drop type will be dropped in a crate without `feature(async_drop)`, sync Drop will be used ```
2 parents 6cab15c + 4a99cbb commit 629a62b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

compiler/rustc_metadata/messages.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ metadata_as_needed_compatibility =
22
linking modifier `as-needed` is only compatible with `dylib` and `framework` linking kinds
33
44
metadata_async_drop_types_in_dependency =
5-
found async drop types in dependecy `{$extern_crate}`, but async_drop feature is disabled for `{$local_crate}`
5+
found async drop types in dependency `{$extern_crate}`, but async_drop feature is disabled for `{$local_crate}`
66
.help = if async drop type will be dropped in a crate without `feature(async_drop)`, sync Drop will be used
77
88
metadata_bad_panic_strategy =

tests/ui/async-await/async-drop/dependency-dropped.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//@ edition:2021
66

77
#![cfg_attr(with_feature, feature(async_drop))]
8-
//[without_feature]~^ WARN found async drop types in dependecy `async_drop_dep`, but async_drop feature is disabled for `dependency_dropped`
8+
//[without_feature]~^ WARN found async drop types in dependency `async_drop_dep`, but async_drop feature is disabled for `dependency_dropped`
99

1010
#![allow(incomplete_features)]
1111

tests/ui/async-await/async-drop/dependency-dropped.without_feature.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
warning: found async drop types in dependecy `async_drop_dep`, but async_drop feature is disabled for `dependency_dropped`
1+
warning: found async drop types in dependency `async_drop_dep`, but async_drop feature is disabled for `dependency_dropped`
22
--> $DIR/dependency-dropped.rs:7:1
33
|
44
LL | #![cfg_attr(with_feature, feature(async_drop))]

0 commit comments

Comments
 (0)