about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-25 18:58:30 +0000
committerbors <bors@rust-lang.org>2023-07-25 18:58:30 +0000
commit18fa7b9104aad0cbaba6d9aff8e19d6b96eedcef (patch)
tree6b74f079ab3642d1caa9c38920de1f0e5ddab37b /src
parent8327047b23dc1eb150fdfb42177939388661eb6d (diff)
parentba6982b8a00e08f859479d16c776c0d9693e8937 (diff)
Auto merge of #114063 - matthiaskrgr:rollup-c90czu6, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #114008 (coverage: Obtain the `__llvm_covfun` section name outside a per-function loop)
 - #114014 (builtin_macros: expect raw strings too)
 - #114043 (docs(LazyLock): add example pass local LazyLock variable to struct)
 - #114051 (Add regression test for invalid "unused const" in method)
 - #114052 (Suggest `{Option,Result}::as_ref()` instead of `cloned()` in some cases)
 - #114058 (Add help for crate arg when crate name is invalid)
 - #114060 (abi: unsized field in union - assert to delay bug )

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src')
-rw-r--r--src/tools/clippy/clippy_lints/src/strings.rs2
-rw-r--r--src/tools/tidy/src/ui_tests.rs4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/tools/clippy/clippy_lints/src/strings.rs b/src/tools/clippy/clippy_lints/src/strings.rs
index 58724852b3c..4d45091f4b5 100644
--- a/src/tools/clippy/clippy_lints/src/strings.rs
+++ b/src/tools/clippy/clippy_lints/src/strings.rs
@@ -328,7 +328,7 @@ impl<'tcx> LateLintPass<'tcx> for StringLitAsBytes {
                     {
                         // Don't lint. Byte strings produce `&[u8; N]` whereas `as_bytes()` produces
                         // `&[u8]`. This change would prevent matching with different sized slices.
-                    } else {
+                    } else if !callsite.starts_with("env!") {
                         span_lint_and_sugg(
                             cx,
                             STRING_LIT_AS_BYTES,
diff --git a/src/tools/tidy/src/ui_tests.rs b/src/tools/tidy/src/ui_tests.rs
index c3a63952841..18cee7d3d5c 100644
--- a/src/tools/tidy/src/ui_tests.rs
+++ b/src/tools/tidy/src/ui_tests.rs
@@ -116,7 +116,9 @@ pub fn check(path: &Path, bad: &mut bool) {
                 // must strip all of them.
                 let testname =
                     file_path.file_name().unwrap().to_str().unwrap().split_once('.').unwrap().0;
-                if !file_path.with_file_name(testname).with_extension("rs").exists() {
+                if !file_path.with_file_name(testname).with_extension("rs").exists()
+                    && !testname.contains("ignore-tidy")
+                {
                     tidy_error!(bad, "Stray file with UI testing output: {:?}", file_path);
                 }