Skip to content

Commit 7e001e5

Browse files
committed
Auto merge of #58777 - Centril:rollup, r=Centril
Rollup of 14 pull requests Successful merges: - #58075 (Fix for issue #58050) - #58627 (rustdoc: move collapse and unindent docs passes earlier) - #58630 (Make `visit_clobber` panic-safe.) - #58678 (Deny `async fn` in 2015 edition) - #58680 (Fix an indexing error when using `x.py help`) - #58703 (Fix copy-pasted typo for read_string return value) - #58744 (Update dlmalloc to 0.1.3) - #58746 (std: docs: Disable running several Stdio doctests) - #58748 (update scoped_tls to 1.0) - #58749 (Reduce Repetitions of (n << amt) >> amt) - #58752 (Update string_cache_codegen to 0.4.2) - #58755 (Clarify `rotate_{left,right}` docs) - #58757 (Normalize the type Self resolves to in an impl) - #58761 (Add tracking issue for the unwind attribute) Failed merges: r? @ghost
2 parents 4855370 + 1394b6f commit 7e001e5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+409
-283
lines changed

Cargo.lock

+22-34
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ dependencies = [
744744

745745
[[package]]
746746
name = "dlmalloc"
747-
version = "0.1.2"
747+
version = "0.1.3"
748748
source = "registry+https://github.com/rust-lang/crates.io-index"
749749
dependencies = [
750750
"compiler_builtins 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1399,7 +1399,7 @@ dependencies = [
13991399
"serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
14001400
"serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
14011401
"string_cache 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
1402-
"string_cache_codegen 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
1402+
"string_cache_codegen 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
14031403
"tendril 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
14041404
]
14051405

@@ -1936,14 +1936,6 @@ dependencies = [
19361936
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
19371937
]
19381938

1939-
[[package]]
1940-
name = "proc-macro2"
1941-
version = "0.3.8"
1942-
source = "registry+https://github.com/rust-lang/crates.io-index"
1943-
dependencies = [
1944-
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
1945-
]
1946-
19471939
[[package]]
19481940
name = "proc-macro2"
19491941
version = "0.4.24"
@@ -2015,14 +2007,6 @@ name = "quote"
20152007
version = "0.3.15"
20162008
source = "registry+https://github.com/rust-lang/crates.io-index"
20172009

2018-
[[package]]
2019-
name = "quote"
2020-
version = "0.5.2"
2021-
source = "registry+https://github.com/rust-lang/crates.io-index"
2022-
dependencies = [
2023-
"proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
2024-
]
2025-
20262010
[[package]]
20272011
name = "quote"
20282012
version = "0.6.10"
@@ -2092,7 +2076,7 @@ name = "rand_chacha"
20922076
version = "0.1.0"
20932077
source = "registry+https://github.com/rust-lang/crates.io-index"
20942078
dependencies = [
2095-
"rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
2079+
"rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
20962080
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
20972081
]
20982082

@@ -2114,7 +2098,7 @@ name = "rand_hc"
21142098
version = "0.1.0"
21152099
source = "registry+https://github.com/rust-lang/crates.io-index"
21162100
dependencies = [
2117-
"rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
2101+
"rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
21182102
]
21192103

21202104
[[package]]
@@ -2139,7 +2123,7 @@ name = "rand_xorshift"
21392123
version = "0.1.0"
21402124
source = "registry+https://github.com/rust-lang/crates.io-index"
21412125
dependencies = [
2142-
"rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
2126+
"rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
21432127
]
21442128

21452129
[[package]]
@@ -2381,7 +2365,7 @@ dependencies = [
23812365
"rustc_errors 0.0.0",
23822366
"rustc_fs_util 0.0.0",
23832367
"rustc_target 0.0.0",
2384-
"scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
2368+
"scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
23852369
"serialize 0.0.0",
23862370
"smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)",
23872371
"syntax 0.0.0",
@@ -2726,7 +2710,7 @@ dependencies = [
27262710
"rustc_target 0.0.0",
27272711
"rustc_traits 0.0.0",
27282712
"rustc_typeck 0.0.0",
2729-
"scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
2713+
"scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
27302714
"serialize 0.0.0",
27312715
"smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)",
27322716
"syntax 0.0.0",
@@ -3090,6 +3074,11 @@ name = "scoped-tls"
30903074
version = "0.1.2"
30913075
source = "registry+https://github.com/rust-lang/crates.io-index"
30923076

3077+
[[package]]
3078+
name = "scoped-tls"
3079+
version = "1.0.0"
3080+
source = "registry+https://github.com/rust-lang/crates.io-index"
3081+
30933082
[[package]]
30943083
name = "scoped_threadpool"
30953084
version = "0.1.9"
@@ -3230,7 +3219,7 @@ dependencies = [
32303219
"cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)",
32313220
"compiler_builtins 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
32323221
"core 0.0.0",
3233-
"dlmalloc 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
3222+
"dlmalloc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
32343223
"fortanix-sgx-abi 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
32353224
"libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)",
32363225
"panic_abort 0.0.0",
@@ -3255,19 +3244,19 @@ dependencies = [
32553244
"phf_shared 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)",
32563245
"precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
32573246
"serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)",
3258-
"string_cache_codegen 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
3247+
"string_cache_codegen 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
32593248
"string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
32603249
]
32613250

32623251
[[package]]
32633252
name = "string_cache_codegen"
3264-
version = "0.4.1"
3253+
version = "0.4.2"
32653254
source = "registry+https://github.com/rust-lang/crates.io-index"
32663255
dependencies = [
32673256
"phf_generator 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)",
32683257
"phf_shared 0.7.22 (registry+https://github.com/rust-lang/crates.io-index)",
3269-
"proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
3270-
"quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
3258+
"proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)",
3259+
"quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
32713260
"string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
32723261
]
32733262

@@ -3345,7 +3334,7 @@ dependencies = [
33453334
"rustc_data_structures 0.0.0",
33463335
"rustc_errors 0.0.0",
33473336
"rustc_target 0.0.0",
3348-
"scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
3337+
"scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
33493338
"serialize 0.0.0",
33503339
"smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)",
33513340
"syntax_pos 0.0.0",
@@ -3372,7 +3361,7 @@ dependencies = [
33723361
"arena 0.0.0",
33733362
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
33743363
"rustc_data_structures 0.0.0",
3375-
"scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
3364+
"scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
33763365
"serialize 0.0.0",
33773366
"unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
33783367
]
@@ -4000,7 +3989,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
40003989
"checksum digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "03b072242a8cbaf9c145665af9d250c59af3b958f83ed6824e13533cf76d5b90"
40013990
"checksum directories 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "72d337a64190607d4fcca2cb78982c5dd57f4916e19696b48a575fa746b6cb0f"
40023991
"checksum dirs 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "88972de891f6118092b643d85a0b28e0678e0f948d7f879aa32f2d5aafe97d2a"
4003-
"checksum dlmalloc 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d56ad71b31043818d0ee10a7fb9664882f8e45849c81647585e6a3124f185517"
3992+
"checksum dlmalloc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f283302e035e61c23f2b86b3093e8c6273a4c3125742d6087e96ade001ca5e63"
40043993
"checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0"
40053994
"checksum elasticlunr-rs 2.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a99a310cd1f9770e7bf8e48810c7bcbb0e078c8fb23a8c7bcf0da4c2bf61a455"
40063995
"checksum ena 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f56c93cc076508c549d9bb747f79aa9b4eb098be7b8cad8830c3137ef52d1e00"
@@ -4124,15 +4113,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
41244113
"checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
41254114
"checksum pretty_assertions 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3a029430f0d744bc3d15dd474d591bed2402b645d024583082b9f63bb936dac6"
41264115
"checksum pretty_env_logger 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df8b3f4e0475def7d9c2e5de8e5a1306949849761e107b360d03e98eafaffd61"
4127-
"checksum proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1b06e2f335f48d24442b35a19df506a835fb3547bc3c06ef27340da9acf5cae7"
41284116
"checksum proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)" = "77619697826f31a02ae974457af0b29b723e5619e113e9397b8b82c6bd253f09"
41294117
"checksum proptest 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)" = "926d0604475349f463fe44130aae73f2294b5309ab2ca0310b998bd334ef191f"
41304118
"checksum pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d6fdf85cda6cadfae5428a54661d431330b312bc767ddbc57adbedc24da66e32"
41314119
"checksum pulldown-cmark 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "eef52fac62d0ea7b9b4dc7da092aa64ea7ec3d90af6679422d3d7e0e14b6ee15"
41324120
"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0"
41334121
"checksum quine-mc_cluskey 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "07589615d719a60c8dd8a4622e7946465dfef20d1a428f969e3443e7386d5f45"
41344122
"checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a"
4135-
"checksum quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9949cfe66888ffe1d53e6ec9d9f3b70714083854be20fd5e271b232a017401e8"
41364123
"checksum quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "53fa22a1994bd0f9372d7a816207d8a2677ad0325b073f5c5332760f0fb62b5c"
41374124
"checksum racer 2.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "d634483bed41bb116122b84ffe0ef8740345c2ceb2784ce86c33499700eb13a7"
41384125
"checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd"
@@ -4183,6 +4170,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
41834170
"checksum same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8f20c4be53a8a1ff4c1f1b2bd14570d2f634628709752f0702ecdd2b3f9a5267"
41844171
"checksum schannel 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "0e1a231dc10abf6749cfa5d7767f25888d484201accbd919b66ab5413c502d56"
41854172
"checksum scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "332ffa32bf586782a3efaeb58f127980944bbc8c4d6913a86107ac2a5ab24b28"
4173+
"checksum scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2"
41864174
"checksum scoped_threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8"
41874175
"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27"
41884176
"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
@@ -4201,7 +4189,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
42014189
"checksum socket2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "c4d11a52082057d87cb5caa31ad812f4504b97ab44732cd8359df2e9ff9f48e7"
42024190
"checksum stable_deref_trait 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ffbc596e092fe5f598b12ef46cc03754085ac2f4d8c739ad61c4ae266cc3b3fa"
42034191
"checksum string_cache 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "25d70109977172b127fe834e5449e5ab1740b9ba49fa18a2020f509174f25423"
4204-
"checksum string_cache_codegen 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "35293b05cf1494e8ddd042a7df6756bf18d07f42d234f32e71dce8a7aabb0191"
4192+
"checksum string_cache_codegen 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1eea1eee654ef80933142157fdad9dd8bc43cf7c74e999e369263496f04ff4da"
42054193
"checksum string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b1884d1bc09741d466d9b14e6d37ac89d6909cbcac41dd9ae982d4d063bbedfc"
42064194
"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550"
42074195
"checksum strum 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f6c3a2071519ab6a48f465808c4c1ffdd00dfc8e93111d02b4fc5abab177676e"

src/bootstrap/bootstrap.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ def main():
830830

831831
# x.py help <cmd> ...
832832
if len(sys.argv) > 1 and sys.argv[1] == 'help':
833-
sys.argv = sys.argv[:1] + [sys.argv[2], '-h'] + sys.argv[3:]
833+
sys.argv = [sys.argv[0], '-h'] + sys.argv[2:]
834834

835835
help_triggered = (
836836
'-h' in sys.argv) or ('--help' in sys.argv) or (len(sys.argv) == 1)

src/libcore/num/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ $EndFeature, "
346346
concat!("Shifts the bits to the left by a specified amount, `n`,
347347
wrapping the truncated bits to the end of the resulting integer.
348348
349-
Please note this isn't the same operation as `<<`!
349+
Please note this isn't the same operation as the `<<` shifting operator!
350350
351351
# Examples
352352
@@ -370,7 +370,7 @@ assert_eq!(n.rotate_left(", $rot, "), m);
370370
wrapping the truncated bits to the beginning of the resulting
371371
integer.
372372
373-
Please note this isn't the same operation as `>>`!
373+
Please note this isn't the same operation as the `>>` shifting operator!
374374
375375
# Examples
376376
@@ -2300,7 +2300,7 @@ assert_eq!(n.trailing_zeros(), 3);", $EndFeature, "
23002300
concat!("Shifts the bits to the left by a specified amount, `n`,
23012301
wrapping the truncated bits to the end of the resulting integer.
23022302
2303-
Please note this isn't the same operation as `<<`!
2303+
Please note this isn't the same operation as the `<<` shifting operator!
23042304
23052305
# Examples
23062306
@@ -2324,7 +2324,7 @@ assert_eq!(n.rotate_left(", $rot, "), m);
23242324
wrapping the truncated bits to the beginning of the resulting
23252325
integer.
23262326
2327-
Please note this isn't the same operation as `>>`!
2327+
Please note this isn't the same operation as the `>>` shifting operator!
23282328
23292329
# Examples
23302330

src/libcore/num/wrapping.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,8 @@ assert_eq!(n.trailing_zeros(), 3);
429429
/// wrapping the truncated bits to the end of the resulting
430430
/// integer.
431431
///
432-
/// Please note this isn't the same operation as `>>`!
432+
/// Please note this isn't the same operation as the `>>` shifting
433+
/// operator!
433434
///
434435
/// # Examples
435436
///
@@ -454,7 +455,8 @@ assert_eq!(n.trailing_zeros(), 3);
454455
/// wrapping the truncated bits to the beginning of the resulting
455456
/// integer.
456457
///
457-
/// Please note this isn't the same operation as `<<`!
458+
/// Please note this isn't the same operation as the `<<` shifting
459+
/// operator!
458460
///
459461
/// # Examples
460462
///

src/librustc/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ graphviz = { path = "../libgraphviz" }
1717
jobserver = "0.1"
1818
lazy_static = "1.0.0"
1919
num_cpus = "1.0"
20-
scoped-tls = { version = "0.1.1", features = ["nightly"] }
20+
scoped-tls = "1.0"
2121
log = { version = "0.4", features = ["release_max_level_info", "std"] }
2222
polonius-engine = "0.6.2"
2323
rustc-rayon = "0.1.1"

src/librustc/hir/lowering.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -2892,7 +2892,7 @@ impl<'a> LoweringContext<'a> {
28922892
// `impl Future<Output = T>` here because lower_body
28932893
// only cares about the input argument patterns in the function
28942894
// declaration (decl), not the return types.
2895-
let body_id = this.lower_async_body(decl, header.asyncness, body);
2895+
let body_id = this.lower_async_body(decl, header.asyncness.node, body);
28962896

28972897
let (generics, fn_decl) = this.add_in_band_defs(
28982898
generics,
@@ -2902,7 +2902,7 @@ impl<'a> LoweringContext<'a> {
29022902
decl,
29032903
Some((fn_def_id, idty)),
29042904
true,
2905-
header.asyncness.opt_return_id()
2905+
header.asyncness.node.opt_return_id()
29062906
),
29072907
);
29082908

@@ -3398,14 +3398,14 @@ impl<'a> LoweringContext<'a> {
33983398
)
33993399
}
34003400
ImplItemKind::Method(ref sig, ref body) => {
3401-
let body_id = self.lower_async_body(&sig.decl, sig.header.asyncness, body);
3401+
let body_id = self.lower_async_body(&sig.decl, sig.header.asyncness.node, body);
34023402
let impl_trait_return_allow = !self.is_in_trait_impl;
34033403
let (generics, sig) = self.lower_method_sig(
34043404
&i.generics,
34053405
sig,
34063406
impl_item_def_id,
34073407
impl_trait_return_allow,
3408-
sig.header.asyncness.opt_return_id(),
3408+
sig.header.asyncness.node.opt_return_id(),
34093409
);
34103410
(generics, hir::ImplItemKind::Method(sig, body_id))
34113411
}
@@ -3624,7 +3624,7 @@ impl<'a> LoweringContext<'a> {
36243624
fn lower_fn_header(&mut self, h: FnHeader) -> hir::FnHeader {
36253625
hir::FnHeader {
36263626
unsafety: self.lower_unsafety(h.unsafety),
3627-
asyncness: self.lower_asyncness(h.asyncness),
3627+
asyncness: self.lower_asyncness(h.asyncness.node),
36283628
constness: self.lower_constness(h.constness),
36293629
abi: h.abi,
36303630
}

src/librustc/hir/map/def_collector.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl<'a> DefCollector<'a> {
7373
decl: &'a FnDecl,
7474
body: &'a Block,
7575
) {
76-
let (closure_id, return_impl_trait_id) = match header.asyncness {
76+
let (closure_id, return_impl_trait_id) = match header.asyncness.node {
7777
IsAsync::Async {
7878
closure_id,
7979
return_impl_trait_id,
@@ -129,10 +129,10 @@ impl<'a> visit::Visitor<'a> for DefCollector<'a> {
129129
}
130130
ItemKind::Fn(
131131
ref decl,
132-
ref header @ FnHeader { asyncness: IsAsync::Async { .. }, .. },
132+
ref header,
133133
ref generics,
134134
ref body,
135-
) => {
135+
) if header.asyncness.node.is_async() => {
136136
return self.visit_async_fn(
137137
i.id,
138138
i.ident.name,
@@ -242,9 +242,9 @@ impl<'a> visit::Visitor<'a> for DefCollector<'a> {
242242
fn visit_impl_item(&mut self, ii: &'a ImplItem) {
243243
let def_data = match ii.node {
244244
ImplItemKind::Method(MethodSig {
245-
header: ref header @ FnHeader { asyncness: IsAsync::Async { .. }, .. },
245+
ref header,
246246
ref decl,
247-
}, ref body) => {
247+
}, ref body) if header.asyncness.node.is_async() => {
248248
return self.visit_async_fn(
249249
ii.id,
250250
ii.ident.name,

0 commit comments

Comments
 (0)