Skip to content

Commit 09d8a50

Browse files
committed
Auto merge of #91573 - matthiaskrgr:rollup-wcygm2r, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #91367 (Fix ICE in `check_must_not_suspend_ty()`) - #91391 (Simplify --no-headless option for rustdoc-gui tester) - #91537 (compiler/rustc_target: make m68k-unknown-linux-gnu use the gnu base) - #91554 (Update doc about code block edition attributes) - #91563 (Bump download-ci-llvm-stamp for LLD inclusion) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents e2116ac + d056cbf commit 09d8a50

File tree

7 files changed

+86
-18
lines changed

7 files changed

+86
-18
lines changed

Diff for: compiler/rustc_target/src/spec/m68k_unknown_linux_gnu.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::abi::Endian;
22
use crate::spec::{Target, TargetOptions};
33

44
pub fn target() -> Target {
5-
let mut base = super::linux_base::opts();
5+
let mut base = super::linux_gnu_base::opts();
66
base.max_atomic_width = Some(32);
77

88
Target {

Diff for: compiler/rustc_typeck/src/check/generator_interior.rs

+15-9
Original file line numberDiff line numberDiff line change
@@ -536,22 +536,28 @@ pub fn check_must_not_suspend_ty<'tcx>(
536536
}
537537
has_emitted
538538
}
539-
ty::Tuple(ref tys) => {
539+
ty::Tuple(_) => {
540540
let mut has_emitted = false;
541-
let spans = if let Some(hir::ExprKind::Tup(comps)) = data.expr.map(|e| &e.kind) {
542-
debug_assert_eq!(comps.len(), tys.len());
543-
comps.iter().map(|e| e.span).collect()
544-
} else {
545-
vec![]
541+
let comps = match data.expr.map(|e| &e.kind) {
542+
Some(hir::ExprKind::Tup(comps)) => {
543+
debug_assert_eq!(comps.len(), ty.tuple_fields().count());
544+
Some(comps)
545+
}
546+
_ => None,
546547
};
547-
for (i, ty) in tys.iter().map(|k| k.expect_ty()).enumerate() {
548+
for (i, ty) in ty.tuple_fields().enumerate() {
548549
let descr_post = &format!(" in tuple element {}", i);
549-
let span = *spans.get(i).unwrap_or(&data.source_span);
550+
let span = comps.and_then(|c| c.get(i)).map(|e| e.span).unwrap_or(data.source_span);
550551
if check_must_not_suspend_ty(
551552
fcx,
552553
ty,
553554
hir_id,
554-
SuspendCheckData { descr_post, source_span: span, ..data },
555+
SuspendCheckData {
556+
descr_post,
557+
expr: comps.and_then(|comps| comps.get(i)),
558+
source_span: span,
559+
..data
560+
},
555561
) {
556562
has_emitted = true;
557563
}

Diff for: src/bootstrap/download-ci-llvm-stamp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Change this file to make users of the `download-ci-llvm` configuration download
22
a new version of LLVM from CI, even if the LLVM submodule hasn’t changed.
33

4-
Last change is for: https://github.com/rust-lang/rust/pull/88069
4+
Last change is for: https://github.com/rust-lang/rust/pull/91229

Diff for: src/doc/rustdoc/src/documentation-tests.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,8 @@ are added.
359359
# fn foo() {}
360360
```
361361

362-
`edition2018` tells `rustdoc` that the code sample should be compiled using
363-
the 2018 edition of Rust. Similarly, you can specify `edition2015` to compile
364-
the code with the 2015 edition.
362+
`edition2015`, `edition2018` and `edition2021` tell `rustdoc`
363+
that the code sample should be compiled using the respective edition of Rust.
365364

366365
```rust
367366
/// Only runs on the 2018 edition.

Diff for: src/test/ui/typeck/issue-91334.rs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Regression test for the ICE described in issue #91334.
2+
3+
// error-pattern: this file contains an unclosed delimiter
4+
// error-pattern: expected one of
5+
// error-pattern: mismatched closing delimiter
6+
// error-pattern: mismatched types
7+
8+
#![feature(generators)]
9+
10+
fn f(){||yield(((){),

Diff for: src/test/ui/typeck/issue-91334.stderr

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
error: this file contains an unclosed delimiter
2+
--> $DIR/issue-91334.rs:10:23
3+
|
4+
LL | fn f(){||yield(((){),
5+
| - - ^
6+
| | |
7+
| | unclosed delimiter
8+
| unclosed delimiter
9+
10+
error: this file contains an unclosed delimiter
11+
--> $DIR/issue-91334.rs:10:23
12+
|
13+
LL | fn f(){||yield(((){),
14+
| - - ^
15+
| | |
16+
| | unclosed delimiter
17+
| unclosed delimiter
18+
19+
error: expected one of `)`, `,`, `.`, `?`, or an operator, found `{`
20+
--> $DIR/issue-91334.rs:10:19
21+
|
22+
LL | fn f(){||yield(((){),
23+
| ^
24+
| |
25+
| expected one of `)`, `,`, `.`, `?`, or an operator
26+
| help: missing `,`
27+
28+
error: mismatched closing delimiter: `)`
29+
--> $DIR/issue-91334.rs:10:19
30+
|
31+
LL | fn f(){||yield(((){),
32+
| - ^^ mismatched closing delimiter
33+
| | |
34+
| | unclosed delimiter
35+
| closing delimiter possibly meant for this
36+
37+
error[E0308]: mismatched types
38+
--> $DIR/issue-91334.rs:10:8
39+
|
40+
LL | fn f(){||yield(((){),
41+
| -^^^^^^^^^^^^^^^ expected `()`, found generator
42+
| |
43+
| help: try adding a return type: `-> [generator@$DIR/issue-91334.rs:10:8: 10:23]`
44+
|
45+
= note: expected unit type `()`
46+
found generator `[generator@$DIR/issue-91334.rs:10:8: 10:23]`
47+
48+
error: aborting due to 5 previous errors
49+
50+
For more information about this error, try `rustc --explain E0308`.

Diff for: src/tools/rustdoc-gui/tester.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,16 @@ async function main(argv) {
172172
}
173173
files.sort();
174174

175+
if (no_headless) {
176+
opts["jobs"] = 1;
177+
console.log("`--no-headless` option is active, disabling concurrency for running tests.");
178+
}
179+
175180
console.log(`Running ${files.length} rustdoc-gui (${opts["jobs"]} concurrently) ...`);
176181

177182
if (opts["jobs"] < 1) {
178183
process.setMaxListeners(files.length + 1);
179-
} else {
184+
} else if (!no_headless) {
180185
process.setMaxListeners(opts["jobs"] + 1);
181186
}
182187

@@ -217,9 +222,7 @@ async function main(argv) {
217222
tests_queue.splice(tests_queue.indexOf(callback), 1);
218223
});
219224
tests_queue.push(callback);
220-
if (no_headless) {
221-
await tests_queue[i];
222-
} else if (opts["jobs"] > 0 && tests_queue.length >= opts["jobs"]) {
225+
if (opts["jobs"] > 0 && tests_queue.length >= opts["jobs"]) {
223226
await Promise.race(tests_queue);
224227
}
225228
}

0 commit comments

Comments
 (0)