diff options
| author | bors <bors@rust-lang.org> | 2024-07-30 21:50:34 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-07-30 21:50:34 +0000 |
| commit | 249cf71f11a29b3fb68e8a35969569d8bb7958ee (patch) | |
| tree | 2f6c8a18af5a4fb77d189426118c3605667df0a0 /src | |
| parent | f8060d282d42770fadd73905e3eefb85660d3278 (diff) | |
| parent | 42a0cc8e71597635b34440b2a7c4bf031a838c85 (diff) | |
| download | rust-249cf71f11a29b3fb68e8a35969569d8bb7958ee.tar.gz rust-249cf71f11a29b3fb68e8a35969569d8bb7958ee.zip | |
Auto merge of #128413 - matthiaskrgr:rollup-nrfcvdq, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #128357 (Detect non-lifetime binder params shadowing item params) - #128367 (CI: rfl: build the generated doctests and documentation) - #128376 (Mark `Parser::eat`/`check` methods as `#[must_use]`) - #128379 (the output in stderr expects panic-unwind) - #128380 (make `///` doc comments compatible with naked functions) - #128382 (cargo-miri: better error when we seem to run inside bootstrap but something is wrong) - #128398 (tidy: Fix quote in error message) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src')
| -rwxr-xr-x | src/ci/docker/scripts/rfl-build.sh | 6 | ||||
| -rw-r--r-- | src/tools/miri/cargo-miri/src/setup.rs | 5 | ||||
| -rw-r--r-- | src/tools/rustfmt/src/parse/macros/lazy_static.rs | 12 | ||||
| -rw-r--r-- | src/tools/tidy/src/error_codes.rs | 2 |
4 files changed, 17 insertions, 8 deletions
diff --git a/src/ci/docker/scripts/rfl-build.sh b/src/ci/docker/scripts/rfl-build.sh index 3acc09e0b9b..d690aac27fa 100755 --- a/src/ci/docker/scripts/rfl-build.sh +++ b/src/ci/docker/scripts/rfl-build.sh @@ -65,4 +65,8 @@ make -C linux LLVM=1 -j$(($(nproc) + 1)) \ make -C linux LLVM=1 -j$(($(nproc) + 1)) \ samples/rust/rust_minimal.o \ samples/rust/rust_print.o \ - drivers/net/phy/ax88796b_rust.o + drivers/net/phy/ax88796b_rust.o \ + rust/doctests_kernel_generated.o + +make -C linux LLVM=1 -j$(($(nproc) + 1)) \ + rustdoc diff --git a/src/tools/miri/cargo-miri/src/setup.rs b/src/tools/miri/cargo-miri/src/setup.rs index fe67aad465c..0cf6f1a375c 100644 --- a/src/tools/miri/cargo-miri/src/setup.rs +++ b/src/tools/miri/cargo-miri/src/setup.rs @@ -100,7 +100,10 @@ pub fn setup( // for target crates. let cargo_miri_path = std::env::current_exe().expect("current executable path invalid"); if env::var_os("RUSTC_STAGE").is_some() { - assert!(env::var_os("RUSTC").is_some()); + assert!( + env::var_os("RUSTC").is_some() && env::var_os("RUSTC_WRAPPER").is_some(), + "cargo-miri setup is running inside rustc bootstrap but RUSTC or RUST_WRAPPER is not set" + ); command.env("RUSTC_REAL", &cargo_miri_path); } else { command.env("RUSTC", &cargo_miri_path); diff --git a/src/tools/rustfmt/src/parse/macros/lazy_static.rs b/src/tools/rustfmt/src/parse/macros/lazy_static.rs index 7baac247e22..b6de5f8691c 100644 --- a/src/tools/rustfmt/src/parse/macros/lazy_static.rs +++ b/src/tools/rustfmt/src/parse/macros/lazy_static.rs @@ -33,15 +33,17 @@ pub(crate) fn parse_lazy_static( } while parser.token.kind != TokenKind::Eof { // Parse a `lazy_static!` item. + // FIXME: These `eat_*` calls should be converted to `parse_or` to avoid + // silently formatting malformed lazy-statics. let vis = parse_or!(parse_visibility, rustc_parse::parser::FollowedByType::No); - parser.eat_keyword(kw::Static); - parser.eat_keyword(kw::Ref); + let _ = parser.eat_keyword(kw::Static); + let _ = parser.eat_keyword(kw::Ref); let id = parse_or!(parse_ident); - parser.eat(&TokenKind::Colon); + let _ = parser.eat(&TokenKind::Colon); let ty = parse_or!(parse_ty); - parser.eat(&TokenKind::Eq); + let _ = parser.eat(&TokenKind::Eq); let expr = parse_or!(parse_expr); - parser.eat(&TokenKind::Semi); + let _ = parser.eat(&TokenKind::Semi); result.push((vis, id, ty, expr)); } diff --git a/src/tools/tidy/src/error_codes.rs b/src/tools/tidy/src/error_codes.rs index 8ddacc07c6f..e2d1b85797f 100644 --- a/src/tools/tidy/src/error_codes.rs +++ b/src/tools/tidy/src/error_codes.rs @@ -319,7 +319,7 @@ fn check_error_codes_tests( if !found_code { verbose_print!( verbose, - "warning: Error code {code}`` has a UI test file, but doesn't contain its own error code!" + "warning: Error code `{code}` has a UI test file, but doesn't contain its own error code!" ); } } |
