From 1ddb4d0062fbe55b88e55cffc00fe8b898512536 Mon Sep 17 00:00:00 2001 From: Michael Rieder Date: Fri, 4 Apr 2025 10:01:37 +0200 Subject: [PATCH 01/19] Fix parameter order for `_by()` variants of `min` / `max`/ `minmax` in `std::cmp` --- library/core/src/cmp.rs | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/library/core/src/cmp.rs b/library/core/src/cmp.rs index c315131f4136c..b407dc5f6ef1d 100644 --- a/library/core/src/cmp.rs +++ b/library/core/src/cmp.rs @@ -1552,6 +1552,9 @@ pub fn min(v1: T, v2: T) -> T { /// /// Returns the first argument if the comparison determines them to be equal. /// +/// The parameter order is preserved when calling the `compare` function, i.e. `v1` is +/// always passed as the first argument and `v2` as the second. +/// /// # Examples /// /// ``` @@ -1567,12 +1570,17 @@ pub fn min(v1: T, v2: T) -> T { /// /// let result = cmp::min_by(1, -1, abs_cmp); /// assert_eq!(result, 1); +/// +/// let rhs_abs_cmp = |x: &i32, y: &i32| x.cmp(&y.abs()); +/// +/// let result = cmp::min_by(-2, 1, rhs_abs_cmp); +/// assert_eq!(result, -2); /// ``` #[inline] #[must_use] #[stable(feature = "cmp_min_max_by", since = "1.53.0")] pub fn min_by Ordering>(v1: T, v2: T, compare: F) -> T { - if compare(&v2, &v1).is_lt() { v2 } else { v1 } + if compare(&v1, &v2).is_le() { v1 } else { v2 } } /// Returns the element that gives the minimum value from the specified function. @@ -1644,6 +1652,9 @@ pub fn max(v1: T, v2: T) -> T { /// /// Returns the second argument if the comparison determines them to be equal. /// +/// The parameter order is preserved when calling the `compare` function, i.e. `v1` is +/// always passed as the first argument and `v2` as the second. +/// /// # Examples /// /// ``` @@ -1659,12 +1670,17 @@ pub fn max(v1: T, v2: T) -> T { /// /// let result = cmp::max_by(1, -1, abs_cmp); /// assert_eq!(result, -1); +/// +/// let rhs_abs_cmp = |x: &i32, y: &i32| x.cmp(&y.abs()); +/// +/// let result = cmp::max_by(-2, 1, rhs_abs_cmp); +/// assert_eq!(result, 1); /// ``` #[inline] #[must_use] #[stable(feature = "cmp_min_max_by", since = "1.53.0")] pub fn max_by Ordering>(v1: T, v2: T, compare: F) -> T { - if compare(&v2, &v1).is_lt() { v1 } else { v2 } + if compare(&v1, &v2).is_gt() { v1 } else { v2 } } /// Returns the element that gives the maximum value from the specified function. @@ -1743,6 +1759,9 @@ where /// /// Returns `[v1, v2]` if the comparison determines them to be equal. /// +/// The parameter order is preserved when calling the `compare` function, i.e. `v1` is +/// always passed as the first argument and `v2` as the second. +/// /// # Examples /// /// ``` @@ -1755,6 +1774,10 @@ where /// assert_eq!(cmp::minmax_by(-1, 2, abs_cmp), [-1, 2]); /// assert_eq!(cmp::minmax_by(-2, 2, abs_cmp), [-2, 2]); /// +/// let rhs_abs_cmp = |x: &i32, y: &i32| x.cmp(&y.abs()); +/// +/// assert_eq!(cmp::minmax_by(-2, 1, rhs_abs_cmp), [-2, 1]); +/// /// // You can destructure the result using array patterns /// let [min, max] = cmp::minmax_by(-42, 17, abs_cmp); /// assert_eq!(min, 17); @@ -1767,7 +1790,7 @@ pub fn minmax_by(v1: T, v2: T, compare: F) -> [T; 2] where F: FnOnce(&T, &T) -> Ordering, { - if compare(&v2, &v1).is_lt() { [v2, v1] } else { [v1, v2] } + if compare(&v1, &v2).is_le() { [v1, v2] } else { [v2, v1] } } /// Returns minimum and maximum values with respect to the specified key function. From d78e7628d1376d1fe1feaff4079f590ba305aac9 Mon Sep 17 00:00:00 2001 From: binarycat Date: Fri, 25 Apr 2025 15:26:52 -0500 Subject: [PATCH 02/19] scrape-examples.js: give each function a signature --- .../html/static/js/scrape-examples.js | 33 ++++++++++++++----- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/src/librustdoc/html/static/js/scrape-examples.js b/src/librustdoc/html/static/js/scrape-examples.js index d641405c87532..7ffa5d5b42a7d 100644 --- a/src/librustdoc/html/static/js/scrape-examples.js +++ b/src/librustdoc/html/static/js/scrape-examples.js @@ -1,7 +1,4 @@ -/* global addClass, hasClass, removeClass, onEachLazy */ - -// Eventually fix this. -// @ts-nocheck +/* global addClass, hasClass, removeClass, onEachLazy, nonnull */ "use strict"; @@ -14,7 +11,12 @@ const DEFAULT_MAX_LINES = 5; const HIDDEN_MAX_LINES = 10; - // Scroll code block to the given code location + /** + * Scroll code block to the given code location + * @param {HTMLElement} elt + * @param {[number, number]} loc + * @param {boolean} isHidden + */ function scrollToLoc(elt, loc, isHidden) { const lines = elt.querySelectorAll("[data-nosnippet]"); let scrollOffset; @@ -35,10 +37,15 @@ scrollOffset = offsetMid - halfHeight; } - lines[0].parentElement.scrollTo(0, scrollOffset); - elt.querySelector(".rust").scrollTo(0, scrollOffset); + nonnull(lines[0].parentElement).scrollTo(0, scrollOffset); + nonnull(elt.querySelector(".rust")).scrollTo(0, scrollOffset); } + /** + * @param {HTMLElement} parent + * @param {string} className + * @param {string} content + */ function createScrapeButton(parent, className, content) { const button = document.createElement("button"); button.className = className; @@ -50,14 +57,15 @@ window.updateScrapedExample = (example, buttonHolder) => { let locIndex = 0; const highlights = Array.prototype.slice.call(example.querySelectorAll(".highlight")); - const link = example.querySelector(".scraped-example-title a"); + const link = nonnull(example.querySelector(".scraped-example-title a")); let expandButton = null; if (!example.classList.contains("expanded")) { expandButton = createScrapeButton(buttonHolder, "expand", "Show all"); } - const isHidden = example.parentElement.classList.contains("more-scraped-examples"); + const isHidden = nonnull(example.parentElement).classList.contains("more-scraped-examples"); + // @ts-expect-error const locs = example.locs; if (locs.length > 1) { const next = createScrapeButton(buttonHolder, "next", "Next usage"); @@ -106,7 +114,14 @@ } }; + /** + * Intitialize the `locs` field + * + * @param {HTMLElement} example + * @param {boolean} isHidden + */ function setupLoc(example, isHidden) { + // @ts-expect-error example.locs = JSON.parse(example.attributes.getNamedItem("data-locs").textContent); // Start with the first example in view scrollToLoc(example, example.locs[0][0], isHidden); From b4c77e12408a3ae05ef6779eff0d8af3613716e4 Mon Sep 17 00:00:00 2001 From: binarycat Date: Fri, 25 Apr 2025 16:16:18 -0500 Subject: [PATCH 03/19] rustdoc js: add ScrapedLoc type --- src/librustdoc/html/static/js/rustdoc.d.ts | 7 +++++++ src/librustdoc/html/static/js/scrape-examples.js | 13 +++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/librustdoc/html/static/js/rustdoc.d.ts b/src/librustdoc/html/static/js/rustdoc.d.ts index 0d2e19e019f34..a10f724149204 100644 --- a/src/librustdoc/html/static/js/rustdoc.d.ts +++ b/src/librustdoc/html/static/js/rustdoc.d.ts @@ -491,4 +491,11 @@ declare namespace rustdoc { options?: string[], default: string | boolean, } + + /** + * Single element in the data-locs field of a scraped example. + * First field is the start and end char index, + * other fields seem to be unused. + */ + type ScrapedLoc = [[number, number], string, string] } diff --git a/src/librustdoc/html/static/js/scrape-examples.js b/src/librustdoc/html/static/js/scrape-examples.js index 7ffa5d5b42a7d..32642799d8871 100644 --- a/src/librustdoc/html/static/js/scrape-examples.js +++ b/src/librustdoc/html/static/js/scrape-examples.js @@ -18,6 +18,9 @@ * @param {boolean} isHidden */ function scrollToLoc(elt, loc, isHidden) { + /** @type {HTMLElement[]} */ + // blocked on https://github.com/microsoft/TypeScript/issues/29037 + // @ts-expect-error const lines = elt.querySelectorAll("[data-nosnippet]"); let scrollOffset; @@ -57,6 +60,8 @@ window.updateScrapedExample = (example, buttonHolder) => { let locIndex = 0; const highlights = Array.prototype.slice.call(example.querySelectorAll(".highlight")); + + /** @type {HTMLAnchorElement} */ const link = nonnull(example.querySelector(".scraped-example-title a")); let expandButton = null; @@ -72,6 +77,7 @@ const prev = createScrapeButton(buttonHolder, "prev", "Previous usage"); // Toggle through list of examples in a given file + /** @type {function(function(): void): void} */ const onChangeLoc = changeIndex => { removeClass(highlights[locIndex], "focus"); changeIndex(); @@ -117,14 +123,13 @@ /** * Intitialize the `locs` field * - * @param {HTMLElement} example + * @param {HTMLElement & {locs?: rustdoc.ScrapedLoc[]}} example * @param {boolean} isHidden */ function setupLoc(example, isHidden) { - // @ts-expect-error - example.locs = JSON.parse(example.attributes.getNamedItem("data-locs").textContent); + const locs = example.locs = JSON.parse(nonnull(nonnull(example.attributes.getNamedItem("data-locs")).textContent)); // Start with the first example in view - scrollToLoc(example, example.locs[0][0], isHidden); + scrollToLoc(example, locs[0][0], isHidden); } const firstExamples = document.querySelectorAll(".scraped-example-list > .scraped-example"); From 35ba7dd217f3a1af420189927205d89cc2c02718 Mon Sep 17 00:00:00 2001 From: binarycat Date: Fri, 25 Apr 2025 16:28:50 -0500 Subject: [PATCH 04/19] rustdoc js: add rustdoc.ScrapedLoc type --- src/librustdoc/html/static/js/rustdoc.d.ts | 2 ++ src/librustdoc/html/static/js/scrape-examples.js | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/librustdoc/html/static/js/rustdoc.d.ts b/src/librustdoc/html/static/js/rustdoc.d.ts index a10f724149204..2c0d47447c0b5 100644 --- a/src/librustdoc/html/static/js/rustdoc.d.ts +++ b/src/librustdoc/html/static/js/rustdoc.d.ts @@ -496,6 +496,8 @@ declare namespace rustdoc { * Single element in the data-locs field of a scraped example. * First field is the start and end char index, * other fields seem to be unused. + * + * generated by `render_call_locations` in `render/mod.rs`. */ type ScrapedLoc = [[number, number], string, string] } diff --git a/src/librustdoc/html/static/js/scrape-examples.js b/src/librustdoc/html/static/js/scrape-examples.js index 32642799d8871..5dab4cc015612 100644 --- a/src/librustdoc/html/static/js/scrape-examples.js +++ b/src/librustdoc/html/static/js/scrape-examples.js @@ -127,7 +127,9 @@ * @param {boolean} isHidden */ function setupLoc(example, isHidden) { - const locs = example.locs = JSON.parse(nonnull(nonnull(example.attributes.getNamedItem("data-locs")).textContent)); + const locs_str = example.attributes.getNamedItem("data-locs")).textContent; + const locs = example.locs = + JSON.parse(nonnull(nonnull(locs_str)); // Start with the first example in view scrollToLoc(example, locs[0][0], isHidden); } From 8799d3dd97e38af3e31a2e76369d647e01b8a423 Mon Sep 17 00:00:00 2001 From: binarycat Date: Mon, 28 Apr 2025 18:44:46 -0500 Subject: [PATCH 05/19] fix typo --- src/librustdoc/html/static/js/scrape-examples.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/librustdoc/html/static/js/scrape-examples.js b/src/librustdoc/html/static/js/scrape-examples.js index 5dab4cc015612..7a231dc3b7741 100644 --- a/src/librustdoc/html/static/js/scrape-examples.js +++ b/src/librustdoc/html/static/js/scrape-examples.js @@ -1,4 +1,4 @@ -/* global addClass, hasClass, removeClass, onEachLazy, nonnull */ + /* global addClass, hasClass, removeClass, onEachLazy, nonnull */ "use strict"; @@ -127,9 +127,10 @@ * @param {boolean} isHidden */ function setupLoc(example, isHidden) { - const locs_str = example.attributes.getNamedItem("data-locs")).textContent; - const locs = example.locs = - JSON.parse(nonnull(nonnull(locs_str)); + const locs_str = example.attributes.getNamedItem("data-locs").textContent; + const locs = + JSON.parse(nonnull(nonnull(locs_str))); + example.locs = locs; // Start with the first example in view scrollToLoc(example, locs[0][0], isHidden); } From b06113dc5cd6fbb2cc63918f9e861929537f41fd Mon Sep 17 00:00:00 2001 From: binarycat Date: Thu, 22 May 2025 16:14:15 -0500 Subject: [PATCH 06/19] scrape-examples.js: add another nonnull() invokation --- src/librustdoc/html/static/js/scrape-examples.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustdoc/html/static/js/scrape-examples.js b/src/librustdoc/html/static/js/scrape-examples.js index 7a231dc3b7741..ec472666ce166 100644 --- a/src/librustdoc/html/static/js/scrape-examples.js +++ b/src/librustdoc/html/static/js/scrape-examples.js @@ -127,7 +127,7 @@ * @param {boolean} isHidden */ function setupLoc(example, isHidden) { - const locs_str = example.attributes.getNamedItem("data-locs").textContent; + const locs_str = nonnull(example.attributes.getNamedItem("data-locs")).textContent; const locs = JSON.parse(nonnull(nonnull(locs_str))); example.locs = locs; From c021e7a9d2818e7d9f71bd38124d4e2c212007d6 Mon Sep 17 00:00:00 2001 From: lolbinarycat Date: Tue, 27 May 2025 12:50:14 -0500 Subject: [PATCH 07/19] scrape-examples.js: fix typos Co-authored-by: Guillaume Gomez --- src/librustdoc/html/static/js/rustdoc.d.ts | 2 +- src/librustdoc/html/static/js/scrape-examples.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustdoc/html/static/js/rustdoc.d.ts b/src/librustdoc/html/static/js/rustdoc.d.ts index 2c0d47447c0b5..686d77abde514 100644 --- a/src/librustdoc/html/static/js/rustdoc.d.ts +++ b/src/librustdoc/html/static/js/rustdoc.d.ts @@ -497,7 +497,7 @@ declare namespace rustdoc { * First field is the start and end char index, * other fields seem to be unused. * - * generated by `render_call_locations` in `render/mod.rs`. + * Generated by `render_call_locations` in `render/mod.rs`. */ type ScrapedLoc = [[number, number], string, string] } diff --git a/src/librustdoc/html/static/js/scrape-examples.js b/src/librustdoc/html/static/js/scrape-examples.js index ec472666ce166..eeab591bcd807 100644 --- a/src/librustdoc/html/static/js/scrape-examples.js +++ b/src/librustdoc/html/static/js/scrape-examples.js @@ -121,7 +121,7 @@ }; /** - * Intitialize the `locs` field + * Initialize the `locs` field * * @param {HTMLElement & {locs?: rustdoc.ScrapedLoc[]}} example * @param {boolean} isHidden From 36a38206db1757dcf899644f758e6fc5a04141ad Mon Sep 17 00:00:00 2001 From: Jake Goulding Date: Mon, 11 Aug 2025 18:40:03 -0400 Subject: [PATCH 08/19] Use aarch64-apple-darwin as the fallback doc source for `-apple-` We are moving away from `x86_64-apple-darwin`, so soon these docs won't be available. --- src/tools/build-manifest/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs index 0520eff0fa277..8f88ab10bf765 100644 --- a/src/tools/build-manifest/src/main.rs +++ b/src/tools/build-manifest/src/main.rs @@ -205,7 +205,7 @@ static TARGETS: &[&str] = &[ /// /// The order here matters, more specific entries should be first. static DOCS_FALLBACK: &[(&str, &str)] = &[ - ("-apple-", "x86_64-apple-darwin"), + ("-apple-", "aarch64-apple-darwin"), ("aarch64", "aarch64-unknown-linux-gnu"), ("arm-", "aarch64-unknown-linux-gnu"), ("", "x86_64-unknown-linux-gnu"), From c574c91e5739519b2fd3fdb5f07fa6e102705703 Mon Sep 17 00:00:00 2001 From: Jake Goulding Date: Mon, 11 Aug 2025 09:49:56 -0400 Subject: [PATCH 09/19] Demote x86_64-apple-darwin to Tier 2 with host tools Switch to only using aarch64 runners (implying we are now cross-compiling) and stop running tests. In the future, we could enable (some?) tests via Rosetta 2. --- .../src/spec/targets/x86_64_apple_darwin.rs | 2 +- src/ci/github-actions/jobs.yml | 45 +++++++------------ src/doc/rustc/src/platform-support.md | 2 +- .../src/platform-support/apple-darwin.md | 5 ++- 4 files changed, 21 insertions(+), 33 deletions(-) diff --git a/compiler/rustc_target/src/spec/targets/x86_64_apple_darwin.rs b/compiler/rustc_target/src/spec/targets/x86_64_apple_darwin.rs index 53e2cb469ee82..8892c50d84478 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_apple_darwin.rs @@ -7,7 +7,7 @@ pub(crate) fn target() -> Target { llvm_target, metadata: TargetMetadata { description: Some("x86_64 Apple macOS (10.12+, Sierra+)".into()), - tier: Some(1), + tier: Some(2), host_tools: Some(true), std: Some(true), }, diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml index ae13d14c38053..8cfcc0c5b15ef 100644 --- a/src/ci/github-actions/jobs.yml +++ b/src/ci/github-actions/jobs.yml @@ -23,10 +23,6 @@ runners: <<: *base-job - &job-macos - os: macos-13 - <<: *base-job - - - &job-macos-m1 os: macos-14 <<: *base-job @@ -68,17 +64,6 @@ runners: <<: *base-job envs: - env-x86_64-apple-tests: &env-x86_64-apple-tests - SCRIPT: ./x.py check compiletest --set build.compiletest-use-stage0-libtest=true && ./x.py --stage 2 test --skip tests/ui --skip tests/rustdoc -- --exact - RUST_CONFIGURE_ARGS: --build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc - # Ensure that host tooling is tested on our minimum supported macOS version. - MACOSX_DEPLOYMENT_TARGET: 10.12 - MACOSX_STD_DEPLOYMENT_TARGET: 10.12 - SELECT_XCODE: /Applications/Xcode_15.2.app - NO_LLVM_ASSERTIONS: 1 - NO_DEBUG_ASSERTIONS: 1 - NO_OVERFLOW_CHECKS: 1 - production: &production DEPLOY_BUCKET: rust-lang-ci2 @@ -455,8 +440,19 @@ auto: - name: dist-x86_64-apple env: - SCRIPT: ./x.py dist bootstrap --include-default-paths --host=x86_64-apple-darwin --target=x86_64-apple-darwin - RUST_CONFIGURE_ARGS: --enable-full-tools --enable-sanitizers --enable-profiler --set rust.jemalloc --set rust.lto=thin --set rust.codegen-units=1 + SCRIPT: >- + ./x.py dist bootstrap + --include-default-paths + --host=x86_64-apple-darwin + --target=x86_64-apple-darwin + RUST_CONFIGURE_ARGS: >- + --enable-full-tools + --enable-sanitizers + --enable-profiler + --disable-docs + --set rust.jemalloc + --set rust.lto=thin + --set rust.codegen-units=1 # Ensure that host tooling is built to support our minimum support macOS version. MACOSX_DEPLOYMENT_TARGET: 10.12 MACOSX_STD_DEPLOYMENT_TARGET: 10.12 @@ -482,17 +478,6 @@ auto: NO_LLVM_ASSERTIONS: 1 NO_DEBUG_ASSERTIONS: 1 NO_OVERFLOW_CHECKS: 1 - <<: *job-macos-m1 - - - name: x86_64-apple-1 - env: - <<: *env-x86_64-apple-tests - <<: *job-macos - - - name: x86_64-apple-2 - env: - SCRIPT: ./x.py --stage 2 test tests/ui tests/rustdoc - <<: *env-x86_64-apple-tests <<: *job-macos - name: dist-aarch64-apple @@ -517,7 +502,7 @@ auto: NO_OVERFLOW_CHECKS: 1 DIST_REQUIRE_ALL_TOOLS: 1 CODEGEN_BACKENDS: llvm,cranelift - <<: *job-macos-m1 + <<: *job-macos - name: aarch64-apple env: @@ -537,7 +522,7 @@ auto: NO_LLVM_ASSERTIONS: 1 NO_DEBUG_ASSERTIONS: 1 NO_OVERFLOW_CHECKS: 1 - <<: *job-macos-m1 + <<: *job-macos ###################### # Windows Builders # diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md index 89b43cda9b909..c039517a97039 100644 --- a/src/doc/rustc/src/platform-support.md +++ b/src/doc/rustc/src/platform-support.md @@ -36,7 +36,6 @@ target | notes `aarch64-unknown-linux-gnu` | ARM64 Linux (kernel 4.1+, glibc 2.17+) [`i686-pc-windows-msvc`](platform-support/windows-msvc.md) | 32-bit MSVC (Windows 10+, Windows Server 2016+, Pentium 4) [^x86_32-floats-return-ABI] [^win32-msvc-alignment] `i686-unknown-linux-gnu` | 32-bit Linux (kernel 3.2+, glibc 2.17+, Pentium 4) [^x86_32-floats-return-ABI] -[`x86_64-apple-darwin`](platform-support/apple-darwin.md) | 64-bit macOS (10.12+, Sierra+) [`x86_64-pc-windows-gnu`](platform-support/windows-gnu.md) | 64-bit MinGW (Windows 10+, Windows Server 2016+) [`x86_64-pc-windows-msvc`](platform-support/windows-msvc.md) | 64-bit MSVC (Windows 10+, Windows Server 2016+) `x86_64-unknown-linux-gnu` | 64-bit Linux (kernel 3.2+, glibc 2.17+) @@ -106,6 +105,7 @@ target | notes [`riscv64gc-unknown-linux-gnu`](platform-support/riscv64gc-unknown-linux-gnu.md) | RISC-V Linux (kernel 4.20+, glibc 2.29) [`riscv64gc-unknown-linux-musl`](platform-support/riscv64gc-unknown-linux-musl.md) | RISC-V Linux (kernel 4.20+, musl 1.2.3) [`s390x-unknown-linux-gnu`](platform-support/s390x-unknown-linux-gnu.md) | S390x Linux (kernel 3.2+, glibc 2.17) +[`x86_64-apple-darwin`](platform-support/apple-darwin.md) | 64-bit macOS (10.12+, Sierra+) [`x86_64-pc-windows-gnullvm`](platform-support/windows-gnullvm.md) | 64-bit x86 MinGW (Windows 10+), LLVM ABI [`x86_64-unknown-freebsd`](platform-support/freebsd.md) | 64-bit x86 FreeBSD [`x86_64-unknown-illumos`](platform-support/illumos.md) | illumos diff --git a/src/doc/rustc/src/platform-support/apple-darwin.md b/src/doc/rustc/src/platform-support/apple-darwin.md index e41aee9bdb248..bdbb3a663f12a 100644 --- a/src/doc/rustc/src/platform-support/apple-darwin.md +++ b/src/doc/rustc/src/platform-support/apple-darwin.md @@ -4,9 +4,12 @@ Apple macOS targets. **Tier: 1** -- `x86_64-apple-darwin`: macOS on 64-bit x86. - `aarch64-apple-darwin`: macOS on ARM64 (M1-family or later Apple Silicon CPUs). +**Tier: 2** + +- `x86_64-apple-darwin`: macOS on 64-bit x86. + ## Target maintainers [@thomcc](https://github.com/thomcc) From dc81d75d0c8a023f8f9f717d5a4a8fd6970bafc8 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 11 Aug 2025 17:03:29 +0200 Subject: [PATCH 10/19] Add new `--test-codegen-backend` bootstrap option --- src/bootstrap/src/core/build_steps/test.rs | 18 ++++++++++++++++-- src/bootstrap/src/core/builder/cargo.rs | 7 ++++++- src/bootstrap/src/core/config/config.rs | 4 ++-- src/bootstrap/src/core/config/flags.rs | 12 +++++++++++- src/bootstrap/src/lib.rs | 14 ++++++++++++++ src/bootstrap/src/utils/change_tracker.rs | 5 +++++ src/etc/completions/x.fish | 1 + src/etc/completions/x.ps1 | 1 + src/etc/completions/x.py.fish | 1 + src/etc/completions/x.py.ps1 | 1 + src/etc/completions/x.py.sh | 6 +++++- src/etc/completions/x.py.zsh | 1 + src/etc/completions/x.sh | 6 +++++- src/etc/completions/x.zsh | 1 + src/tools/compiletest/src/runtest.rs | 5 +++++ 15 files changed, 75 insertions(+), 8 deletions(-) diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index f1be0af31837b..9ec744b0cd9e9 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -1839,8 +1839,22 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the cmd.arg("--host").arg(&*compiler.host.triple); cmd.arg("--llvm-filecheck").arg(builder.llvm_filecheck(builder.config.host_target)); - if let Some(codegen_backend) = builder.config.default_codegen_backend(compiler.host) { - // Tells compiletest which codegen backend is used by default by the compiler. + if let Some(codegen_backend) = builder.config.cmd.test_codegen_backend() { + if !builder.config.enabled_codegen_backends(compiler.host).contains(codegen_backend) { + eprintln!( + "\ +ERROR: No configured backend named `{name}` +HELP: You can add it into `bootstrap.toml` in `rust.codegen-backends = [{name:?}]`", + name = codegen_backend.name(), + ); + crate::exit!(1); + } + // Tells compiletest which codegen backend to use. + // It is used to e.g. ignore tests that don't support that codegen backend. + cmd.arg("--codegen-backend").arg(codegen_backend.name()); + } else if let Some(codegen_backend) = builder.config.default_codegen_backend(compiler.host) + { + // Tells compiletest which codegen backend to use. // It is used to e.g. ignore tests that don't support that codegen backend. cmd.arg("--codegen-backend").arg(codegen_backend.name()); } diff --git a/src/bootstrap/src/core/builder/cargo.rs b/src/bootstrap/src/core/builder/cargo.rs index 757b9277ec65d..9b7e73477744a 100644 --- a/src/bootstrap/src/core/builder/cargo.rs +++ b/src/bootstrap/src/core/builder/cargo.rs @@ -1292,7 +1292,12 @@ impl Builder<'_> { if let Some(limit) = limit && (build_compiler_stage == 0 - || self.config.default_codegen_backend(target).unwrap_or_default().is_llvm()) + || self + .config + .default_codegen_backend(target) + .cloned() + .unwrap_or_default() + .is_llvm()) { rustflags.arg(&format!("-Cllvm-args=-import-instr-limit={limit}")); } diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs index 9ced81e1e283d..6fb49c8787813 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs @@ -1755,8 +1755,8 @@ impl Config { /// Returns the codegen backend that should be configured as the *default* codegen backend /// for a rustc compiled by bootstrap. - pub fn default_codegen_backend(&self, target: TargetSelection) -> Option { - self.enabled_codegen_backends(target).first().cloned() + pub fn default_codegen_backend(&self, target: TargetSelection) -> Option<&CodegenBackendKind> { + self.enabled_codegen_backends(target).first() } pub fn jemalloc(&self, target: TargetSelection) -> bool { diff --git a/src/bootstrap/src/core/config/flags.rs b/src/bootstrap/src/core/config/flags.rs index 31a427f9ffaac..98ee5bbfadbdb 100644 --- a/src/bootstrap/src/core/config/flags.rs +++ b/src/bootstrap/src/core/config/flags.rs @@ -15,7 +15,7 @@ use crate::core::build_steps::setup::Profile; use crate::core::builder::{Builder, Kind}; use crate::core::config::Config; use crate::core::config::target_selection::{TargetSelectionList, target_selection_list}; -use crate::{Build, DocTests}; +use crate::{Build, CodegenBackendKind, DocTests}; #[derive(Copy, Clone, Default, Debug, ValueEnum)] pub enum Color { @@ -413,6 +413,9 @@ pub enum Subcommand { #[arg(long)] /// don't capture stdout/stderr of tests no_capture: bool, + #[arg(long)] + /// Use a different codegen backend when running tests. + test_codegen_backend: Option, }, /// Build and run some test suites *in Miri* Miri { @@ -639,6 +642,13 @@ impl Subcommand { _ => vec![], } } + + pub fn test_codegen_backend(&self) -> Option<&CodegenBackendKind> { + match self { + Subcommand::Test { test_codegen_backend, .. } => test_codegen_backend.as_ref(), + _ => None, + } + } } /// Returns the shell completion for a given shell, if the result differs from the current diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs index 0b65ebc067189..74f017275ad40 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs @@ -163,6 +163,20 @@ impl CodegenBackendKind { } } +impl std::str::FromStr for CodegenBackendKind { + type Err = &'static str; + + fn from_str(s: &str) -> Result { + match s.to_lowercase().as_str() { + "" => Err("Invalid empty backend name"), + "gcc" => Ok(Self::Gcc), + "llvm" => Ok(Self::Llvm), + "cranelift" => Ok(Self::Cranelift), + _ => Ok(Self::Custom(s.to_string())), + } + } +} + #[derive(PartialEq, Eq, Copy, Clone, Debug)] pub enum DocTests { /// Run normal tests and doc tests (default). diff --git a/src/bootstrap/src/utils/change_tracker.rs b/src/bootstrap/src/utils/change_tracker.rs index b454a8ddefb35..b367a617eae1c 100644 --- a/src/bootstrap/src/utils/change_tracker.rs +++ b/src/bootstrap/src/utils/change_tracker.rs @@ -506,4 +506,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[ severity: ChangeSeverity::Warning, summary: "It is no longer possible to `x clippy` with stage 0. All clippy commands have to be on stage 1+.", }, + ChangeInfo { + change_id: 145256, + severity: ChangeSeverity::Info, + summary: "Added `--test-codegen-backend` CLI option for tests", + }, ]; diff --git a/src/etc/completions/x.fish b/src/etc/completions/x.fish index a5e5bb8f09e81..3a587c8e37133 100644 --- a/src/etc/completions/x.fish +++ b/src/etc/completions/x.fish @@ -303,6 +303,7 @@ complete -c x -n "__fish_x_using_subcommand test" -l extra-checks -d 'comma-sepa complete -c x -n "__fish_x_using_subcommand test" -l compare-mode -d 'mode describing what file the actual ui output will be compared to' -r complete -c x -n "__fish_x_using_subcommand test" -l pass -d 'force {check,build,run}-pass tests to this mode' -r complete -c x -n "__fish_x_using_subcommand test" -l run -d 'whether to execute run-* tests' -r +complete -c x -n "__fish_x_using_subcommand test" -l test-codegen-backend -d 'Use a different codegen backend when running tests' -r complete -c x -n "__fish_x_using_subcommand test" -l config -d 'TOML configuration file for build' -r -F complete -c x -n "__fish_x_using_subcommand test" -l build-dir -d 'Build directory, overrides `build.build-dir` in `bootstrap.toml`' -r -f -a "(__fish_complete_directories)" complete -c x -n "__fish_x_using_subcommand test" -l build -d 'host target of the stage0 compiler' -r -f diff --git a/src/etc/completions/x.ps1 b/src/etc/completions/x.ps1 index 4fee3bc0a8692..8e9b9b13fa071 100644 --- a/src/etc/completions/x.ps1 +++ b/src/etc/completions/x.ps1 @@ -349,6 +349,7 @@ Register-ArgumentCompleter -Native -CommandName 'x' -ScriptBlock { [CompletionResult]::new('--compare-mode', '--compare-mode', [CompletionResultType]::ParameterName, 'mode describing what file the actual ui output will be compared to') [CompletionResult]::new('--pass', '--pass', [CompletionResultType]::ParameterName, 'force {check,build,run}-pass tests to this mode') [CompletionResult]::new('--run', '--run', [CompletionResultType]::ParameterName, 'whether to execute run-* tests') + [CompletionResult]::new('--test-codegen-backend', '--test-codegen-backend', [CompletionResultType]::ParameterName, 'Use a different codegen backend when running tests') [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'TOML configuration file for build') [CompletionResult]::new('--build-dir', '--build-dir', [CompletionResultType]::ParameterName, 'Build directory, overrides `build.build-dir` in `bootstrap.toml`') [CompletionResult]::new('--build', '--build', [CompletionResultType]::ParameterName, 'host target of the stage0 compiler') diff --git a/src/etc/completions/x.py.fish b/src/etc/completions/x.py.fish index e2e6ae05ee03d..469371c57fc2f 100644 --- a/src/etc/completions/x.py.fish +++ b/src/etc/completions/x.py.fish @@ -303,6 +303,7 @@ complete -c x.py -n "__fish_x.py_using_subcommand test" -l extra-checks -d 'comm complete -c x.py -n "__fish_x.py_using_subcommand test" -l compare-mode -d 'mode describing what file the actual ui output will be compared to' -r complete -c x.py -n "__fish_x.py_using_subcommand test" -l pass -d 'force {check,build,run}-pass tests to this mode' -r complete -c x.py -n "__fish_x.py_using_subcommand test" -l run -d 'whether to execute run-* tests' -r +complete -c x.py -n "__fish_x.py_using_subcommand test" -l test-codegen-backend -d 'Use a different codegen backend when running tests' -r complete -c x.py -n "__fish_x.py_using_subcommand test" -l config -d 'TOML configuration file for build' -r -F complete -c x.py -n "__fish_x.py_using_subcommand test" -l build-dir -d 'Build directory, overrides `build.build-dir` in `bootstrap.toml`' -r -f -a "(__fish_complete_directories)" complete -c x.py -n "__fish_x.py_using_subcommand test" -l build -d 'host target of the stage0 compiler' -r -f diff --git a/src/etc/completions/x.py.ps1 b/src/etc/completions/x.py.ps1 index ea3aacc21c7ac..7b65e64572d15 100644 --- a/src/etc/completions/x.py.ps1 +++ b/src/etc/completions/x.py.ps1 @@ -349,6 +349,7 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock { [CompletionResult]::new('--compare-mode', '--compare-mode', [CompletionResultType]::ParameterName, 'mode describing what file the actual ui output will be compared to') [CompletionResult]::new('--pass', '--pass', [CompletionResultType]::ParameterName, 'force {check,build,run}-pass tests to this mode') [CompletionResult]::new('--run', '--run', [CompletionResultType]::ParameterName, 'whether to execute run-* tests') + [CompletionResult]::new('--test-codegen-backend', '--test-codegen-backend', [CompletionResultType]::ParameterName, 'Use a different codegen backend when running tests') [CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'TOML configuration file for build') [CompletionResult]::new('--build-dir', '--build-dir', [CompletionResultType]::ParameterName, 'Build directory, overrides `build.build-dir` in `bootstrap.toml`') [CompletionResult]::new('--build', '--build', [CompletionResultType]::ParameterName, 'host target of the stage0 compiler') diff --git a/src/etc/completions/x.py.sh b/src/etc/completions/x.py.sh index f31bdb58dc448..a3c32f9db95d3 100644 --- a/src/etc/completions/x.py.sh +++ b/src/etc/completions/x.py.sh @@ -3875,7 +3875,7 @@ _x.py() { return 0 ;; x.py__test) - opts="-v -i -j -h --no-fail-fast --test-args --compiletest-rustc-args --no-doc --doc --bless --extra-checks --force-rerun --only-modified --compare-mode --pass --run --rustfix-coverage --no-capture --verbose --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." + opts="-v -i -j -h --no-fail-fast --test-args --compiletest-rustc-args --no-doc --doc --bless --extra-checks --force-rerun --only-modified --compare-mode --pass --run --rustfix-coverage --no-capture --test-codegen-backend --verbose --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -3905,6 +3905,10 @@ _x.py() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --test-codegen-backend) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; --config) local oldifs if [ -n "${IFS+x}" ]; then diff --git a/src/etc/completions/x.py.zsh b/src/etc/completions/x.py.zsh index 32e986ad141fa..5b6a8ab273d45 100644 --- a/src/etc/completions/x.py.zsh +++ b/src/etc/completions/x.py.zsh @@ -349,6 +349,7 @@ _arguments "${_arguments_options[@]}" : \ '--compare-mode=[mode describing what file the actual ui output will be compared to]:COMPARE MODE:_default' \ '--pass=[force {check,build,run}-pass tests to this mode]:check | build | run:_default' \ '--run=[whether to execute run-* tests]:auto | always | never:_default' \ +'--test-codegen-backend=[Use a different codegen backend when running tests]:TEST_CODEGEN_BACKEND:_default' \ '--config=[TOML configuration file for build]:FILE:_files' \ '--build-dir=[Build directory, overrides \`build.build-dir\` in \`bootstrap.toml\`]:DIR:_files -/' \ '--build=[host target of the stage0 compiler]:BUILD:' \ diff --git a/src/etc/completions/x.sh b/src/etc/completions/x.sh index 927d8f7661cd3..07de7dd1905ee 100644 --- a/src/etc/completions/x.sh +++ b/src/etc/completions/x.sh @@ -3875,7 +3875,7 @@ _x() { return 0 ;; x__test) - opts="-v -i -j -h --no-fail-fast --test-args --compiletest-rustc-args --no-doc --doc --bless --extra-checks --force-rerun --only-modified --compare-mode --pass --run --rustfix-coverage --no-capture --verbose --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." + opts="-v -i -j -h --no-fail-fast --test-args --compiletest-rustc-args --no-doc --doc --bless --extra-checks --force-rerun --only-modified --compare-mode --pass --run --rustfix-coverage --no-capture --test-codegen-backend --verbose --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -3905,6 +3905,10 @@ _x() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --test-codegen-backend) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; --config) local oldifs if [ -n "${IFS+x}" ]; then diff --git a/src/etc/completions/x.zsh b/src/etc/completions/x.zsh index 65995553276d9..9453eafb35abc 100644 --- a/src/etc/completions/x.zsh +++ b/src/etc/completions/x.zsh @@ -349,6 +349,7 @@ _arguments "${_arguments_options[@]}" : \ '--compare-mode=[mode describing what file the actual ui output will be compared to]:COMPARE MODE:_default' \ '--pass=[force {check,build,run}-pass tests to this mode]:check | build | run:_default' \ '--run=[whether to execute run-* tests]:auto | always | never:_default' \ +'--test-codegen-backend=[Use a different codegen backend when running tests]:TEST_CODEGEN_BACKEND:_default' \ '--config=[TOML configuration file for build]:FILE:_files' \ '--build-dir=[Build directory, overrides \`build.build-dir\` in \`bootstrap.toml\`]:DIR:_files -/' \ '--build=[host target of the stage0 compiler]:BUILD:' \ diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index be4663fffbe36..6d3bb90e83d8e 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -1558,6 +1558,11 @@ impl<'test> TestCx<'test> { rustc.arg("--sysroot").arg(&self.config.sysroot_base); } + // If the provided codegen backend is not LLVM, we need to pass it. + if !matches!(self.config.codegen_backend, crate::CodegenBackend::Llvm) { + rustc.arg(format!("-Zcodegen-backend={}", self.config.codegen_backend.as_str())); + } + // Optionally prevent default --target if specified in test compile-flags. let custom_target = self.props.compile_flags.iter().any(|x| x.starts_with("--target")); From 73d3d28bed6ba874041410e7cd7ac09091e412a0 Mon Sep 17 00:00:00 2001 From: Alexandre Courbot Date: Sun, 10 Aug 2025 22:19:32 +0900 Subject: [PATCH 11/19] Implement feature `int_lowest_highest_one` for integer and NonZero types Implement the accepted ACP for methods that find the index of the least significant (lowest) and most significant (highest) set bit in an integer for signed, unsigned, and NonZero types. Also add unit tests for all these types. --- library/core/src/num/int_macros.rs | 42 ++++++++ library/core/src/num/nonzero.rs | 48 +++++++++ library/core/src/num/uint_macros.rs | 48 +++++++++ library/coretests/tests/lib.rs | 1 + library/coretests/tests/nonzero.rs | 108 +++++++++++++++++++++ library/coretests/tests/num/int_macros.rs | 40 ++++++++ library/coretests/tests/num/uint_macros.rs | 34 +++++++ 7 files changed, 321 insertions(+) diff --git a/library/core/src/num/int_macros.rs b/library/core/src/num/int_macros.rs index bd2f7445612a7..a4efbaf6ad23c 100644 --- a/library/core/src/num/int_macros.rs +++ b/library/core/src/num/int_macros.rs @@ -209,6 +209,48 @@ macro_rules! int_impl { self & self.wrapping_neg() } + /// Returns the index of the highest bit set to one in `self`, or `None` + /// if `self` is `0`. + /// + /// # Examples + /// + /// ``` + /// #![feature(int_lowest_highest_one)] + /// + #[doc = concat!("assert_eq!(0x0_", stringify!($SelfT), ".highest_one(), None);")] + #[doc = concat!("assert_eq!(0x1_", stringify!($SelfT), ".highest_one(), Some(0));")] + #[doc = concat!("assert_eq!(0x10_", stringify!($SelfT), ".highest_one(), Some(4));")] + #[doc = concat!("assert_eq!(0x1f_", stringify!($SelfT), ".highest_one(), Some(4));")] + /// ``` + #[unstable(feature = "int_lowest_highest_one", issue = "145203")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] + #[inline(always)] + pub const fn highest_one(self) -> Option { + (self as $UnsignedT).highest_one() + } + + /// Returns the index of the lowest bit set to one in `self`, or `None` + /// if `self` is `0`. + /// + /// # Examples + /// + /// ``` + /// #![feature(int_lowest_highest_one)] + /// + #[doc = concat!("assert_eq!(0x0_", stringify!($SelfT), ".lowest_one(), None);")] + #[doc = concat!("assert_eq!(0x1_", stringify!($SelfT), ".lowest_one(), Some(0));")] + #[doc = concat!("assert_eq!(0x10_", stringify!($SelfT), ".lowest_one(), Some(4));")] + #[doc = concat!("assert_eq!(0x1f_", stringify!($SelfT), ".lowest_one(), Some(0));")] + /// ``` + #[unstable(feature = "int_lowest_highest_one", issue = "145203")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] + #[inline(always)] + pub const fn lowest_one(self) -> Option { + (self as $UnsignedT).lowest_one() + } + /// Returns the bit pattern of `self` reinterpreted as an unsigned integer of the same size. /// /// This produces the same result as an `as` cast, but ensures that the bit-width remains diff --git a/library/core/src/num/nonzero.rs b/library/core/src/num/nonzero.rs index 308d722f5d564..e02d9260a1690 100644 --- a/library/core/src/num/nonzero.rs +++ b/library/core/src/num/nonzero.rs @@ -681,6 +681,54 @@ macro_rules! nonzero_integer { unsafe { NonZero::new_unchecked(n) } } + /// Returns the index of the highest bit set to one in `self`. + /// + /// # Examples + /// + /// ``` + /// #![feature(int_lowest_highest_one)] + /// + /// # use core::num::NonZero; + /// # fn main() { test().unwrap(); } + /// # fn test() -> Option<()> { + #[doc = concat!("assert_eq!(NonZero::<", stringify!($Int), ">::new(0x1)?.highest_one(), 0);")] + #[doc = concat!("assert_eq!(NonZero::<", stringify!($Int), ">::new(0x10)?.highest_one(), 4);")] + #[doc = concat!("assert_eq!(NonZero::<", stringify!($Int), ">::new(0x1f)?.highest_one(), 4);")] + /// # Some(()) + /// # } + /// ``` + #[unstable(feature = "int_lowest_highest_one", issue = "145203")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] + #[inline(always)] + pub const fn highest_one(self) -> u32 { + Self::BITS - 1 - self.leading_zeros() + } + + /// Returns the index of the lowest bit set to one in `self`. + /// + /// # Examples + /// + /// ``` + /// #![feature(int_lowest_highest_one)] + /// + /// # use core::num::NonZero; + /// # fn main() { test().unwrap(); } + /// # fn test() -> Option<()> { + #[doc = concat!("assert_eq!(NonZero::<", stringify!($Int), ">::new(0x1)?.lowest_one(), 0);")] + #[doc = concat!("assert_eq!(NonZero::<", stringify!($Int), ">::new(0x10)?.lowest_one(), 4);")] + #[doc = concat!("assert_eq!(NonZero::<", stringify!($Int), ">::new(0x1f)?.lowest_one(), 0);")] + /// # Some(()) + /// # } + /// ``` + #[unstable(feature = "int_lowest_highest_one", issue = "145203")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] + #[inline(always)] + pub const fn lowest_one(self) -> u32 { + self.trailing_zeros() + } + /// Returns the number of ones in the binary representation of `self`. /// /// # Examples diff --git a/library/core/src/num/uint_macros.rs b/library/core/src/num/uint_macros.rs index 2c9a119684963..34638f9a799e5 100644 --- a/library/core/src/num/uint_macros.rs +++ b/library/core/src/num/uint_macros.rs @@ -261,6 +261,54 @@ macro_rules! uint_impl { self & self.wrapping_neg() } + /// Returns the index of the highest bit set to one in `self`, or `None` + /// if `self` is `0`. + /// + /// # Examples + /// + /// ``` + /// #![feature(int_lowest_highest_one)] + /// + #[doc = concat!("assert_eq!(0x0_", stringify!($SelfT), ".highest_one(), None);")] + #[doc = concat!("assert_eq!(0x1_", stringify!($SelfT), ".highest_one(), Some(0));")] + #[doc = concat!("assert_eq!(0x10_", stringify!($SelfT), ".highest_one(), Some(4));")] + #[doc = concat!("assert_eq!(0x1f_", stringify!($SelfT), ".highest_one(), Some(4));")] + /// ``` + #[unstable(feature = "int_lowest_highest_one", issue = "145203")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] + #[inline(always)] + pub const fn highest_one(self) -> Option { + match NonZero::new(self) { + Some(v) => Some(v.highest_one()), + None => None, + } + } + + /// Returns the index of the lowest bit set to one in `self`, or `None` + /// if `self` is `0`. + /// + /// # Examples + /// + /// ``` + /// #![feature(int_lowest_highest_one)] + /// + #[doc = concat!("assert_eq!(0x0_", stringify!($SelfT), ".lowest_one(), None);")] + #[doc = concat!("assert_eq!(0x1_", stringify!($SelfT), ".lowest_one(), Some(0));")] + #[doc = concat!("assert_eq!(0x10_", stringify!($SelfT), ".lowest_one(), Some(4));")] + #[doc = concat!("assert_eq!(0x1f_", stringify!($SelfT), ".lowest_one(), Some(0));")] + /// ``` + #[unstable(feature = "int_lowest_highest_one", issue = "145203")] + #[must_use = "this returns the result of the operation, \ + without modifying the original"] + #[inline(always)] + pub const fn lowest_one(self) -> Option { + match NonZero::new(self) { + Some(v) => Some(v.lowest_one()), + None => None, + } + } + /// Returns the bit pattern of `self` reinterpreted as a signed integer of the same size. /// /// This produces the same result as an `as` cast, but ensures that the bit-width remains diff --git a/library/coretests/tests/lib.rs b/library/coretests/tests/lib.rs index 0c4d49f3c994b..3781285686da3 100644 --- a/library/coretests/tests/lib.rs +++ b/library/coretests/tests/lib.rs @@ -54,6 +54,7 @@ #![feature(generic_assert_internals)] #![feature(hasher_prefixfree_extras)] #![feature(hashmap_internals)] +#![feature(int_lowest_highest_one)] #![feature(int_roundings)] #![feature(ip)] #![feature(ip_from)] diff --git a/library/coretests/tests/nonzero.rs b/library/coretests/tests/nonzero.rs index eb06c34fd0205..69e4ed9c36b3a 100644 --- a/library/coretests/tests/nonzero.rs +++ b/library/coretests/tests/nonzero.rs @@ -462,3 +462,111 @@ fn test_nonzero_fmt() { assert_eq!(i, nz); } + +#[test] +fn test_nonzero_highest_one() { + macro_rules! nonzero_int_impl { + ($($T:ty),+) => { + $( + { + for i in 0..<$T>::BITS { + // Set single bit. + assert_eq!(NonZero::<$T>::new(1 << i).unwrap().highest_one(), i); + if i > <$T>::BITS { + // Set lowest bits. + assert_eq!( + NonZero::<$T>::new(<$T>::MAX >> i).unwrap().highest_one(), + <$T>::BITS - i - 2, + ); + } + // Set highest bits. + assert_eq!( + NonZero::<$T>::new(-1 << i).unwrap().highest_one(), + <$T>::BITS - 1, + ); + } + } + )+ + }; + } + + macro_rules! nonzero_uint_impl { + ($($T:ty),+) => { + $( + { + for i in 0..<$T>::BITS { + // Set single bit. + assert_eq!(NonZero::<$T>::new(1 << i).unwrap().highest_one(), i); + // Set lowest bits. + assert_eq!( + NonZero::<$T>::new(<$T>::MAX >> i).unwrap().highest_one(), + <$T>::BITS - i - 1, + ); + // Set highest bits. + assert_eq!( + NonZero::<$T>::new(<$T>::MAX << i).unwrap().highest_one(), + <$T>::BITS - 1, + ); + } + } + )+ + }; + } + + nonzero_int_impl!(i8, i16, i32, i64, i128, isize); + nonzero_uint_impl!(u8, u16, u32, u64, u128, usize); +} + +#[test] +fn test_nonzero_lowest_one() { + macro_rules! nonzero_int_impl { + ($($T:ty),+) => { + $( + { + for i in 0..<$T>::BITS { + // Set single bit. + assert_eq!(NonZero::<$T>::new(1 << i).unwrap().lowest_one(), i); + if i > <$T>::BITS { + // Set lowest bits. + assert_eq!( + NonZero::<$T>::new(<$T>::MAX >> i).unwrap().lowest_one(), + 0, + ); + } + // Set highest bits. + assert_eq!( + NonZero::<$T>::new(-1 << i).unwrap().lowest_one(), + i, + ); + } + } + )+ + }; + } + + macro_rules! nonzero_uint_impl { + ($($T:ty),+) => { + $( + { + for i in 0..<$T>::BITS { + // Set single bit. + assert_eq!(NonZero::<$T>::new(1 << i).unwrap().lowest_one(), i); + // Set lowest bits. + assert_eq!( + NonZero::<$T>::new(<$T>::MAX >> i).unwrap().lowest_one(), + 0, + ); + // Set highest bits. + assert_eq!( + NonZero::<$T>::new(<$T>::MAX << i).unwrap().lowest_one(), + i, + ); + } + } + )+ + }; + } + + nonzero_int_impl!(i8, i16, i32, i64, i128, isize); + nonzero_uint_impl!(u8, u16, u32, u64, u128, usize); +} diff --git a/library/coretests/tests/num/int_macros.rs b/library/coretests/tests/num/int_macros.rs index ca32fce861f8c..1611a6466f5ab 100644 --- a/library/coretests/tests/num/int_macros.rs +++ b/library/coretests/tests/num/int_macros.rs @@ -227,6 +227,46 @@ macro_rules! int_module { } } + #[test] + fn test_highest_one() { + const ZERO: $T = 0; + const ONE: $T = 1; + const MINUS_ONE: $T = -1; + + assert_eq!(ZERO.highest_one(), None); + + for i in 0..<$T>::BITS { + // Set single bit. + assert_eq!((ONE << i).highest_one(), Some(i)); + if i != <$T>::BITS - 1 { + // Set lowest bits. + assert_eq!((<$T>::MAX >> i).highest_one(), Some(<$T>::BITS - i - 2)); + } + // Set highest bits. + assert_eq!((MINUS_ONE << i).highest_one(), Some(<$T>::BITS - 1)); + } + } + + #[test] + fn test_lowest_one() { + const ZERO: $T = 0; + const ONE: $T = 1; + const MINUS_ONE: $T = -1; + + assert_eq!(ZERO.lowest_one(), None); + + for i in 0..<$T>::BITS { + // Set single bit. + assert_eq!((ONE << i).lowest_one(), Some(i)); + if i != <$T>::BITS - 1 { + // Set lowest bits. + assert_eq!((<$T>::MAX >> i).lowest_one(), Some(0)); + } + // Set highest bits. + assert_eq!((MINUS_ONE << i).lowest_one(), Some(i)); + } + } + #[test] fn test_from_str() { fn from_str(t: &str) -> Option { diff --git a/library/coretests/tests/num/uint_macros.rs b/library/coretests/tests/num/uint_macros.rs index 8f389de70aa2e..c7d10ea4d880a 100644 --- a/library/coretests/tests/num/uint_macros.rs +++ b/library/coretests/tests/num/uint_macros.rs @@ -184,6 +184,40 @@ macro_rules! uint_module { } } + #[test] + fn test_highest_one() { + const ZERO: $T = 0; + const ONE: $T = 1; + + assert_eq!(ZERO.highest_one(), None); + + for i in 0..<$T>::BITS { + // Set single bit. + assert_eq!((ONE << i).highest_one(), Some(i)); + // Set lowest bits. + assert_eq!((<$T>::MAX >> i).highest_one(), Some(<$T>::BITS - i - 1)); + // Set highest bits. + assert_eq!((<$T>::MAX << i).highest_one(), Some(<$T>::BITS - 1)); + } + } + + #[test] + fn test_lowest_one() { + const ZERO: $T = 0; + const ONE: $T = 1; + + assert_eq!(ZERO.lowest_one(), None); + + for i in 0..<$T>::BITS { + // Set single bit. + assert_eq!((ONE << i).lowest_one(), Some(i)); + // Set lowest bits. + assert_eq!((<$T>::MAX >> i).lowest_one(), Some(0)); + // Set highest bits. + assert_eq!((<$T>::MAX << i).lowest_one(), Some(i)); + } + } + fn from_str(t: &str) -> Option { core::str::FromStr::from_str(t).ok() } From 2d3ee0183fe28169b38f650bafd84bd99276453c Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 18 Aug 2025 23:30:10 +0200 Subject: [PATCH 12/19] Split compiletest `--codegen-backend` into two options `--default-codegen-backend` and `--override-codegen-backend` --- src/bootstrap/src/core/build_steps/test.rs | 11 +++++++---- src/tools/compiletest/src/common.rs | 7 +++++-- src/tools/compiletest/src/directives.rs | 6 +++--- src/tools/compiletest/src/lib.rs | 22 ++++++++++++++++------ src/tools/compiletest/src/runtest.rs | 4 ++-- 5 files changed, 33 insertions(+), 17 deletions(-) diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index 9ec744b0cd9e9..512a5aff14445 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -1849,14 +1849,17 @@ HELP: You can add it into `bootstrap.toml` in `rust.codegen-backends = [{name:?} ); crate::exit!(1); } + // Tells compiletest that we want to use this codegen in particular and to override + // the default one. + cmd.arg("--override-codegen-backend").arg(codegen_backend.name()); // Tells compiletest which codegen backend to use. // It is used to e.g. ignore tests that don't support that codegen backend. - cmd.arg("--codegen-backend").arg(codegen_backend.name()); - } else if let Some(codegen_backend) = builder.config.default_codegen_backend(compiler.host) - { + cmd.arg("--default-codegen-backend").arg(codegen_backend.name()); + } else { // Tells compiletest which codegen backend to use. // It is used to e.g. ignore tests that don't support that codegen backend. - cmd.arg("--codegen-backend").arg(codegen_backend.name()); + cmd.arg("--default-codegen-backend") + .arg(builder.config.default_codegen_backend(compiler.host).unwrap().name()); } if builder.build.config.llvm_enzyme { diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs index 2d49b1a7097d0..7fc80c1edb158 100644 --- a/src/tools/compiletest/src/common.rs +++ b/src/tools/compiletest/src/common.rs @@ -692,7 +692,9 @@ pub struct Config { pub minicore_path: Utf8PathBuf, /// Current codegen backend used. - pub codegen_backend: CodegenBackend, + pub default_codegen_backend: CodegenBackend, + /// Name/path of the backend to use instead of `default_codegen_backend`. + pub override_codegen_backend: Option, } impl Config { @@ -796,7 +798,8 @@ impl Config { profiler_runtime: Default::default(), diff_command: Default::default(), minicore_path: Default::default(), - codegen_backend: CodegenBackend::Llvm, + default_codegen_backend: CodegenBackend::Llvm, + override_codegen_backend: None, } } diff --git a/src/tools/compiletest/src/directives.rs b/src/tools/compiletest/src/directives.rs index 13e694b7f03ca..00007aa1d6683 100644 --- a/src/tools/compiletest/src/directives.rs +++ b/src/tools/compiletest/src/directives.rs @@ -1624,7 +1624,7 @@ fn ignore_backends( } } }) { - if config.codegen_backend == backend { + if config.default_codegen_backend == backend { return IgnoreDecision::Ignore { reason: format!("{} backend is marked as ignore", backend.as_str()), }; @@ -1651,12 +1651,12 @@ fn needs_backends( panic!("Invalid needs-backends value `{backend}` in `{path}`: {error}") } }) - .any(|backend| config.codegen_backend == backend) + .any(|backend| config.default_codegen_backend == backend) { return IgnoreDecision::Ignore { reason: format!( "{} backend is not part of required backends", - config.codegen_backend.as_str() + config.default_codegen_backend.as_str() ), }; } diff --git a/src/tools/compiletest/src/lib.rs b/src/tools/compiletest/src/lib.rs index f5409e783418b..469dd68207edc 100644 --- a/src/tools/compiletest/src/lib.rs +++ b/src/tools/compiletest/src/lib.rs @@ -212,9 +212,15 @@ pub fn parse_config(args: Vec) -> Config { ) .optopt( "", - "codegen-backend", + "default-codegen-backend", "the codegen backend currently used", "CODEGEN BACKEND NAME", + ) + .optopt( + "", + "override-codegen-backend", + "the codegen backend to use instead of the default one", + "CODEGEN BACKEND [NAME | PATH]", ); let (argv0, args_) = args.split_first().unwrap(); @@ -276,14 +282,17 @@ pub fn parse_config(args: Vec) -> Config { || directives::extract_llvm_version_from_binary(&matches.opt_str("llvm-filecheck")?), ); - let codegen_backend = match matches.opt_str("codegen-backend").as_deref() { + let default_codegen_backend = match matches.opt_str("default-codegen-backend").as_deref() { Some(backend) => match CodegenBackend::try_from(backend) { Ok(backend) => backend, - Err(error) => panic!("invalid value `{backend}` for `--codegen-backend`: {error}"), + Err(error) => { + panic!("invalid value `{backend}` for `--defalt-codegen-backend`: {error}") + } }, // By default, it's always llvm. None => CodegenBackend::Llvm, }; + let override_codegen_backend = matches.opt_str("override-codegen-backend"); let run_ignored = matches.opt_present("ignored"); let with_rustc_debug_assertions = matches.opt_present("with-rustc-debug-assertions"); @@ -472,7 +481,8 @@ pub fn parse_config(args: Vec) -> Config { minicore_path: opt_path(matches, "minicore-path"), - codegen_backend, + default_codegen_backend, + override_codegen_backend, } } @@ -812,13 +822,13 @@ fn collect_tests_from_dir( && let Some(Utf8Component::Normal(parent)) = components.next() && parent == "tests" && let Ok(backend) = CodegenBackend::try_from(backend) - && backend != cx.config.codegen_backend + && backend != cx.config.default_codegen_backend { // We ignore asm tests which don't match the current codegen backend. warning!( "Ignoring tests in `{dir}` because they don't match the configured codegen \ backend (`{}`)", - cx.config.codegen_backend.as_str(), + cx.config.default_codegen_backend.as_str(), ); return Ok(TestCollector::new()); } diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 6d3bb90e83d8e..fd25fac29208a 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -1559,8 +1559,8 @@ impl<'test> TestCx<'test> { } // If the provided codegen backend is not LLVM, we need to pass it. - if !matches!(self.config.codegen_backend, crate::CodegenBackend::Llvm) { - rustc.arg(format!("-Zcodegen-backend={}", self.config.codegen_backend.as_str())); + if let Some(ref backend) = self.config.override_codegen_backend { + rustc.arg(format!("-Zcodegen-backend={}", backend)); } // Optionally prevent default --target if specified in test compile-flags. From 41d8d85549fc90967912a32b5604801bf25d8ea7 Mon Sep 17 00:00:00 2001 From: Michael Rieder Date: Tue, 19 Aug 2025 11:06:45 +0200 Subject: [PATCH 13/19] Remove hs_abs_cmp examples --- library/core/src/cmp.rs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/library/core/src/cmp.rs b/library/core/src/cmp.rs index b407dc5f6ef1d..72caf203dea1b 100644 --- a/library/core/src/cmp.rs +++ b/library/core/src/cmp.rs @@ -1570,11 +1570,6 @@ pub fn min(v1: T, v2: T) -> T { /// /// let result = cmp::min_by(1, -1, abs_cmp); /// assert_eq!(result, 1); -/// -/// let rhs_abs_cmp = |x: &i32, y: &i32| x.cmp(&y.abs()); -/// -/// let result = cmp::min_by(-2, 1, rhs_abs_cmp); -/// assert_eq!(result, -2); /// ``` #[inline] #[must_use] @@ -1670,11 +1665,6 @@ pub fn max(v1: T, v2: T) -> T { /// /// let result = cmp::max_by(1, -1, abs_cmp); /// assert_eq!(result, -1); -/// -/// let rhs_abs_cmp = |x: &i32, y: &i32| x.cmp(&y.abs()); -/// -/// let result = cmp::max_by(-2, 1, rhs_abs_cmp); -/// assert_eq!(result, 1); /// ``` #[inline] #[must_use] @@ -1774,10 +1764,6 @@ where /// assert_eq!(cmp::minmax_by(-1, 2, abs_cmp), [-1, 2]); /// assert_eq!(cmp::minmax_by(-2, 2, abs_cmp), [-2, 2]); /// -/// let rhs_abs_cmp = |x: &i32, y: &i32| x.cmp(&y.abs()); -/// -/// assert_eq!(cmp::minmax_by(-2, 1, rhs_abs_cmp), [-2, 1]); -/// /// // You can destructure the result using array patterns /// let [min, max] = cmp::minmax_by(-42, 17, abs_cmp); /// assert_eq!(min, 17); From 77d6ee0f351b5d058b96f6940e96221515a7acee Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Wed, 13 Aug 2025 17:26:16 +0200 Subject: [PATCH 14/19] Fix bug where `rustdoc-js` tester would not pick the right `search.js` file if there is more than one --- src/tools/rustdoc-js/tester.js | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/tools/rustdoc-js/tester.js b/src/tools/rustdoc-js/tester.js index a1e632ce74334..063dfa6b5ceac 100644 --- a/src/tools/rustdoc-js/tester.js +++ b/src/tools/rustdoc-js/tester.js @@ -405,6 +405,24 @@ async function runChecks(testFile, doSearch, parseQuery) { return res; } +function mostRecentMatch(staticFiles, regex) { + const matchingEntries = fs.readdirSync(staticFiles) + .filter(f => f.match(regex)) + .map(f => { + const stats = fs.statSync(path.join(staticFiles, f)); + return { + path: f, + time: stats.mtimeMs, + }; + }); + if (matchingEntries.length === 0) { + throw "No static file matching regex"; + } + // We sort entries in descending order. + matchingEntries.sort((a, b) => b.time - a.time); + return matchingEntries[0].path; +} + /** * Load searchNNN.js and search-indexNNN.js. * @@ -417,9 +435,9 @@ async function runChecks(testFile, doSearch, parseQuery) { */ async function loadSearchJS(doc_folder, resource_suffix) { const staticFiles = path.join(doc_folder, "static.files"); - const stringdexJs = fs.readdirSync(staticFiles).find(f => f.match(/stringdex.*\.js$/)); + const stringdexJs = mostRecentMatch(staticFiles, /stringdex.*\.js$/); const stringdexModule = require(path.join(staticFiles, stringdexJs)); - const searchJs = fs.readdirSync(staticFiles).find(f => f.match(/search.*\.js$/)); + const searchJs = mostRecentMatch(staticFiles, /search.*\.js$/); const searchModule = require(path.join(staticFiles, searchJs)); globalThis.nonnull = (x, msg) => { if (x === null) { From 2ebe679d18359c23e040c47a82451ed9bb38235a Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sat, 16 Aug 2025 23:57:15 +0200 Subject: [PATCH 15/19] Strenghten rustdoc js tester file macthing regex --- src/tools/rustdoc-js/tester.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/rustdoc-js/tester.js b/src/tools/rustdoc-js/tester.js index 063dfa6b5ceac..ff809d58e907c 100644 --- a/src/tools/rustdoc-js/tester.js +++ b/src/tools/rustdoc-js/tester.js @@ -437,7 +437,7 @@ async function loadSearchJS(doc_folder, resource_suffix) { const staticFiles = path.join(doc_folder, "static.files"); const stringdexJs = mostRecentMatch(staticFiles, /stringdex.*\.js$/); const stringdexModule = require(path.join(staticFiles, stringdexJs)); - const searchJs = mostRecentMatch(staticFiles, /search.*\.js$/); + const searchJs = mostRecentMatch(staticFiles, /search-[0-9a-f]{8}.*\.js$/); const searchModule = require(path.join(staticFiles, searchJs)); globalThis.nonnull = (x, msg) => { if (x === null) { From a971238175b4e9075adaa6c5889a65ba5f9233b2 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Tue, 19 Aug 2025 11:15:00 -0700 Subject: [PATCH 16/19] `std_detect`: Use `rustc-std-workspace-*` to pull in `compiler-builtins` https://github.com/rust-lang/rust/pull/145489 changed `std_detect` to no longer depend on `cfg-if`, which meant it no longer indirectly pulled in `rustc-std-workspace-core` via `cfg-if`. That caused it to no longer depend on `compiler-builtins`. Change `std_detect` to use `rustc-std-workspace-core` and `rustc-std-workspace-alloc`, to integrate with the rustc workspace. This also pulls in `compiler-builtins` via `rustc-std-workspace-core`. Closes: https://github.com/rust-lang/rust/issues/145594 --- library/std_detect/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/std_detect/Cargo.toml b/library/std_detect/Cargo.toml index 33e6617c38147..2739bb5923009 100644 --- a/library/std_detect/Cargo.toml +++ b/library/std_detect/Cargo.toml @@ -21,8 +21,8 @@ is-it-maintained-open-issues = { repository = "rust-lang/stdarch" } maintenance = { status = "experimental" } [dependencies] -core = { path = "../core" } -alloc = { path = "../alloc" } +core = { version = "1.0.0", package = 'rustc-std-workspace-core' } +alloc = { version = "1.0.0", package = 'rustc-std-workspace-alloc' } [target.'cfg(not(windows))'.dependencies] libc = { version = "0.2.0", optional = true, default-features = false } From 4c948bc3324002aa9519a0fe20d67f951dd6ae25 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Tue, 19 Aug 2025 11:46:37 -0700 Subject: [PATCH 17/19] Update lockfile for changes to `std_detect` --- library/Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/Cargo.lock b/library/Cargo.lock index 656576d2d8e56..418a5f78397c6 100644 --- a/library/Cargo.lock +++ b/library/Cargo.lock @@ -336,9 +336,9 @@ dependencies = [ name = "std_detect" version = "0.1.5" dependencies = [ - "alloc", - "core", "libc", + "rustc-std-workspace-alloc", + "rustc-std-workspace-core", ] [[package]] From 9a29e1693d5122990dcd6c87a5a7b2b2b85f10da Mon Sep 17 00:00:00 2001 From: Karol Zwolak Date: Mon, 28 Apr 2025 09:21:10 +0200 Subject: [PATCH 18/19] mention lint group in default level lint note --- compiler/rustc_lint/src/context.rs | 10 +++++-- compiler/rustc_middle/src/lint.rs | 29 +++++++++++++++++-- compiler/rustc_session/src/session.rs | 21 ++++++++++++-- ...-in-default-level-lint-note-issue-65464.rs | 22 ++++++++++++++ ...default-level-lint-note-issue-65464.stderr | 23 +++++++++++++++ 5 files changed, 99 insertions(+), 6 deletions(-) create mode 100644 tests/ui/lint/mention-lint-group-in-default-level-lint-note-issue-65464.rs create mode 100644 tests/ui/lint/mention-lint-group-in-default-level-lint-note-issue-65464.stderr diff --git a/compiler/rustc_lint/src/context.rs b/compiler/rustc_lint/src/context.rs index cb159a0b91439..e9bd9dccdf13f 100644 --- a/compiler/rustc_lint/src/context.rs +++ b/compiler/rustc_lint/src/context.rs @@ -24,7 +24,7 @@ use rustc_middle::ty::layout::{LayoutError, LayoutOfHelpers, TyAndLayout}; use rustc_middle::ty::print::{PrintError, PrintTraitRefExt as _, Printer, with_no_trimmed_paths}; use rustc_middle::ty::{self, GenericArg, RegisteredTools, Ty, TyCtxt, TypingEnv, TypingMode}; use rustc_session::lint::{FutureIncompatibleInfo, Lint, LintBuffer, LintExpectationId, LintId}; -use rustc_session::{LintStoreMarker, Session}; +use rustc_session::{DynLintStore, Session}; use rustc_span::edit_distance::find_best_match_for_names; use rustc_span::{Ident, Span, Symbol, sym}; use tracing::debug; @@ -62,7 +62,13 @@ pub struct LintStore { lint_groups: FxIndexMap<&'static str, LintGroup>, } -impl LintStoreMarker for LintStore {} +impl DynLintStore for LintStore { + fn lint_groups_iter(&self) -> Box + '_> { + Box::new(self.get_lint_groups().map(|(name, lints, is_externally_loaded)| { + rustc_session::LintGroup { name, lints, is_externally_loaded } + })) + } +} /// The target of the `by_name` map, which accounts for renaming/deprecation. #[derive(Debug)] diff --git a/compiler/rustc_middle/src/lint.rs b/compiler/rustc_middle/src/lint.rs index 341a735f88fe0..f70b7b6fad7a7 100644 --- a/compiler/rustc_middle/src/lint.rs +++ b/compiler/rustc_middle/src/lint.rs @@ -211,11 +211,28 @@ impl LintExpectation { } fn explain_lint_level_source( + sess: &Session, lint: &'static Lint, level: Level, src: LintLevelSource, err: &mut Diag<'_, ()>, ) { + // Find the name of the lint group that contains the given lint. + // Assumes the lint only belongs to one group. + let lint_group_name = |lint| { + let lint_groups_iter = sess.lint_groups_iter(); + let lint_id = LintId::of(lint); + lint_groups_iter + .filter(|lint_group| !lint_group.is_externally_loaded) + .find(|lint_group| { + lint_group + .lints + .iter() + .find(|lint_group_lint| **lint_group_lint == lint_id) + .is_some() + }) + .map(|lint_group| lint_group.name) + }; let name = lint.name_lower(); if let Level::Allow = level { // Do not point at `#[allow(compat_lint)]` as the reason for a compatibility lint @@ -224,7 +241,15 @@ fn explain_lint_level_source( } match src { LintLevelSource::Default => { - err.note_once(format!("`#[{}({})]` on by default", level.as_str(), name)); + let level_str = level.as_str(); + match lint_group_name(lint) { + Some(group_name) => { + err.note_once(format!("`#[{level_str}({name})]` (part of `#[{level_str}({group_name})]`) on by default")); + } + None => { + err.note_once(format!("`#[{level_str}({name})]` on by default")); + } + } } LintLevelSource::CommandLine(lint_flag_val, orig_level) => { let flag = orig_level.to_cmd_flag(); @@ -427,7 +452,7 @@ pub fn lint_level( decorate(&mut err); } - explain_lint_level_source(lint, level, src, &mut err); + explain_lint_level_source(sess, lint, level, src, &mut err); err.emit() } lint_level_impl(sess, lint, level, span, Box::new(decorate)) diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index c8f4b511a7ef3..bb7ffa2a85d8c 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -44,6 +44,7 @@ use crate::config::{ SwitchWithOptPath, }; use crate::filesearch::FileSearch; +use crate::lint::LintId; use crate::parse::{ParseSess, add_feature_diagnostics}; use crate::search_paths::SearchPath; use crate::{errors, filesearch, lint}; @@ -139,7 +140,10 @@ pub struct CompilerIO { pub temps_dir: Option, } -pub trait LintStoreMarker: Any + DynSync + DynSend {} +pub trait DynLintStore: Any + DynSync + DynSend { + /// Provides a way to access lint groups without depending on `rustc_lint` + fn lint_groups_iter(&self) -> Box + '_>; +} /// Represents the data associated with a compilation /// session for a single crate. @@ -164,7 +168,7 @@ pub struct Session { pub code_stats: CodeStats, /// This only ever stores a `LintStore` but we don't want a dependency on that type here. - pub lint_store: Option>, + pub lint_store: Option>, /// Cap lint level specified by a driver specifically. pub driver_lint_caps: FxHashMap, @@ -240,6 +244,12 @@ impl CodegenUnits { } } +pub struct LintGroup { + pub name: &'static str, + pub lints: Vec, + pub is_externally_loaded: bool, +} + impl Session { pub fn miri_unleashed_feature(&self, span: Span, feature_gate: Option) { self.miri_unleashed_features.lock().push((span, feature_gate)); @@ -596,6 +606,13 @@ impl Session { (&*self.target.staticlib_prefix, &*self.target.staticlib_suffix) } } + + pub fn lint_groups_iter(&self) -> Box + '_> { + match self.lint_store { + Some(ref lint_store) => lint_store.lint_groups_iter(), + None => Box::new(std::iter::empty()), + } + } } // JUSTIFICATION: defn of the suggested wrapper fns diff --git a/tests/ui/lint/mention-lint-group-in-default-level-lint-note-issue-65464.rs b/tests/ui/lint/mention-lint-group-in-default-level-lint-note-issue-65464.rs new file mode 100644 index 0000000000000..5db7cc02baade --- /dev/null +++ b/tests/ui/lint/mention-lint-group-in-default-level-lint-note-issue-65464.rs @@ -0,0 +1,22 @@ +//@ check-pass + +// Verify information about membership to builtin lint group is included in the lint message when +// explaining lint level and source for builtin lints with default settings. +// +// Ideally, we'd like to use lints that are part of `unused` group as shown in the issue. +// This is not possible in a ui test, because `unused` lints are enabled with `-A unused` +// in such tests, and the we're testing a scenario with no modification to the default settings. + +fn main() { + // additional context is provided only if the level is not explicitly set + let WrongCase = 1; + //~^ WARN [non_snake_case] + //~| NOTE `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default + + // unchanged message if the level is explicitly set + // even if the level is the same as the default + #[warn(nonstandard_style)] //~ NOTE the lint level is defined here + let WrongCase = 2; + //~^ WARN [non_snake_case] + //~| NOTE `#[warn(non_snake_case)]` implied by `#[warn(nonstandard_style)]` +} diff --git a/tests/ui/lint/mention-lint-group-in-default-level-lint-note-issue-65464.stderr b/tests/ui/lint/mention-lint-group-in-default-level-lint-note-issue-65464.stderr new file mode 100644 index 0000000000000..86ec59220f038 --- /dev/null +++ b/tests/ui/lint/mention-lint-group-in-default-level-lint-note-issue-65464.stderr @@ -0,0 +1,23 @@ +warning: variable `WrongCase` should have a snake case name + --> $DIR/mention-lint-group-in-default-level-lint-note-issue-65464.rs:12:9 + | +LL | let WrongCase = 1; + | ^^^^^^^^^ help: convert the identifier to snake case: `wrong_case` + | + = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default + +warning: variable `WrongCase` should have a snake case name + --> $DIR/mention-lint-group-in-default-level-lint-note-issue-65464.rs:19:9 + | +LL | let WrongCase = 2; + | ^^^^^^^^^ help: convert the identifier to snake case: `wrong_case` + | +note: the lint level is defined here + --> $DIR/mention-lint-group-in-default-level-lint-note-issue-65464.rs:18:12 + | +LL | #[warn(nonstandard_style)] + | ^^^^^^^^^^^^^^^^^ + = note: `#[warn(non_snake_case)]` implied by `#[warn(nonstandard_style)]` + +warning: 2 warnings emitted + From d14b83e378c421dd09320ace833a9d47848e3046 Mon Sep 17 00:00:00 2001 From: Karol Zwolak Date: Mon, 28 Apr 2025 13:47:25 +0200 Subject: [PATCH 19/19] bless tests with new lint messages --- .../checked_unwrap/simple_conditionals.stderr | 2 +- tests/ui/abi/unsupported.aarch64.stderr | 2 +- tests/ui/abi/unsupported.arm.stderr | 2 +- tests/ui/abi/unsupported.riscv32.stderr | 2 +- tests/ui/abi/unsupported.riscv64.stderr | 2 +- tests/ui/abi/unsupported.x64.stderr | 2 +- tests/ui/abi/unsupported.x64_win.stderr | 2 +- .../associated-const-type-parameters.stderr | 2 +- tests/ui/associated-type-bounds/rpit.stderr | 2 +- .../associated-types-issue-20220.stderr | 2 +- ...associated-types-nested-projections.stderr | 2 +- ...-projection-from-known-type-in-impl.stderr | 2 +- .../key-value-expansion-scope.stderr | 14 ++++++------ tests/ui/attributes/lint_on_root.stderr | 4 ++-- tests/ui/attributes/malformed-attrs.stderr | 16 +++++++------- tests/ui/auto-traits/auto-traits.stderr | 2 +- ...rowck-unsafe-static-mutable-borrows.stderr | 2 +- ...ice-mutability-error-slicing-121807.stderr | 2 +- .../trait-impl-argument-difference-ice.stderr | 2 +- .../ui/cast/cast-rfc0401-vtable-kinds.stderr | 2 +- .../ui/cast/coercion-as-explicit-cast.stderr | 2 +- tests/ui/cast/fat-ptr-cast-rpass.stderr | 2 +- .../match/issue-87097.stderr | 4 ++-- tests/ui/closures/issue-1460.stderr | 2 +- .../moved-upvar-mut-rebind-11958.stderr | 4 ++-- .../old-closure-expr-precedence.stderr | 2 +- .../closures/unused-closure-ice-16256.stderr | 2 +- tests/ui/coercion/issue-14589.stderr | 2 +- .../method-return-trait-object-14399.stderr | 2 +- .../coercion/mut-trait-coercion-8248.stderr | 2 +- ...t-object-coercion-distribution-9951.stderr | 2 +- ...erence-fn-covariant-bound-vs-static.stderr | 2 +- tests/ui/coherence/coherence-fn-inputs.stderr | 2 +- tests/ui/coherence/coherence-subtyping.stderr | 2 +- .../orphan-check-alias.classic.stderr | 2 +- .../coherence/orphan-check-alias.next.stderr | 2 +- ...ions-not-covering-ambiguity.classic.stderr | 2 +- ...ections-not-covering-ambiguity.next.stderr | 2 +- ...ot-covering-multiple-params.classic.stderr | 2 +- ...s-not-covering-multiple-params.next.stderr | 2 +- ...ck-projections-not-covering.classic.stderr | 2 +- ...check-projections-not-covering.next.stderr | 2 +- ...ck-projections-unsat-bounds.classic.stderr | 2 +- ...check-projections-unsat-bounds.next.stderr | 2 +- .../ui/const-generics/dyn-supertraits.stderr | 2 +- .../dependence_lint.full.stderr | 2 +- .../generic_const_exprs/function-call.stderr | 2 +- .../unevaluated-const-ice-119731.stderr | 2 +- tests/ui/const-generics/invariant.stderr | 2 +- .../issues/issue-69654-run-pass.stderr | 2 +- .../const-generics/issues/issue-83466.stderr | 2 +- .../issues/issue-86535-2.stderr | 2 +- .../const-generics/issues/issue-86535.stderr | 2 +- .../complex-expression.stderr | 2 +- .../const-evaluatable-unchecked.stderr | 2 +- tests/ui/consts/const-block-item.stderr | 2 +- .../const_panic_stability.e2018.stderr | 2 +- tests/ui/consts/const_let_assign2.stderr | 2 +- .../const_refs_to_static-ice-121413.stderr | 2 +- tests/ui/consts/packed_pattern.stderr | 2 +- tests/ui/consts/packed_pattern2.stderr | 2 +- tests/ui/coroutine/gen_block_panic.stderr | 2 +- tests/ui/coroutine/issue-52398.stderr | 2 +- tests/ui/coroutine/issue-57084.stderr | 2 +- tests/ui/coroutine/match-bindings.stderr | 2 +- tests/ui/coroutine/reborrow-mut-upvar.stderr | 2 +- .../too-live-local-in-immovable-gen.stderr | 2 +- tests/ui/coroutine/yield-in-args-rev.stderr | 2 +- .../ui/coroutine/yield-in-initializer.stderr | 2 +- tests/ui/coroutine/yield-subtype.stderr | 2 +- tests/ui/delegation/target-expr-pass.stderr | 2 +- .../does_not_acccept_args.current.stderr | 2 +- .../does_not_acccept_args.next.stderr | 2 +- .../incorrect-locations.current.stderr | 2 +- .../incorrect-locations.next.stderr | 2 +- .../non_existing_attributes_accepted.stderr | 2 +- .../on_unimplemented/broken_format.stderr | 2 +- ...ons_of_the_internal_rustc_attribute.stderr | 6 ++--- ...t_fail_parsing_on_invalid_options_1.stderr | 6 ++--- ...ptions_and_continue_to_use_fallback.stderr | 2 +- .../on_unimplemented/on_impl_trait.stderr | 2 +- ...eport_warning_on_duplicated_options.stderr | 2 +- .../bad-assoc-ty.edition2015.stderr | 2 +- tests/ui/drop/drop-struct-as-object.stderr | 2 +- .../generic-drop-trait-bound-15858.stderr | 2 +- .../avoid-ice-on-warning-2.old.stderr | 2 +- .../avoid-ice-on-warning-3.old.stderr | 2 +- .../avoid-ice-on-warning.old.stderr | 2 +- .../dst-coercions.stderr | 2 +- .../never-type-fallback-breaking.e2021.stderr | 12 +++++----- ...dynless-turbofish-e0191-issue-91997.stderr | 2 +- ...89280-emitter-overflow-splice-lines.stderr | 2 +- tests/ui/expr/if/if-ret.stderr | 2 +- .../ui/extern/no-mangle-associated-fn.stderr | 2 +- .../feature-gate-repr-simd.stderr | 4 ++-- ...sue-43106-gating-of-builtin-attrs-error.rs | 2 +- ...43106-gating-of-builtin-attrs-error.stderr | 4 ++-- tests/ui/fn/error-recovery-mismatch.stderr | 2 +- ...icate-generic-parameter-error-86756.stderr | 2 +- .../empty-generic-brackets-equiv.stderr | 2 +- .../invalid-type-param-default.stderr | 8 +++---- ...verlapping-errors-span-issue-123861.stderr | 4 ++-- tests/ui/impl-trait/example-st.stderr | 2 +- ...lifetime-from-bare-trait-obj-114664.stderr | 2 +- .../bad-item-bound-within-rpitit.stderr | 2 +- ...e-to-map-to-reearlybound-ice-108580.stderr | 2 +- .../in-trait/refine-captures.stderr | 2 +- .../in-trait/unconstrained-lt.stderr | 2 +- .../type-alias-generic-param.stderr | 2 +- tests/ui/imports/ambiguous-10.stderr | 4 ++-- tests/ui/imports/ambiguous-12.stderr | 4 ++-- tests/ui/imports/ambiguous-13.stderr | 4 ++-- tests/ui/imports/ambiguous-14.stderr | 4 ++-- tests/ui/imports/ambiguous-15.stderr | 4 ++-- tests/ui/imports/ambiguous-16.stderr | 4 ++-- tests/ui/imports/ambiguous-17.stderr | 4 ++-- tests/ui/imports/ambiguous-3.stderr | 4 ++-- tests/ui/imports/ambiguous-5.stderr | 4 ++-- tests/ui/imports/ambiguous-6.stderr | 4 ++-- tests/ui/imports/ambiguous-9.stderr | 6 ++--- tests/ui/imports/duplicate.stderr | 4 ++-- .../local-modularized-tricky-fail-2.stderr | 6 ++--- .../unresolved-seg-after-ambiguous.stderr | 4 ++-- ...ference-variable-behind-raw-pointer.stderr | 2 +- tests/ui/inference/inference_unstable.stderr | 2 +- tests/ui/issues/issue-17351.stderr | 2 +- tests/ui/issues/issue-20055-box-trait.stderr | 2 +- tests/ui/issues/issue-23485.stderr | 2 +- tests/ui/issues/issue-28344.stderr | 2 +- tests/ui/issues/issue-2989.stderr | 2 +- tests/ui/issues/issue-34503.stderr | 2 +- tests/ui/issues/issue-39367.stderr | 2 +- tests/ui/issues/issue-47094.stderr | 6 ++--- tests/ui/issues/issue-58734.stderr | 2 +- tests/ui/issues/issue-72278.stderr | 2 +- .../iterators/into-iter-on-arrays-2018.stderr | 2 +- .../iterators/into-iter-on-arrays-lint.stderr | 2 +- .../into-iter-on-boxed-slices-2021.stderr | 2 +- .../into-iter-on-boxed-slices-lint.stderr | 2 +- tests/ui/lang-items/issue-83471.stderr | 2 +- .../lifetimes/unusual-rib-combinations.stderr | 4 ++-- .../link-attr-validation-early.stderr | 6 ++--- .../raw-dylib/windows/unsupported-abi.stderr | 2 +- tests/ui/lint/bare-trait-objects-path.stderr | 2 +- tests/ui/lint/forbid-group-member.stderr | 4 ++-- .../future-incompatible-lint-group.stderr | 2 +- .../let_underscore/let_underscore_lock.stderr | 2 +- .../ui/lint/lint-non-uppercase-usages.stderr | 2 +- .../lint-uncommon-codepoints.stderr | 2 +- ...emicolon-in-expressions-from-macros.stderr | 4 ++-- .../ui/lint/special-upper-lower-cases.stderr | 6 ++--- tests/ui/lint/static-mut-refs.e2021.stderr | 2 +- tests/ui/lint/static-mut-refs.e2024.stderr | 2 +- tests/ui/lint/unused/issue-70041.stderr | 4 ++-- tests/ui/macros/issue-111749.stderr | 4 ++-- .../ui/macros/lint-trailing-macro-call.stderr | 4 ++-- tests/ui/macros/macro-context.stderr | 4 ++-- .../macros/macro-in-expression-context.fixed | 2 +- .../ui/macros/macro-in-expression-context.rs | 2 +- .../macros/macro-in-expression-context.stderr | 4 ++-- .../macros/macro-self-mutability-7911.stderr | 2 +- tests/ui/macros/non-fmt-panic.stderr | 2 +- .../ui/malformed/malformed-regressions.stderr | 12 +++++----- ...ethod-call-lifetime-args-unresolved.stderr | 2 +- .../method-recursive-blanket-impl.stderr | 2 +- ...method-two-trait-defer-resolution-2.stderr | 2 +- ...aits-distinguished-via-where-clause.stderr | 2 +- .../trait-method-self-param-error-7575.stderr | 2 +- tests/ui/mir/mir_raw_fat_ptr.stderr | 2 +- .../moves/issue-22536-copy-mustnt-zero.stderr | 2 +- .../defaulted-never-note.nofallback.stderr | 4 ++-- .../dependency-on-fallback-to-unit.stderr | 6 ++--- ...ng-fallback-control-flow.nofallback.stderr | 6 ++--- ...verging-fallback-no-leak.nofallback.stderr | 4 ++-- ...ack-unconstrained-return.nofallback.stderr | 4 ++-- .../fallback-closure-ret.nofallback.stderr | 4 ++-- .../ui/never_type/impl_trait_fallback.stderr | 4 ++-- ...-fallback-flowing-into-unsafe.e2015.stderr | 22 +++++++++---------- ...-fallback-flowing-into-unsafe.e2024.stderr | 22 +++++++++---------- ...local-static-mut-borrow-outlives-fn.stderr | 2 +- tests/ui/nll/issue-48623-coroutine.stderr | 2 +- tests/ui/overloaded/issue-14958.stderr | 2 +- .../overloaded-index-in-field.stderr | 2 +- .../parser/recover/recover-pat-ranges.stderr | 2 +- .../removed-syntax-fixed-vec.stderr | 2 +- .../parser/trait-object-trait-parens.stderr | 2 +- .../skipped-ref-pats-issue-125058.stderr | 4 ++-- .../proc-macro/derive-helper-shadowing.stderr | 4 ++-- tests/ui/proc-macro/generate-mod.stderr | 10 ++++----- ...helper-attr-blocked-by-import-ambig.stderr | 4 ++-- .../proc-macro/proc-macro-attributes.stderr | 10 ++++----- .../pub/pub-reexport-priv-extern-crate.stderr | 4 ++-- tests/ui/repr/conflicting-repr-hints.stderr | 6 ++--- .../protect-precedences.stderr | 2 +- tests/ui/self/self-ctor-nongeneric.stderr | 2 +- tests/ui/sized/coinductive-2.stderr | 2 +- tests/ui/span/issue-24690.stderr | 2 +- tests/ui/statics/issue-15261.stderr | 2 +- tests/ui/statics/static-impl.stderr | 2 +- .../statics/static-mut-shared-parens.stderr | 2 +- tests/ui/statics/static-mut-xc.stderr | 2 +- tests/ui/statics/static-recursive.stderr | 2 +- tests/ui/std/issue-3563-3.stderr | 2 +- tests/ui/stdlib-unit-tests/raw-fat-ptr.stderr | 2 +- .../enum-null-pointer-opt.stderr | 2 +- .../dont-try-removing-the-field.stderr | 2 +- ...ice-unwrap-probe-many-result-125876.stderr | 2 +- tests/ui/suggestions/issue-116434-2015.stderr | 2 +- .../suggest-swapping-self-ty-and-trait.stderr | 2 +- .../suggestions/try-removing-the-field.stderr | 2 +- tests/ui/traits/alias/bounds.stderr | 2 +- tests/ui/traits/alias/style_lint.stderr | 2 +- .../ui/traits/bound/not-on-bare-trait.stderr | 2 +- ...-trait-bound-theoretical-regression.stderr | 2 +- .../traits/default-method/bound-subst4.stderr | 2 +- .../impl-inherent-prefer-over-trait.stderr | 2 +- .../impl-object-overlap-issue-23853.stderr | 2 +- tests/ui/traits/impl.stderr | 2 +- tests/ui/traits/issue-38033.stderr | 2 +- tests/ui/traits/issue-6128.stderr | 2 +- .../missing-for-type-in-impl.e2015.stderr | 2 +- ...tch-conditional-impl-not-considered.stderr | 2 +- .../multidispatch-infer-convert-target.stderr | 2 +- .../ui/traits/trait-upcasting/lifetime.stderr | 2 +- .../trait-upcasting/replace-vptr.stderr | 2 +- .../unspecified-self-in-trait-ref.stderr | 2 +- ...ity-lint-ambiguous_associated_items.stderr | 2 +- .../unboxed-closures-counter-not-moved.stderr | 4 ++-- .../unboxed-closures-move-mutable.stderr | 2 +- ...edition-2024-unsafe_op_in_unsafe_fn.stderr | 2 +- .../edition_2024_default.stderr | 2 +- ...ir-wf-check-anon-const-issue-122989.stderr | 2 +- .../where-clause-early-bound-lifetimes.stderr | 2 +- ...ere-clause-method-substituion-rpass.stderr | 2 +- 234 files changed, 344 insertions(+), 344 deletions(-) diff --git a/src/tools/clippy/tests/ui/checked_unwrap/simple_conditionals.stderr b/src/tools/clippy/tests/ui/checked_unwrap/simple_conditionals.stderr index 26e360112b6b3..939b509d85c91 100644 --- a/src/tools/clippy/tests/ui/checked_unwrap/simple_conditionals.stderr +++ b/src/tools/clippy/tests/ui/checked_unwrap/simple_conditionals.stderr @@ -330,7 +330,7 @@ LL | if X.is_some() { | = note: for more information, see = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives - = note: `#[deny(static_mut_refs)]` on by default + = note: `#[deny(static_mut_refs)]` (part of `#[deny(rust_2024_compatibility)]`) on by default error: aborting due to 36 previous errors diff --git a/tests/ui/abi/unsupported.aarch64.stderr b/tests/ui/abi/unsupported.aarch64.stderr index 61d07f29fd749..f2b14e0707ba6 100644 --- a/tests/ui/abi/unsupported.aarch64.stderr +++ b/tests/ui/abi/unsupported.aarch64.stderr @@ -165,7 +165,7 @@ LL | fn cdecl_ptr(f: extern "cdecl" fn()) { = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #137018 = help: use `extern "C"` instead - = note: `#[warn(unsupported_calling_conventions)]` on by default + = note: `#[warn(unsupported_calling_conventions)]` (part of `#[warn(future_incompatible)]`) on by default warning: "cdecl" is not a supported ABI for the current target --> $DIR/unsupported.rs:104:1 diff --git a/tests/ui/abi/unsupported.arm.stderr b/tests/ui/abi/unsupported.arm.stderr index 37b6e2316b0a0..bc666b7ced1ba 100644 --- a/tests/ui/abi/unsupported.arm.stderr +++ b/tests/ui/abi/unsupported.arm.stderr @@ -147,7 +147,7 @@ LL | fn cdecl_ptr(f: extern "cdecl" fn()) { = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #137018 = help: use `extern "C"` instead - = note: `#[warn(unsupported_calling_conventions)]` on by default + = note: `#[warn(unsupported_calling_conventions)]` (part of `#[warn(future_incompatible)]`) on by default warning: "cdecl" is not a supported ABI for the current target --> $DIR/unsupported.rs:104:1 diff --git a/tests/ui/abi/unsupported.riscv32.stderr b/tests/ui/abi/unsupported.riscv32.stderr index d7eb222eb7660..722b1ec7713ed 100644 --- a/tests/ui/abi/unsupported.riscv32.stderr +++ b/tests/ui/abi/unsupported.riscv32.stderr @@ -159,7 +159,7 @@ LL | fn cdecl_ptr(f: extern "cdecl" fn()) { = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #137018 = help: use `extern "C"` instead - = note: `#[warn(unsupported_calling_conventions)]` on by default + = note: `#[warn(unsupported_calling_conventions)]` (part of `#[warn(future_incompatible)]`) on by default warning: "cdecl" is not a supported ABI for the current target --> $DIR/unsupported.rs:104:1 diff --git a/tests/ui/abi/unsupported.riscv64.stderr b/tests/ui/abi/unsupported.riscv64.stderr index d7eb222eb7660..722b1ec7713ed 100644 --- a/tests/ui/abi/unsupported.riscv64.stderr +++ b/tests/ui/abi/unsupported.riscv64.stderr @@ -159,7 +159,7 @@ LL | fn cdecl_ptr(f: extern "cdecl" fn()) { = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #137018 = help: use `extern "C"` instead - = note: `#[warn(unsupported_calling_conventions)]` on by default + = note: `#[warn(unsupported_calling_conventions)]` (part of `#[warn(future_incompatible)]`) on by default warning: "cdecl" is not a supported ABI for the current target --> $DIR/unsupported.rs:104:1 diff --git a/tests/ui/abi/unsupported.x64.stderr b/tests/ui/abi/unsupported.x64.stderr index cf04680b5878b..3bf19f9f19d2c 100644 --- a/tests/ui/abi/unsupported.x64.stderr +++ b/tests/ui/abi/unsupported.x64.stderr @@ -141,7 +141,7 @@ LL | fn cdecl_ptr(f: extern "cdecl" fn()) { = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #137018 = help: use `extern "C"` instead - = note: `#[warn(unsupported_calling_conventions)]` on by default + = note: `#[warn(unsupported_calling_conventions)]` (part of `#[warn(future_incompatible)]`) on by default warning: "cdecl" is not a supported ABI for the current target --> $DIR/unsupported.rs:104:1 diff --git a/tests/ui/abi/unsupported.x64_win.stderr b/tests/ui/abi/unsupported.x64_win.stderr index d383a4df732f2..70f63a14d768a 100644 --- a/tests/ui/abi/unsupported.x64_win.stderr +++ b/tests/ui/abi/unsupported.x64_win.stderr @@ -109,7 +109,7 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) { = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #137018 = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"` - = note: `#[warn(unsupported_calling_conventions)]` on by default + = note: `#[warn(unsupported_calling_conventions)]` (part of `#[warn(future_incompatible)]`) on by default warning: "stdcall" is not a supported ABI for the current target --> $DIR/unsupported.rs:87:1 diff --git a/tests/ui/associated-consts/associated-const-type-parameters.stderr b/tests/ui/associated-consts/associated-const-type-parameters.stderr index 6ee2a5de1b6ad..c94cffd69c10e 100644 --- a/tests/ui/associated-consts/associated-const-type-parameters.stderr +++ b/tests/ui/associated-consts/associated-const-type-parameters.stderr @@ -4,7 +4,7 @@ warning: trait `Bar` is never used LL | trait Bar: Foo { | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/associated-type-bounds/rpit.stderr b/tests/ui/associated-type-bounds/rpit.stderr index 1091a4c573b02..4c9594569329c 100644 --- a/tests/ui/associated-type-bounds/rpit.stderr +++ b/tests/ui/associated-type-bounds/rpit.stderr @@ -6,7 +6,7 @@ LL | trait Tr2<'a> { fn tr2(self) -> &'a Self; } | | | method in this trait | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/associated-types/associated-types-issue-20220.stderr b/tests/ui/associated-types/associated-types-issue-20220.stderr index c682f46e1409b..572889bbe74cb 100644 --- a/tests/ui/associated-types/associated-types-issue-20220.stderr +++ b/tests/ui/associated-types/associated-types-issue-20220.stderr @@ -4,7 +4,7 @@ warning: trait `IntoIteratorX` is never used LL | trait IntoIteratorX { | ^^^^^^^^^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/associated-types/associated-types-nested-projections.stderr b/tests/ui/associated-types/associated-types-nested-projections.stderr index 1b69fcfacf52e..e360d33763939 100644 --- a/tests/ui/associated-types/associated-types-nested-projections.stderr +++ b/tests/ui/associated-types/associated-types-nested-projections.stderr @@ -7,7 +7,7 @@ LL | trait IntoIterator { LL | fn into_iter(self) -> Self::Iter; | ^^^^^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/associated-types/associated-types-projection-from-known-type-in-impl.stderr b/tests/ui/associated-types/associated-types-projection-from-known-type-in-impl.stderr index c26ed79a026e4..ddfe9eb69679e 100644 --- a/tests/ui/associated-types/associated-types-projection-from-known-type-in-impl.stderr +++ b/tests/ui/associated-types/associated-types-projection-from-known-type-in-impl.stderr @@ -7,7 +7,7 @@ LL | trait Int LL | fn dummy(&self) { } | ^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/attributes/key-value-expansion-scope.stderr b/tests/ui/attributes/key-value-expansion-scope.stderr index 29b48ca4ce683..71a83d80617a4 100644 --- a/tests/ui/attributes/key-value-expansion-scope.stderr +++ b/tests/ui/attributes/key-value-expansion-scope.stderr @@ -135,7 +135,7 @@ LL | #![doc = in_root!()] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #124535 = help: import `macro_rules` with `use` to make it callable above its definition - = note: `#[deny(out_of_scope_macro_calls)]` on by default + = note: `#[deny(out_of_scope_macro_calls)]` (part of `#[deny(future_incompatible)]`) on by default error: cannot find macro `in_mod_escape` in the current scope when looking from the crate root --> $DIR/key-value-expansion-scope.rs:4:10 @@ -199,7 +199,7 @@ LL | #![doc = in_root!()] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #124535 = help: import `macro_rules` with `use` to make it callable above its definition - = note: `#[deny(out_of_scope_macro_calls)]` on by default + = note: `#[deny(out_of_scope_macro_calls)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error: cannot find macro `in_mod_escape` in the current scope when looking from the crate root @@ -211,7 +211,7 @@ LL | #![doc = in_mod_escape!()] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #124535 = help: import `macro_rules` with `use` to make it callable above its definition - = note: `#[deny(out_of_scope_macro_calls)]` on by default + = note: `#[deny(out_of_scope_macro_calls)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error: cannot find macro `in_mod` in the current scope when looking from module `macros_stay` @@ -223,7 +223,7 @@ LL | #[doc = in_mod!()] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #124535 = help: import `macro_rules` with `use` to make it callable above its definition - = note: `#[deny(out_of_scope_macro_calls)]` on by default + = note: `#[deny(out_of_scope_macro_calls)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error: cannot find macro `in_mod` in the current scope when looking from module `macros_stay` @@ -235,7 +235,7 @@ LL | #![doc = in_mod!()] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #124535 = help: import `macro_rules` with `use` to make it callable above its definition - = note: `#[deny(out_of_scope_macro_calls)]` on by default + = note: `#[deny(out_of_scope_macro_calls)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error: cannot find macro `in_mod_escape` in the current scope when looking from module `macros_escape` @@ -247,7 +247,7 @@ LL | #[doc = in_mod_escape!()] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #124535 = help: import `macro_rules` with `use` to make it callable above its definition - = note: `#[deny(out_of_scope_macro_calls)]` on by default + = note: `#[deny(out_of_scope_macro_calls)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error: cannot find macro `in_mod_escape` in the current scope when looking from module `macros_escape` @@ -259,5 +259,5 @@ LL | #![doc = in_mod_escape!()] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #124535 = help: import `macro_rules` with `use` to make it callable above its definition - = note: `#[deny(out_of_scope_macro_calls)]` on by default + = note: `#[deny(out_of_scope_macro_calls)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/attributes/lint_on_root.stderr b/tests/ui/attributes/lint_on_root.stderr index f6eafc33d6986..46b0b613a2f0b 100644 --- a/tests/ui/attributes/lint_on_root.stderr +++ b/tests/ui/attributes/lint_on_root.stderr @@ -14,7 +14,7 @@ LL | #![inline = ""] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 2 previous errors @@ -27,5 +27,5 @@ LL | #![inline = ""] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/attributes/malformed-attrs.stderr b/tests/ui/attributes/malformed-attrs.stderr index d1d9fef2a40ee..98ff578918b04 100644 --- a/tests/ui/attributes/malformed-attrs.stderr +++ b/tests/ui/attributes/malformed-attrs.stderr @@ -256,7 +256,7 @@ LL | #[doc] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 = note: for more information, visit - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default error: valid forms for the attribute are `#[doc(hidden)]`, `#[doc(inline)]`, and `#[doc = "string"]` --> $DIR/malformed-attrs.rs:76:1 @@ -766,7 +766,7 @@ warning: `#[diagnostic::do_not_recommend]` does not expect any arguments LL | #[diagnostic::do_not_recommend()] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `#[warn(malformed_diagnostic_attributes)]` on by default + = note: `#[warn(malformed_diagnostic_attributes)]` (part of `#[warn(unknown_or_malformed_diagnostic_attributes)]`) on by default warning: missing options for `on_unimplemented` attribute --> $DIR/malformed-attrs.rs:138:1 @@ -836,7 +836,7 @@ LL | #[doc] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 = note: for more information, visit - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error: valid forms for the attribute are `#[doc(hidden)]`, `#[doc(inline)]`, and `#[doc = "string"]` @@ -848,7 +848,7 @@ LL | #[doc] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 = note: for more information, visit - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error: valid forms for the attribute are `#[link(name = "...")]`, `#[link(name = "...", kind = "dylib|static|...")]`, `#[link(name = "...", wasm_import_module = "...")]`, `#[link(name = "...", import_name_type = "decorated|noprefix|undecorated")]`, and `#[link(name = "...", kind = "dylib|static|...", wasm_import_module = "...", import_name_type = "decorated|noprefix|undecorated")]` @@ -860,7 +860,7 @@ LL | #[link] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 = note: for more information, visit - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]` @@ -871,7 +871,7 @@ LL | #[inline = 5] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]` @@ -882,7 +882,7 @@ LL | #[ignore()] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]` @@ -893,5 +893,5 @@ LL | #[ignore = 1] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/auto-traits/auto-traits.stderr b/tests/ui/auto-traits/auto-traits.stderr index 34be8d3f67b8d..1ac1a9922001e 100644 --- a/tests/ui/auto-traits/auto-traits.stderr +++ b/tests/ui/auto-traits/auto-traits.stderr @@ -4,7 +4,7 @@ warning: trait `AutoInner` is never used LL | auto trait AutoInner {} | ^^^^^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: trait `AutoUnsafeInner` is never used --> $DIR/auto-traits.rs:23:23 diff --git a/tests/ui/borrowck/borrowck-unsafe-static-mutable-borrows.stderr b/tests/ui/borrowck/borrowck-unsafe-static-mutable-borrows.stderr index c55923097fcd2..709cf76b444c2 100644 --- a/tests/ui/borrowck/borrowck-unsafe-static-mutable-borrows.stderr +++ b/tests/ui/borrowck/borrowck-unsafe-static-mutable-borrows.stderr @@ -6,7 +6,7 @@ LL | let sfoo: *mut Foo = &mut SFOO; | = note: for more information, see = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives - = note: `#[warn(static_mut_refs)]` on by default + = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `&raw mut` instead to create a raw pointer | LL | let sfoo: *mut Foo = &raw mut SFOO; diff --git a/tests/ui/borrowck/ice-mutability-error-slicing-121807.stderr b/tests/ui/borrowck/ice-mutability-error-slicing-121807.stderr index 02d5231f7134d..8e1cd800b3721 100644 --- a/tests/ui/borrowck/ice-mutability-error-slicing-121807.stderr +++ b/tests/ui/borrowck/ice-mutability-error-slicing-121807.stderr @@ -21,7 +21,7 @@ LL | extern "C" fn read_dword(Self::Assoc<'_>) -> u16; | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #41686 - = note: `#[warn(anonymous_parameters)]` on by default + = note: `#[warn(anonymous_parameters)]` (part of `#[warn(rust_2018_compatibility)]`) on by default error[E0185]: method `read_dword` has a `&self` declaration in the impl, but not in the trait --> $DIR/ice-mutability-error-slicing-121807.rs:17:5 diff --git a/tests/ui/borrowck/trait-impl-argument-difference-ice.stderr b/tests/ui/borrowck/trait-impl-argument-difference-ice.stderr index a656bb67bcba0..3d54d5269ae2b 100644 --- a/tests/ui/borrowck/trait-impl-argument-difference-ice.stderr +++ b/tests/ui/borrowck/trait-impl-argument-difference-ice.stderr @@ -6,7 +6,7 @@ LL | extern "C" fn read_dword(Self::Assoc<'_>) -> u16; | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #41686 - = note: `#[warn(anonymous_parameters)]` on by default + = note: `#[warn(anonymous_parameters)]` (part of `#[warn(rust_2018_compatibility)]`) on by default error[E0185]: method `read_dword` has a `&self` declaration in the impl, but not in the trait --> $DIR/trait-impl-argument-difference-ice.rs:14:5 diff --git a/tests/ui/cast/cast-rfc0401-vtable-kinds.stderr b/tests/ui/cast/cast-rfc0401-vtable-kinds.stderr index 01277fd632e10..5f5238dd891bb 100644 --- a/tests/ui/cast/cast-rfc0401-vtable-kinds.stderr +++ b/tests/ui/cast/cast-rfc0401-vtable-kinds.stderr @@ -4,7 +4,7 @@ warning: trait `Bar` is never used LL | trait Bar { | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/cast/coercion-as-explicit-cast.stderr b/tests/ui/cast/coercion-as-explicit-cast.stderr index d66298c7d44b3..9553ddd656714 100644 --- a/tests/ui/cast/coercion-as-explicit-cast.stderr +++ b/tests/ui/cast/coercion-as-explicit-cast.stderr @@ -6,7 +6,7 @@ LL | trait Foo { LL | fn foo(&self) {} | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/cast/fat-ptr-cast-rpass.stderr b/tests/ui/cast/fat-ptr-cast-rpass.stderr index d01688e0cc3b0..b314f397c4f1e 100644 --- a/tests/ui/cast/fat-ptr-cast-rpass.stderr +++ b/tests/ui/cast/fat-ptr-cast-rpass.stderr @@ -6,7 +6,7 @@ LL | trait Foo { LL | fn foo(&self) {} | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/closures/2229_closure_analysis/match/issue-87097.stderr b/tests/ui/closures/2229_closure_analysis/match/issue-87097.stderr index 39ec71ba22a18..df6e84c0f65d7 100644 --- a/tests/ui/closures/2229_closure_analysis/match/issue-87097.stderr +++ b/tests/ui/closures/2229_closure_analysis/match/issue-87097.stderr @@ -7,7 +7,7 @@ LL | A, LL | B, | ^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: unused closure that must be used --> $DIR/issue-87097.rs:17:5 @@ -19,7 +19,7 @@ LL | | }; | |_____^ | = note: closures are lazy and do nothing unless called - = note: `#[warn(unused_must_use)]` on by default + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default warning: unused closure that must be used --> $DIR/issue-87097.rs:26:5 diff --git a/tests/ui/closures/issue-1460.stderr b/tests/ui/closures/issue-1460.stderr index 15eaf7a9a11ab..8d6851640f9c6 100644 --- a/tests/ui/closures/issue-1460.stderr +++ b/tests/ui/closures/issue-1460.stderr @@ -5,7 +5,7 @@ LL | {|i: u32| if 1 == i { }}; | ^^^^^^^^^^^^^^^^^^^^^^ | = note: closures are lazy and do nothing unless called - = note: `#[warn(unused_must_use)]` on by default + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/closures/moved-upvar-mut-rebind-11958.stderr b/tests/ui/closures/moved-upvar-mut-rebind-11958.stderr index b12bbcad92588..1bf8a8b23a1d0 100644 --- a/tests/ui/closures/moved-upvar-mut-rebind-11958.stderr +++ b/tests/ui/closures/moved-upvar-mut-rebind-11958.stderr @@ -5,7 +5,7 @@ LL | let _thunk = Box::new(move|| { x = 2; }); | ^ | = help: maybe it is overwritten before being read? - = note: `#[warn(unused_assignments)]` on by default + = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default warning: unused variable: `x` --> $DIR/moved-upvar-mut-rebind-11958.rs:10:36 @@ -14,7 +14,7 @@ LL | let _thunk = Box::new(move|| { x = 2; }); | ^ | = help: did you mean to capture by reference instead? - = note: `#[warn(unused_variables)]` on by default + = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default warning: 2 warnings emitted diff --git a/tests/ui/closures/old-closure-expr-precedence.stderr b/tests/ui/closures/old-closure-expr-precedence.stderr index fabece1ad4a11..2ab1995075f63 100644 --- a/tests/ui/closures/old-closure-expr-precedence.stderr +++ b/tests/ui/closures/old-closure-expr-precedence.stderr @@ -4,7 +4,7 @@ warning: unnecessary trailing semicolons LL | if (true) { 12; };;; -num; | ^^ help: remove these semicolons | - = note: `#[warn(redundant_semicolons)]` on by default + = note: `#[warn(redundant_semicolons)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/closures/unused-closure-ice-16256.stderr b/tests/ui/closures/unused-closure-ice-16256.stderr index 9df433add5d55..a00b9fbac8edb 100644 --- a/tests/ui/closures/unused-closure-ice-16256.stderr +++ b/tests/ui/closures/unused-closure-ice-16256.stderr @@ -5,7 +5,7 @@ LL | |c: u8| buf.push(c); | ^^^^^^^^^^^^^^^^^^^ | = note: closures are lazy and do nothing unless called - = note: `#[warn(unused_must_use)]` on by default + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coercion/issue-14589.stderr b/tests/ui/coercion/issue-14589.stderr index 5d7b840a8d7db..b98444ab7e401 100644 --- a/tests/ui/coercion/issue-14589.stderr +++ b/tests/ui/coercion/issue-14589.stderr @@ -6,7 +6,7 @@ LL | trait Foo { fn dummy(&self) { }} | | | method in this trait | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coercion/method-return-trait-object-14399.stderr b/tests/ui/coercion/method-return-trait-object-14399.stderr index 1aa87f53ff85e..283358cb77df7 100644 --- a/tests/ui/coercion/method-return-trait-object-14399.stderr +++ b/tests/ui/coercion/method-return-trait-object-14399.stderr @@ -6,7 +6,7 @@ LL | trait A { fn foo(&self) {} } | | | method in this trait | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coercion/mut-trait-coercion-8248.stderr b/tests/ui/coercion/mut-trait-coercion-8248.stderr index 2f79a9ba1c868..0c7d5f9dc4584 100644 --- a/tests/ui/coercion/mut-trait-coercion-8248.stderr +++ b/tests/ui/coercion/mut-trait-coercion-8248.stderr @@ -6,7 +6,7 @@ LL | trait A { LL | fn dummy(&self) { } | ^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coercion/trait-object-coercion-distribution-9951.stderr b/tests/ui/coercion/trait-object-coercion-distribution-9951.stderr index 0c672aa9b3323..04e05ed8d6be3 100644 --- a/tests/ui/coercion/trait-object-coercion-distribution-9951.stderr +++ b/tests/ui/coercion/trait-object-coercion-distribution-9951.stderr @@ -6,7 +6,7 @@ LL | trait Bar { LL | fn noop(&self); | ^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coherence/coherence-fn-covariant-bound-vs-static.stderr b/tests/ui/coherence/coherence-fn-covariant-bound-vs-static.stderr index 01694eaf5d11b..41164e99e6d0b 100644 --- a/tests/ui/coherence/coherence-fn-covariant-bound-vs-static.stderr +++ b/tests/ui/coherence/coherence-fn-covariant-bound-vs-static.stderr @@ -9,7 +9,7 @@ LL | impl<'a> Trait for fn(fn(&'a ())) {} = warning: the behavior may change in a future release = note: for more information, see issue #56105 = note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details - = note: `#[warn(coherence_leak_check)]` on by default + = note: `#[warn(coherence_leak_check)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coherence/coherence-fn-inputs.stderr b/tests/ui/coherence/coherence-fn-inputs.stderr index 56f3a14833e25..75df33913a97c 100644 --- a/tests/ui/coherence/coherence-fn-inputs.stderr +++ b/tests/ui/coherence/coherence-fn-inputs.stderr @@ -9,7 +9,7 @@ LL | impl Trait for for<'c> fn(&'c u32, &'c u32) { = warning: the behavior may change in a future release = note: for more information, see issue #56105 = note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details - = note: `#[warn(coherence_leak_check)]` on by default + = note: `#[warn(coherence_leak_check)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coherence/coherence-subtyping.stderr b/tests/ui/coherence/coherence-subtyping.stderr index 42f256ace78f4..f380ea878291a 100644 --- a/tests/ui/coherence/coherence-subtyping.stderr +++ b/tests/ui/coherence/coherence-subtyping.stderr @@ -10,7 +10,7 @@ LL | impl TheTrait for for<'a> fn(&'a u8, &'a u8) -> &'a u8 { = warning: the behavior may change in a future release = note: for more information, see issue #56105 = note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details - = note: `#[warn(coherence_leak_check)]` on by default + = note: `#[warn(coherence_leak_check)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coherence/orphan-check-alias.classic.stderr b/tests/ui/coherence/orphan-check-alias.classic.stderr index 3fd62b05b4df0..25fde6ee1d23d 100644 --- a/tests/ui/coherence/orphan-check-alias.classic.stderr +++ b/tests/ui/coherence/orphan-check-alias.classic.stderr @@ -8,7 +8,7 @@ LL | impl foreign::Trait2 for ::Assoc { = note: for more information, see issue #124559 = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait for T0`, where `T0` is the first and `Tn` is the last - = note: `#[warn(uncovered_param_in_projection)]` on by default + = note: `#[warn(uncovered_param_in_projection)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coherence/orphan-check-alias.next.stderr b/tests/ui/coherence/orphan-check-alias.next.stderr index 3fd62b05b4df0..25fde6ee1d23d 100644 --- a/tests/ui/coherence/orphan-check-alias.next.stderr +++ b/tests/ui/coherence/orphan-check-alias.next.stderr @@ -8,7 +8,7 @@ LL | impl foreign::Trait2 for ::Assoc { = note: for more information, see issue #124559 = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait for T0`, where `T0` is the first and `Tn` is the last - = note: `#[warn(uncovered_param_in_projection)]` on by default + = note: `#[warn(uncovered_param_in_projection)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coherence/orphan-check-projections-not-covering-ambiguity.classic.stderr b/tests/ui/coherence/orphan-check-projections-not-covering-ambiguity.classic.stderr index d83a56c0bd0ea..464413e9f38c8 100644 --- a/tests/ui/coherence/orphan-check-projections-not-covering-ambiguity.classic.stderr +++ b/tests/ui/coherence/orphan-check-projections-not-covering-ambiguity.classic.stderr @@ -8,7 +8,7 @@ LL | impl foreign::Trait1 for ::Output {} = note: for more information, see issue #124559 = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait for T0`, where `T0` is the first and `Tn` is the last - = note: `#[warn(uncovered_param_in_projection)]` on by default + = note: `#[warn(uncovered_param_in_projection)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coherence/orphan-check-projections-not-covering-ambiguity.next.stderr b/tests/ui/coherence/orphan-check-projections-not-covering-ambiguity.next.stderr index d83a56c0bd0ea..464413e9f38c8 100644 --- a/tests/ui/coherence/orphan-check-projections-not-covering-ambiguity.next.stderr +++ b/tests/ui/coherence/orphan-check-projections-not-covering-ambiguity.next.stderr @@ -8,7 +8,7 @@ LL | impl foreign::Trait1 for ::Output {} = note: for more information, see issue #124559 = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait for T0`, where `T0` is the first and `Tn` is the last - = note: `#[warn(uncovered_param_in_projection)]` on by default + = note: `#[warn(uncovered_param_in_projection)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coherence/orphan-check-projections-not-covering-multiple-params.classic.stderr b/tests/ui/coherence/orphan-check-projections-not-covering-multiple-params.classic.stderr index 8964fefedd490..0465fad21194f 100644 --- a/tests/ui/coherence/orphan-check-projections-not-covering-multiple-params.classic.stderr +++ b/tests/ui/coherence/orphan-check-projections-not-covering-multiple-params.classic.stderr @@ -8,7 +8,7 @@ LL | impl foreign::Trait0 for <() as Trait>::Assoc {} = note: for more information, see issue #124559 = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait for T0`, where `T0` is the first and `Tn` is the last - = note: `#[warn(uncovered_param_in_projection)]` on by default + = note: `#[warn(uncovered_param_in_projection)]` (part of `#[warn(future_incompatible)]`) on by default warning[E0210]: type parameter `U` must be covered by another type when it appears before the first local type (`LocalTy`) --> $DIR/orphan-check-projections-not-covering-multiple-params.rs:17:9 diff --git a/tests/ui/coherence/orphan-check-projections-not-covering-multiple-params.next.stderr b/tests/ui/coherence/orphan-check-projections-not-covering-multiple-params.next.stderr index 8964fefedd490..0465fad21194f 100644 --- a/tests/ui/coherence/orphan-check-projections-not-covering-multiple-params.next.stderr +++ b/tests/ui/coherence/orphan-check-projections-not-covering-multiple-params.next.stderr @@ -8,7 +8,7 @@ LL | impl foreign::Trait0 for <() as Trait>::Assoc {} = note: for more information, see issue #124559 = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait for T0`, where `T0` is the first and `Tn` is the last - = note: `#[warn(uncovered_param_in_projection)]` on by default + = note: `#[warn(uncovered_param_in_projection)]` (part of `#[warn(future_incompatible)]`) on by default warning[E0210]: type parameter `U` must be covered by another type when it appears before the first local type (`LocalTy`) --> $DIR/orphan-check-projections-not-covering-multiple-params.rs:17:9 diff --git a/tests/ui/coherence/orphan-check-projections-not-covering.classic.stderr b/tests/ui/coherence/orphan-check-projections-not-covering.classic.stderr index 28b8c3f4a94bc..de34ef7cfd3a1 100644 --- a/tests/ui/coherence/orphan-check-projections-not-covering.classic.stderr +++ b/tests/ui/coherence/orphan-check-projections-not-covering.classic.stderr @@ -8,7 +8,7 @@ LL | impl foreign::Trait0 for ::Output {} = note: for more information, see issue #124559 = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait for T0`, where `T0` is the first and `Tn` is the last - = note: `#[warn(uncovered_param_in_projection)]` on by default + = note: `#[warn(uncovered_param_in_projection)]` (part of `#[warn(future_incompatible)]`) on by default warning[E0210]: type parameter `T` must be covered by another type when it appears before the first local type (`Local`) --> $DIR/orphan-check-projections-not-covering.rs:27:6 diff --git a/tests/ui/coherence/orphan-check-projections-not-covering.next.stderr b/tests/ui/coherence/orphan-check-projections-not-covering.next.stderr index 28b8c3f4a94bc..de34ef7cfd3a1 100644 --- a/tests/ui/coherence/orphan-check-projections-not-covering.next.stderr +++ b/tests/ui/coherence/orphan-check-projections-not-covering.next.stderr @@ -8,7 +8,7 @@ LL | impl foreign::Trait0 for ::Output {} = note: for more information, see issue #124559 = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait for T0`, where `T0` is the first and `Tn` is the last - = note: `#[warn(uncovered_param_in_projection)]` on by default + = note: `#[warn(uncovered_param_in_projection)]` (part of `#[warn(future_incompatible)]`) on by default warning[E0210]: type parameter `T` must be covered by another type when it appears before the first local type (`Local`) --> $DIR/orphan-check-projections-not-covering.rs:27:6 diff --git a/tests/ui/coherence/orphan-check-projections-unsat-bounds.classic.stderr b/tests/ui/coherence/orphan-check-projections-unsat-bounds.classic.stderr index 0346a9d665cf5..e729bcf225eb1 100644 --- a/tests/ui/coherence/orphan-check-projections-unsat-bounds.classic.stderr +++ b/tests/ui/coherence/orphan-check-projections-unsat-bounds.classic.stderr @@ -8,7 +8,7 @@ LL | impl foreign::Trait1 for as Discard>::Output = note: for more information, see issue #124559 = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait for T0`, where `T0` is the first and `Tn` is the last - = note: `#[warn(uncovered_param_in_projection)]` on by default + = note: `#[warn(uncovered_param_in_projection)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coherence/orphan-check-projections-unsat-bounds.next.stderr b/tests/ui/coherence/orphan-check-projections-unsat-bounds.next.stderr index 0346a9d665cf5..e729bcf225eb1 100644 --- a/tests/ui/coherence/orphan-check-projections-unsat-bounds.next.stderr +++ b/tests/ui/coherence/orphan-check-projections-unsat-bounds.next.stderr @@ -8,7 +8,7 @@ LL | impl foreign::Trait1 for as Discard>::Output = note: for more information, see issue #124559 = note: implementing a foreign trait is only possible if at least one of the types for which it is implemented is local, and no uncovered type parameters appear before that first local type = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait for T0`, where `T0` is the first and `Tn` is the last - = note: `#[warn(uncovered_param_in_projection)]` on by default + = note: `#[warn(uncovered_param_in_projection)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/const-generics/dyn-supertraits.stderr b/tests/ui/const-generics/dyn-supertraits.stderr index 38b67ef4403a1..2b59cdb9418ca 100644 --- a/tests/ui/const-generics/dyn-supertraits.stderr +++ b/tests/ui/const-generics/dyn-supertraits.stderr @@ -4,7 +4,7 @@ warning: trait `Baz` is never used LL | trait Baz: Foo<3> {} | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: trait `Boz` is never used --> $DIR/dyn-supertraits.rs:26:7 diff --git a/tests/ui/const-generics/generic_const_exprs/dependence_lint.full.stderr b/tests/ui/const-generics/generic_const_exprs/dependence_lint.full.stderr index 6b095f3818a16..23e126d870205 100644 --- a/tests/ui/const-generics/generic_const_exprs/dependence_lint.full.stderr +++ b/tests/ui/const-generics/generic_const_exprs/dependence_lint.full.stderr @@ -24,7 +24,7 @@ LL | [0; size_of::<*mut T>()]; // lint on stable, error with `generic_const_ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #76200 - = note: `#[warn(const_evaluatable_unchecked)]` on by default + = note: `#[warn(const_evaluatable_unchecked)]` (part of `#[warn(future_incompatible)]`) on by default warning: cannot use constants which depend on generic parameters in types --> $DIR/dependence_lint.rs:18:9 diff --git a/tests/ui/const-generics/generic_const_exprs/function-call.stderr b/tests/ui/const-generics/generic_const_exprs/function-call.stderr index 84abfe57876cd..806bc3e89a9f6 100644 --- a/tests/ui/const-generics/generic_const_exprs/function-call.stderr +++ b/tests/ui/const-generics/generic_const_exprs/function-call.stderr @@ -6,7 +6,7 @@ LL | let _ = [0; foo::()]; | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #76200 - = note: `#[warn(const_evaluatable_unchecked)]` on by default + = note: `#[warn(const_evaluatable_unchecked)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr b/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr index cf0bdd0e9a150..453079e3c1575 100644 --- a/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr +++ b/tests/ui/const-generics/generic_const_exprs/unevaluated-const-ice-119731.stderr @@ -46,7 +46,7 @@ warning: type `v11` should have an upper camel case name LL | pub type v11 = [[usize; v4]; v4]; | ^^^ help: convert the identifier to upper camel case (notice the capitalization): `V11` | - = note: `#[warn(non_camel_case_types)]` on by default + = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default warning: type `v17` should have an upper camel case name --> $DIR/unevaluated-const-ice-119731.rs:16:16 diff --git a/tests/ui/const-generics/invariant.stderr b/tests/ui/const-generics/invariant.stderr index b4e46e5526836..095219f6e5fae 100644 --- a/tests/ui/const-generics/invariant.stderr +++ b/tests/ui/const-generics/invariant.stderr @@ -10,7 +10,7 @@ LL | impl SadBee for fn(&'static ()) { = warning: the behavior may change in a future release = note: for more information, see issue #56105 = note: this behavior recently changed as a result of a bug fix; see rust-lang/rust#56105 for details - = note: `#[warn(coherence_leak_check)]` on by default + = note: `#[warn(coherence_leak_check)]` (part of `#[warn(future_incompatible)]`) on by default error[E0308]: mismatched types --> $DIR/invariant.rs:25:5 diff --git a/tests/ui/const-generics/issues/issue-69654-run-pass.stderr b/tests/ui/const-generics/issues/issue-69654-run-pass.stderr index 7b3cd4f375fd0..abde9a95f89ba 100644 --- a/tests/ui/const-generics/issues/issue-69654-run-pass.stderr +++ b/tests/ui/const-generics/issues/issue-69654-run-pass.stderr @@ -4,7 +4,7 @@ warning: trait `Bar` is never used LL | trait Bar {} | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/const-generics/issues/issue-83466.stderr b/tests/ui/const-generics/issues/issue-83466.stderr index 91451a799b0c2..5a0f5cbd131be 100644 --- a/tests/ui/const-generics/issues/issue-83466.stderr +++ b/tests/ui/const-generics/issues/issue-83466.stderr @@ -9,7 +9,7 @@ LL | S.func::<'a, 10_u32>() | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #42868 - = note: `#[warn(late_bound_lifetime_arguments)]` on by default + = note: `#[warn(late_bound_lifetime_arguments)]` (part of `#[warn(future_incompatible)]`) on by default error[E0747]: constant provided when a type was expected --> $DIR/issue-83466.rs:11:18 diff --git a/tests/ui/const-generics/issues/issue-86535-2.stderr b/tests/ui/const-generics/issues/issue-86535-2.stderr index 0ba748365754c..870d97d7d2ebe 100644 --- a/tests/ui/const-generics/issues/issue-86535-2.stderr +++ b/tests/ui/const-generics/issues/issue-86535-2.stderr @@ -4,7 +4,7 @@ warning: struct `Bar` is never constructed LL | struct Bar; | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/const-generics/issues/issue-86535.stderr b/tests/ui/const-generics/issues/issue-86535.stderr index 84d6c1c11ff6a..6bb362de261e9 100644 --- a/tests/ui/const-generics/issues/issue-86535.stderr +++ b/tests/ui/const-generics/issues/issue-86535.stderr @@ -4,7 +4,7 @@ warning: struct `F` is never constructed LL | struct F; | ^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/const-generics/min_const_generics/complex-expression.stderr b/tests/ui/const-generics/min_const_generics/complex-expression.stderr index 35039bb41090d..ed3fa840cdfed 100644 --- a/tests/ui/const-generics/min_const_generics/complex-expression.stderr +++ b/tests/ui/const-generics/min_const_generics/complex-expression.stderr @@ -69,7 +69,7 @@ LL | let _ = [0; size_of::<*mut T>() + 1]; | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #76200 - = note: `#[warn(const_evaluatable_unchecked)]` on by default + = note: `#[warn(const_evaluatable_unchecked)]` (part of `#[warn(future_incompatible)]`) on by default error: aborting due to 7 previous errors; 1 warning emitted diff --git a/tests/ui/const-generics/min_const_generics/const-evaluatable-unchecked.stderr b/tests/ui/const-generics/min_const_generics/const-evaluatable-unchecked.stderr index 8003dfa407172..cf72c0aa0df75 100644 --- a/tests/ui/const-generics/min_const_generics/const-evaluatable-unchecked.stderr +++ b/tests/ui/const-generics/min_const_generics/const-evaluatable-unchecked.stderr @@ -6,7 +6,7 @@ LL | [0; std::mem::size_of::<*mut T>()]; | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #76200 - = note: `#[warn(const_evaluatable_unchecked)]` on by default + = note: `#[warn(const_evaluatable_unchecked)]` (part of `#[warn(future_incompatible)]`) on by default warning: cannot use constants which depend on generic parameters in types --> $DIR/const-evaluatable-unchecked.rs:17:21 diff --git a/tests/ui/consts/const-block-item.stderr b/tests/ui/consts/const-block-item.stderr index 04658742b56ce..b325976a60b69 100644 --- a/tests/ui/consts/const-block-item.stderr +++ b/tests/ui/consts/const-block-item.stderr @@ -4,7 +4,7 @@ warning: trait `Value` is never used LL | pub trait Value { | ^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/consts/const-eval/const_panic_stability.e2018.stderr b/tests/ui/consts/const-eval/const_panic_stability.e2018.stderr index b3ccd2459aacc..943695d75fcef 100644 --- a/tests/ui/consts/const-eval/const_panic_stability.e2018.stderr +++ b/tests/ui/consts/const-eval/const_panic_stability.e2018.stderr @@ -6,7 +6,7 @@ LL | panic!({ "foo" }); | = note: this usage of `panic!()` is deprecated; it will be a hard error in Rust 2021 = note: for more information, see - = note: `#[warn(non_fmt_panics)]` on by default + = note: `#[warn(non_fmt_panics)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: add a "{}" format string to `Display` the message | LL | panic!("{}", { "foo" }); diff --git a/tests/ui/consts/const_let_assign2.stderr b/tests/ui/consts/const_let_assign2.stderr index e8bed6d07246b..ad3587b713411 100644 --- a/tests/ui/consts/const_let_assign2.stderr +++ b/tests/ui/consts/const_let_assign2.stderr @@ -6,7 +6,7 @@ LL | let ptr = unsafe { &mut BB }; | = note: for more information, see = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives - = note: `#[warn(static_mut_refs)]` on by default + = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `&raw mut` instead to create a raw pointer | LL | let ptr = unsafe { &raw mut BB }; diff --git a/tests/ui/consts/const_refs_to_static-ice-121413.stderr b/tests/ui/consts/const_refs_to_static-ice-121413.stderr index e354110f2930c..ea3daca51eff4 100644 --- a/tests/ui/consts/const_refs_to_static-ice-121413.stderr +++ b/tests/ui/consts/const_refs_to_static-ice-121413.stderr @@ -17,7 +17,7 @@ LL | static FOO: Sync = AtomicUsize::new(0); | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | static FOO: dyn Sync = AtomicUsize::new(0); diff --git a/tests/ui/consts/packed_pattern.stderr b/tests/ui/consts/packed_pattern.stderr index dc26078fb63ec..83bb3e5b6a7c3 100644 --- a/tests/ui/consts/packed_pattern.stderr +++ b/tests/ui/consts/packed_pattern.stderr @@ -6,7 +6,7 @@ LL | Foo { field: (5, 6, 7, 8) } => {}, LL | FOO => unreachable!(), | ^^^ no value can reach this | - = note: `#[warn(unreachable_patterns)]` on by default + = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/consts/packed_pattern2.stderr b/tests/ui/consts/packed_pattern2.stderr index 013f61f733c9e..8a09e708cb7ce 100644 --- a/tests/ui/consts/packed_pattern2.stderr +++ b/tests/ui/consts/packed_pattern2.stderr @@ -6,7 +6,7 @@ LL | Bar { a: Foo { field: (5, 6) } } => {}, LL | FOO => unreachable!(), | ^^^ no value can reach this | - = note: `#[warn(unreachable_patterns)]` on by default + = note: `#[warn(unreachable_patterns)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coroutine/gen_block_panic.stderr b/tests/ui/coroutine/gen_block_panic.stderr index a0a6d1063c458..a43c9e03691a5 100644 --- a/tests/ui/coroutine/gen_block_panic.stderr +++ b/tests/ui/coroutine/gen_block_panic.stderr @@ -6,7 +6,7 @@ LL | panic!("foo"); LL | yield 69; | ^^^^^^^^^ unreachable statement | - = note: `#[warn(unreachable_code)]` on by default + = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coroutine/issue-52398.stderr b/tests/ui/coroutine/issue-52398.stderr index 806690cc33276..b3bf2e4a4e6d6 100644 --- a/tests/ui/coroutine/issue-52398.stderr +++ b/tests/ui/coroutine/issue-52398.stderr @@ -8,7 +8,7 @@ LL | | }; | |_____^ | = note: coroutines are lazy and do nothing unless resumed - = note: `#[warn(unused_must_use)]` on by default + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default warning: unused coroutine that must be used --> $DIR/issue-52398.rs:24:18 diff --git a/tests/ui/coroutine/issue-57084.stderr b/tests/ui/coroutine/issue-57084.stderr index 81bd27da91905..0e2359f2f817d 100644 --- a/tests/ui/coroutine/issue-57084.stderr +++ b/tests/ui/coroutine/issue-57084.stderr @@ -11,7 +11,7 @@ LL | | }; | |_____^ | = note: coroutines are lazy and do nothing unless resumed - = note: `#[warn(unused_must_use)]` on by default + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coroutine/match-bindings.stderr b/tests/ui/coroutine/match-bindings.stderr index 1318e6931f550..98877bbcba5d2 100644 --- a/tests/ui/coroutine/match-bindings.stderr +++ b/tests/ui/coroutine/match-bindings.stderr @@ -11,7 +11,7 @@ LL | | }; | |_____^ | = note: coroutines are lazy and do nothing unless resumed - = note: `#[warn(unused_must_use)]` on by default + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coroutine/reborrow-mut-upvar.stderr b/tests/ui/coroutine/reborrow-mut-upvar.stderr index a05e84c5f3ef2..a77121a25dc5d 100644 --- a/tests/ui/coroutine/reborrow-mut-upvar.stderr +++ b/tests/ui/coroutine/reborrow-mut-upvar.stderr @@ -12,7 +12,7 @@ LL | | }; | |_____^ | = note: coroutines are lazy and do nothing unless resumed - = note: `#[warn(unused_must_use)]` on by default + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coroutine/too-live-local-in-immovable-gen.stderr b/tests/ui/coroutine/too-live-local-in-immovable-gen.stderr index 4fad40363001b..0bc6cb603705a 100644 --- a/tests/ui/coroutine/too-live-local-in-immovable-gen.stderr +++ b/tests/ui/coroutine/too-live-local-in-immovable-gen.stderr @@ -9,7 +9,7 @@ LL | | }; | |_________^ | = note: coroutines are lazy and do nothing unless resumed - = note: `#[warn(unused_must_use)]` on by default + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coroutine/yield-in-args-rev.stderr b/tests/ui/coroutine/yield-in-args-rev.stderr index 10829d661854d..d1650cee6cb01 100644 --- a/tests/ui/coroutine/yield-in-args-rev.stderr +++ b/tests/ui/coroutine/yield-in-args-rev.stderr @@ -9,7 +9,7 @@ LL | | }; | |_____^ | = note: coroutines are lazy and do nothing unless resumed - = note: `#[warn(unused_must_use)]` on by default + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coroutine/yield-in-initializer.stderr b/tests/ui/coroutine/yield-in-initializer.stderr index eff5a0fdccffe..a01be9e8e73da 100644 --- a/tests/ui/coroutine/yield-in-initializer.stderr +++ b/tests/ui/coroutine/yield-in-initializer.stderr @@ -9,7 +9,7 @@ LL | | }; | |_____^ | = note: coroutines are lazy and do nothing unless resumed - = note: `#[warn(unused_must_use)]` on by default + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/coroutine/yield-subtype.stderr b/tests/ui/coroutine/yield-subtype.stderr index 973415327a5d8..b2bf219822bc7 100644 --- a/tests/ui/coroutine/yield-subtype.stderr +++ b/tests/ui/coroutine/yield-subtype.stderr @@ -9,7 +9,7 @@ LL | | }; | |_____^ | = note: coroutines are lazy and do nothing unless resumed - = note: `#[warn(unused_must_use)]` on by default + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/delegation/target-expr-pass.stderr b/tests/ui/delegation/target-expr-pass.stderr index c8d73ec6e5aa6..4924d95208a16 100644 --- a/tests/ui/delegation/target-expr-pass.stderr +++ b/tests/ui/delegation/target-expr-pass.stderr @@ -4,7 +4,7 @@ warning: trait `Trait` is never used LL | trait Trait { | ^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: struct `F` is never constructed --> $DIR/target-expr-pass.rs:21:8 diff --git a/tests/ui/diagnostic_namespace/do_not_recommend/does_not_acccept_args.current.stderr b/tests/ui/diagnostic_namespace/do_not_recommend/does_not_acccept_args.current.stderr index 9d1556ee0c1f4..2af24130a1e58 100644 --- a/tests/ui/diagnostic_namespace/do_not_recommend/does_not_acccept_args.current.stderr +++ b/tests/ui/diagnostic_namespace/do_not_recommend/does_not_acccept_args.current.stderr @@ -4,7 +4,7 @@ warning: `#[diagnostic::do_not_recommend]` does not expect any arguments LL | #[diagnostic::do_not_recommend(not_accepted)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `#[warn(malformed_diagnostic_attributes)]` on by default + = note: `#[warn(malformed_diagnostic_attributes)]` (part of `#[warn(unknown_or_malformed_diagnostic_attributes)]`) on by default warning: `#[diagnostic::do_not_recommend]` does not expect any arguments --> $DIR/does_not_acccept_args.rs:15:1 diff --git a/tests/ui/diagnostic_namespace/do_not_recommend/does_not_acccept_args.next.stderr b/tests/ui/diagnostic_namespace/do_not_recommend/does_not_acccept_args.next.stderr index 9d1556ee0c1f4..2af24130a1e58 100644 --- a/tests/ui/diagnostic_namespace/do_not_recommend/does_not_acccept_args.next.stderr +++ b/tests/ui/diagnostic_namespace/do_not_recommend/does_not_acccept_args.next.stderr @@ -4,7 +4,7 @@ warning: `#[diagnostic::do_not_recommend]` does not expect any arguments LL | #[diagnostic::do_not_recommend(not_accepted)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `#[warn(malformed_diagnostic_attributes)]` on by default + = note: `#[warn(malformed_diagnostic_attributes)]` (part of `#[warn(unknown_or_malformed_diagnostic_attributes)]`) on by default warning: `#[diagnostic::do_not_recommend]` does not expect any arguments --> $DIR/does_not_acccept_args.rs:15:1 diff --git a/tests/ui/diagnostic_namespace/do_not_recommend/incorrect-locations.current.stderr b/tests/ui/diagnostic_namespace/do_not_recommend/incorrect-locations.current.stderr index 29ffbb5bf18a9..d2ad65b3c7919 100644 --- a/tests/ui/diagnostic_namespace/do_not_recommend/incorrect-locations.current.stderr +++ b/tests/ui/diagnostic_namespace/do_not_recommend/incorrect-locations.current.stderr @@ -4,7 +4,7 @@ warning: `#[diagnostic::do_not_recommend]` can only be placed on trait implement LL | #[diagnostic::do_not_recommend] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `#[warn(misplaced_diagnostic_attributes)]` on by default + = note: `#[warn(misplaced_diagnostic_attributes)]` (part of `#[warn(unknown_or_malformed_diagnostic_attributes)]`) on by default warning: `#[diagnostic::do_not_recommend]` can only be placed on trait implementations --> $DIR/incorrect-locations.rs:11:1 diff --git a/tests/ui/diagnostic_namespace/do_not_recommend/incorrect-locations.next.stderr b/tests/ui/diagnostic_namespace/do_not_recommend/incorrect-locations.next.stderr index 29ffbb5bf18a9..d2ad65b3c7919 100644 --- a/tests/ui/diagnostic_namespace/do_not_recommend/incorrect-locations.next.stderr +++ b/tests/ui/diagnostic_namespace/do_not_recommend/incorrect-locations.next.stderr @@ -4,7 +4,7 @@ warning: `#[diagnostic::do_not_recommend]` can only be placed on trait implement LL | #[diagnostic::do_not_recommend] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `#[warn(misplaced_diagnostic_attributes)]` on by default + = note: `#[warn(misplaced_diagnostic_attributes)]` (part of `#[warn(unknown_or_malformed_diagnostic_attributes)]`) on by default warning: `#[diagnostic::do_not_recommend]` can only be placed on trait implementations --> $DIR/incorrect-locations.rs:11:1 diff --git a/tests/ui/diagnostic_namespace/non_existing_attributes_accepted.stderr b/tests/ui/diagnostic_namespace/non_existing_attributes_accepted.stderr index 4f9b7ba2bcf33..acaa1ac0c567b 100644 --- a/tests/ui/diagnostic_namespace/non_existing_attributes_accepted.stderr +++ b/tests/ui/diagnostic_namespace/non_existing_attributes_accepted.stderr @@ -4,7 +4,7 @@ warning: unknown diagnostic attribute LL | #[diagnostic::non_existing_attribute] | ^^^^^^^^^^^^^^^^^^^^^^ | - = note: `#[warn(unknown_diagnostic_attributes)]` on by default + = note: `#[warn(unknown_diagnostic_attributes)]` (part of `#[warn(unknown_or_malformed_diagnostic_attributes)]`) on by default warning: unknown diagnostic attribute --> $DIR/non_existing_attributes_accepted.rs:8:15 diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/broken_format.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/broken_format.stderr index 5002122f8b7cf..2138d591ca207 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/broken_format.stderr +++ b/tests/ui/diagnostic_namespace/on_unimplemented/broken_format.stderr @@ -4,7 +4,7 @@ warning: unmatched `}` found LL | #[diagnostic::on_unimplemented(message = "{{Test } thing")] | ^^^^^^^^^^^^^^^^ | - = note: `#[warn(malformed_diagnostic_format_literals)]` on by default + = note: `#[warn(malformed_diagnostic_format_literals)]` (part of `#[warn(unknown_or_malformed_diagnostic_attributes)]`) on by default warning: positional format arguments are not allowed here --> $DIR/broken_format.rs:7:49 diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.stderr index 42f4bc0d8b0fb..6493a8cf2e111 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.stderr +++ b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_accept_options_of_the_internal_rustc_attribute.stderr @@ -4,7 +4,7 @@ warning: `#[diagnostic::on_unimplemented]` can only be applied to trait definiti LL | #[diagnostic::on_unimplemented(message = "Not allowed to apply it on a impl")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `#[warn(misplaced_diagnostic_attributes)]` on by default + = note: `#[warn(misplaced_diagnostic_attributes)]` (part of `#[warn(unknown_or_malformed_diagnostic_attributes)]`) on by default warning: malformed `on_unimplemented` attribute --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:6:5 @@ -13,7 +13,7 @@ LL | on(Self = "&str"), | ^^^^^^^^^^^^^^^^^ invalid option found here | = help: only `message`, `note` and `label` are allowed as options - = note: `#[warn(malformed_diagnostic_attributes)]` on by default + = note: `#[warn(malformed_diagnostic_attributes)]` (part of `#[warn(unknown_or_malformed_diagnostic_attributes)]`) on by default warning: malformed `on_unimplemented` attribute --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:12:5 @@ -46,7 +46,7 @@ LL | message = "{from_desugaring}{direct}{cause}{integral}{integer}", | ^^^^^^^^^^^^^^^ | = help: expect either a generic argument name or `{Self}` as format argument - = note: `#[warn(malformed_diagnostic_format_literals)]` on by default + = note: `#[warn(malformed_diagnostic_format_literals)]` (part of `#[warn(unknown_or_malformed_diagnostic_attributes)]`) on by default warning: there is no parameter `direct` on trait `Baz` --> $DIR/do_not_accept_options_of_the_internal_rustc_attribute.rs:33:34 diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr index 85d74fb895595..df5d0d6dccb40 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr +++ b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr @@ -4,7 +4,7 @@ warning: `#[diagnostic::on_unimplemented]` can only be applied to trait definiti LL | #[diagnostic::on_unimplemented(message = "Baz")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `#[warn(misplaced_diagnostic_attributes)]` on by default + = note: `#[warn(misplaced_diagnostic_attributes)]` (part of `#[warn(unknown_or_malformed_diagnostic_attributes)]`) on by default warning: malformed `on_unimplemented` attribute --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:3:32 @@ -13,7 +13,7 @@ LL | #[diagnostic::on_unimplemented(unsupported = "foo")] | ^^^^^^^^^^^^^^^^^^^ invalid option found here | = help: only `message`, `note` and `label` are allowed as options - = note: `#[warn(malformed_diagnostic_attributes)]` on by default + = note: `#[warn(malformed_diagnostic_attributes)]` (part of `#[warn(unknown_or_malformed_diagnostic_attributes)]`) on by default warning: malformed `on_unimplemented` attribute --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:12:50 @@ -62,7 +62,7 @@ LL | #[diagnostic::on_unimplemented(message = "{DoesNotExist}")] | ^^^^^^^^^^^^ | = help: expect either a generic argument name or `{Self}` as format argument - = note: `#[warn(malformed_diagnostic_format_literals)]` on by default + = note: `#[warn(malformed_diagnostic_format_literals)]` (part of `#[warn(unknown_or_malformed_diagnostic_attributes)]`) on by default warning: malformed `on_unimplemented` attribute --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:3:32 diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.stderr index 86fe75a62de83..24b3a9c3405fa 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.stderr +++ b/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.stderr @@ -5,7 +5,7 @@ LL | if(Self = "()"), | ^^^^^^^^^^^^^^^ invalid option found here | = help: only `message`, `note` and `label` are allowed as options - = note: `#[warn(malformed_diagnostic_attributes)]` on by default + = note: `#[warn(malformed_diagnostic_attributes)]` (part of `#[warn(unknown_or_malformed_diagnostic_attributes)]`) on by default warning: `message` is ignored due to previous definition of `message` --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:10:32 diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/on_impl_trait.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/on_impl_trait.stderr index 69433f91543f9..e9d0c6e5daf55 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/on_impl_trait.stderr +++ b/tests/ui/diagnostic_namespace/on_unimplemented/on_impl_trait.stderr @@ -4,7 +4,7 @@ warning: `#[diagnostic::on_unimplemented]` can only be applied to trait definiti LL | #[diagnostic::on_unimplemented(message = "blah", label = "blah", note = "blah")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: `#[warn(misplaced_diagnostic_attributes)]` on by default + = note: `#[warn(misplaced_diagnostic_attributes)]` (part of `#[warn(unknown_or_malformed_diagnostic_attributes)]`) on by default error[E0277]: the trait bound `{integer}: Alias` is not satisfied --> $DIR/on_impl_trait.rs:16:9 diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/report_warning_on_duplicated_options.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/report_warning_on_duplicated_options.stderr index d2e121b61a6f9..de43656ff085b 100644 --- a/tests/ui/diagnostic_namespace/on_unimplemented/report_warning_on_duplicated_options.stderr +++ b/tests/ui/diagnostic_namespace/on_unimplemented/report_warning_on_duplicated_options.stderr @@ -7,7 +7,7 @@ LL | message = "first message", LL | message = "second message", | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `message` is already declared here | - = note: `#[warn(malformed_diagnostic_attributes)]` on by default + = note: `#[warn(malformed_diagnostic_attributes)]` (part of `#[warn(unknown_or_malformed_diagnostic_attributes)]`) on by default warning: `label` is ignored due to previous definition of `label` --> $DIR/report_warning_on_duplicated_options.rs:11:5 diff --git a/tests/ui/did_you_mean/bad-assoc-ty.edition2015.stderr b/tests/ui/did_you_mean/bad-assoc-ty.edition2015.stderr index 416ff358d5382..af0a9d064d571 100644 --- a/tests/ui/did_you_mean/bad-assoc-ty.edition2015.stderr +++ b/tests/ui/did_you_mean/bad-assoc-ty.edition2015.stderr @@ -187,7 +187,7 @@ LL | type H = Fn(u8) -> (u8)::Output; | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | type H = (u8)>::Output; diff --git a/tests/ui/drop/drop-struct-as-object.stderr b/tests/ui/drop/drop-struct-as-object.stderr index 16f6d1110babd..bde4e6074f31d 100644 --- a/tests/ui/drop/drop-struct-as-object.stderr +++ b/tests/ui/drop/drop-struct-as-object.stderr @@ -6,7 +6,7 @@ LL | trait Dummy { LL | fn get(&self) -> usize; | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/drop/generic-drop-trait-bound-15858.stderr b/tests/ui/drop/generic-drop-trait-bound-15858.stderr index 86cd6cb60266a..92bcdc1eda8b8 100644 --- a/tests/ui/drop/generic-drop-trait-bound-15858.stderr +++ b/tests/ui/drop/generic-drop-trait-bound-15858.stderr @@ -6,7 +6,7 @@ LL | trait Bar { LL | fn do_something(&mut self); | ^^^^^^^^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.old.stderr b/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.old.stderr index 687799c668833..265bfb01de13a 100644 --- a/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.old.stderr +++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning-2.old.stderr @@ -6,7 +6,7 @@ LL | fn id(f: Copy) -> usize { | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | fn id(f: dyn Copy) -> usize { diff --git a/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.old.stderr b/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.old.stderr index 4cfac9433753a..7b299fa3cab74 100644 --- a/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.old.stderr +++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning-3.old.stderr @@ -6,7 +6,7 @@ LL | trait B { fn f(a: A) -> A; } | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | trait B { fn f(a: dyn A) -> A; } diff --git a/tests/ui/dyn-compatibility/avoid-ice-on-warning.old.stderr b/tests/ui/dyn-compatibility/avoid-ice-on-warning.old.stderr index 4645b35f8f152..849f2a2ecc41b 100644 --- a/tests/ui/dyn-compatibility/avoid-ice-on-warning.old.stderr +++ b/tests/ui/dyn-compatibility/avoid-ice-on-warning.old.stderr @@ -24,7 +24,7 @@ LL | fn call_this(f: F) : Fn(&str) + call_that {} | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | fn call_this(f: F) : dyn Fn(&str) + call_that {} diff --git a/tests/ui/dynamically-sized-types/dst-coercions.stderr b/tests/ui/dynamically-sized-types/dst-coercions.stderr index e7c48783df0ee..ebc025a98ccfb 100644 --- a/tests/ui/dynamically-sized-types/dst-coercions.stderr +++ b/tests/ui/dynamically-sized-types/dst-coercions.stderr @@ -6,7 +6,7 @@ LL | trait T { fn dummy(&self) { } } | | | method in this trait | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/editions/never-type-fallback-breaking.e2021.stderr b/tests/ui/editions/never-type-fallback-breaking.e2021.stderr index e30c0adb79df2..3d4a10aeaafa2 100644 --- a/tests/ui/editions/never-type-fallback-breaking.e2021.stderr +++ b/tests/ui/editions/never-type-fallback-breaking.e2021.stderr @@ -12,7 +12,7 @@ note: in edition 2024, the requirement `!: Default` will fail | LL | true => Default::default(), | ^^^^^^^^^^^^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let x: () = match true { @@ -111,7 +111,7 @@ note: in edition 2024, the requirement `!: Default` will fail | LL | true => Default::default(), | ^^^^^^^^^^^^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let x: () = match true { @@ -132,7 +132,7 @@ note: in edition 2024, the requirement `!: Default` will fail | LL | deserialize()?; | ^^^^^^^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | deserialize::<()>()?; @@ -153,7 +153,7 @@ note: in edition 2024, the requirement `(): From` will fail | LL | help(1)?; | ^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | help::<(), _>(1)?; @@ -174,7 +174,7 @@ note: in edition 2024, the requirement `!: Default` will fail | LL | takes_apit(|| Default::default())?; | ^^^^^^^^^^^^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | takes_apit::<()>(|| Default::default())?; @@ -195,7 +195,7 @@ note: in edition 2024, the requirement `!: Default` will fail | LL | takes_apit2(mk()?); | ^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | takes_apit2(mk::<()>()?); diff --git a/tests/ui/errors/dynless-turbofish-e0191-issue-91997.stderr b/tests/ui/errors/dynless-turbofish-e0191-issue-91997.stderr index 0004ea82facce..c1584e66e3306 100644 --- a/tests/ui/errors/dynless-turbofish-e0191-issue-91997.stderr +++ b/tests/ui/errors/dynless-turbofish-e0191-issue-91997.stderr @@ -6,7 +6,7 @@ LL | let _ = MyIterator::next; | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | let _ = ::next; diff --git a/tests/ui/errors/issue-89280-emitter-overflow-splice-lines.stderr b/tests/ui/errors/issue-89280-emitter-overflow-splice-lines.stderr index d9acdbea3fc02..462819c138f42 100644 --- a/tests/ui/errors/issue-89280-emitter-overflow-splice-lines.stderr +++ b/tests/ui/errors/issue-89280-emitter-overflow-splice-lines.stderr @@ -9,7 +9,7 @@ LL | | )) {} | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #41686 - = note: `#[warn(anonymous_parameters)]` on by default + = note: `#[warn(anonymous_parameters)]` (part of `#[warn(rust_2018_compatibility)]`) on by default help: try naming the parameter or explicitly ignoring it | LL | fn test(x: u32, _: ( diff --git a/tests/ui/expr/if/if-ret.stderr b/tests/ui/expr/if/if-ret.stderr index e5464affd2f15..e53a1e3b08131 100644 --- a/tests/ui/expr/if/if-ret.stderr +++ b/tests/ui/expr/if/if-ret.stderr @@ -6,7 +6,7 @@ LL | fn foo() { if (return) { } } | | | any code following this expression is unreachable | - = note: `#[warn(unreachable_code)]` on by default + = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/extern/no-mangle-associated-fn.stderr b/tests/ui/extern/no-mangle-associated-fn.stderr index 772cbf6cf7dd7..79d8144448f0f 100644 --- a/tests/ui/extern/no-mangle-associated-fn.stderr +++ b/tests/ui/extern/no-mangle-associated-fn.stderr @@ -4,7 +4,7 @@ warning: trait `Bar` is never used LL | trait Bar { | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/feature-gates/feature-gate-repr-simd.stderr b/tests/ui/feature-gates/feature-gate-repr-simd.stderr index 3bf8ec6170597..0f1929038fe00 100644 --- a/tests/ui/feature-gates/feature-gate-repr-simd.stderr +++ b/tests/ui/feature-gates/feature-gate-repr-simd.stderr @@ -49,7 +49,7 @@ LL | #[repr(simd)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #68585 - = note: `#[deny(conflicting_repr_hints)]` on by default + = note: `#[deny(conflicting_repr_hints)]` (part of `#[deny(future_incompatible)]`) on by default error[E0517]: attribute should be applied to a struct --> $DIR/feature-gate-repr-simd.rs:9:8 @@ -85,5 +85,5 @@ LL | #[repr(simd)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #68585 - = note: `#[deny(conflicting_repr_hints)]` on by default + = note: `#[deny(conflicting_repr_hints)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.rs b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.rs index 130dd48b0fe28..f391cf92fb639 100644 --- a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.rs +++ b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.rs @@ -40,7 +40,7 @@ mod inline { #[inline = "2100"] fn f() { } //~^ ERROR valid forms for the attribute are //~| WARN this was previously accepted - //~| NOTE #[deny(ill_formed_attribute_input)]` on by default + //~| NOTE `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default //~| NOTE for more information, see issue #57571 #[inline] struct S; diff --git a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr index 13dce72a8825a..14122d466c473 100644 --- a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr +++ b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr @@ -305,7 +305,7 @@ LL | #[inline = "2100"] fn f() { } | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 37 previous errors @@ -320,5 +320,5 @@ LL | #[inline = "2100"] fn f() { } | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/fn/error-recovery-mismatch.stderr b/tests/ui/fn/error-recovery-mismatch.stderr index 10dab3052be25..b4293500b3bc2 100644 --- a/tests/ui/fn/error-recovery-mismatch.stderr +++ b/tests/ui/fn/error-recovery-mismatch.stderr @@ -27,7 +27,7 @@ LL | fn fold(&self, _: T, &self._) {} | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #41686 - = note: `#[warn(anonymous_parameters)]` on by default + = note: `#[warn(anonymous_parameters)]` (part of `#[warn(rust_2018_compatibility)]`) on by default error[E0121]: the placeholder `_` is not allowed within types on item signatures for methods --> $DIR/error-recovery-mismatch.rs:11:35 diff --git a/tests/ui/generics/duplicate-generic-parameter-error-86756.stderr b/tests/ui/generics/duplicate-generic-parameter-error-86756.stderr index d4b2169ffd2dd..e761d15ff6708 100644 --- a/tests/ui/generics/duplicate-generic-parameter-error-86756.stderr +++ b/tests/ui/generics/duplicate-generic-parameter-error-86756.stderr @@ -20,7 +20,7 @@ LL | eq:: | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | eq:: diff --git a/tests/ui/generics/empty-generic-brackets-equiv.stderr b/tests/ui/generics/empty-generic-brackets-equiv.stderr index 151ee4697b4ca..aef4aa7cbf1e8 100644 --- a/tests/ui/generics/empty-generic-brackets-equiv.stderr +++ b/tests/ui/generics/empty-generic-brackets-equiv.stderr @@ -4,7 +4,7 @@ warning: trait `T` is never used LL | trait T<> {} | ^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/generics/invalid-type-param-default.stderr b/tests/ui/generics/invalid-type-param-default.stderr index 1c8fdd8ab5ca8..3bec7542ad003 100644 --- a/tests/ui/generics/invalid-type-param-default.stderr +++ b/tests/ui/generics/invalid-type-param-default.stderr @@ -12,7 +12,7 @@ LL | fn avg(_: T) {} | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #36887 - = note: `#[deny(invalid_type_param_default)]` on by default + = note: `#[deny(invalid_type_param_default)]` (part of `#[deny(future_incompatible)]`) on by default error: defaults for generic parameters are not allowed here --> $DIR/invalid-type-param-default.rs:12:8 @@ -44,7 +44,7 @@ LL | fn avg(_: T) {} | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #36887 - = note: `#[deny(invalid_type_param_default)]` on by default + = note: `#[deny(invalid_type_param_default)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error: defaults for generic parameters are not allowed here @@ -55,7 +55,7 @@ LL | fn mdn(_: T) {} | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #36887 - = note: `#[deny(invalid_type_param_default)]` on by default + = note: `#[deny(invalid_type_param_default)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error: defaults for generic parameters are not allowed here @@ -66,5 +66,5 @@ LL | impl S {} | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #36887 - = note: `#[deny(invalid_type_param_default)]` on by default + = note: `#[deny(invalid_type_param_default)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/generics/overlapping-errors-span-issue-123861.stderr b/tests/ui/generics/overlapping-errors-span-issue-123861.stderr index 44e8b4a01e7fd..f9dfb00723e81 100644 --- a/tests/ui/generics/overlapping-errors-span-issue-123861.stderr +++ b/tests/ui/generics/overlapping-errors-span-issue-123861.stderr @@ -23,7 +23,7 @@ LL | fn mainIterator<_ = _> {} | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #36887 - = note: `#[deny(invalid_type_param_default)]` on by default + = note: `#[deny(invalid_type_param_default)]` (part of `#[deny(future_incompatible)]`) on by default error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions --> $DIR/overlapping-errors-span-issue-123861.rs:1:21 @@ -43,5 +43,5 @@ LL | fn mainIterator<_ = _> {} | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #36887 - = note: `#[deny(invalid_type_param_default)]` on by default + = note: `#[deny(invalid_type_param_default)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/impl-trait/example-st.stderr b/tests/ui/impl-trait/example-st.stderr index f722d7f658215..eb998bf3bb312 100644 --- a/tests/ui/impl-trait/example-st.stderr +++ b/tests/ui/impl-trait/example-st.stderr @@ -4,7 +4,7 @@ warning: trait `Bind` is never used LL | trait Bind { | ^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.stderr b/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.stderr index 46b677202efa0..447f236def350 100644 --- a/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.stderr +++ b/tests/ui/impl-trait/fresh-lifetime-from-bare-trait-obj-114664.stderr @@ -6,7 +6,7 @@ LL | fn ice() -> impl AsRef { | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | fn ice() -> impl AsRef { diff --git a/tests/ui/impl-trait/in-trait/bad-item-bound-within-rpitit.stderr b/tests/ui/impl-trait/in-trait/bad-item-bound-within-rpitit.stderr index d3729b6c97370..8bc3c8b647c08 100644 --- a/tests/ui/impl-trait/in-trait/bad-item-bound-within-rpitit.stderr +++ b/tests/ui/impl-trait/in-trait/bad-item-bound-within-rpitit.stderr @@ -25,7 +25,7 @@ LL | fn iter(&self) -> impl 'a + Iterator> { | = note: add `#[allow(refining_impl_trait)]` if it is intended for this to be part of the public API of this crate = note: we are soliciting feedback, see issue #121718 for more information - = note: `#[warn(refining_impl_trait_reachable)]` on by default + = note: `#[warn(refining_impl_trait_reachable)]` (part of `#[warn(refining_impl_trait)]`) on by default help: replace the return type so that it matches the trait | LL - fn iter(&self) -> impl 'a + Iterator> { diff --git a/tests/ui/impl-trait/in-trait/expeced-refree-to-map-to-reearlybound-ice-108580.stderr b/tests/ui/impl-trait/in-trait/expeced-refree-to-map-to-reearlybound-ice-108580.stderr index 7c064cc717699..0a73a36378601 100644 --- a/tests/ui/impl-trait/in-trait/expeced-refree-to-map-to-reearlybound-ice-108580.stderr +++ b/tests/ui/impl-trait/in-trait/expeced-refree-to-map-to-reearlybound-ice-108580.stderr @@ -9,7 +9,7 @@ LL | fn bar(&self) -> impl Iterator + '_ { | = note: add `#[allow(refining_impl_trait)]` if it is intended for this to be part of the public API of this crate = note: we are soliciting feedback, see issue #121718 for more information - = note: `#[warn(refining_impl_trait_internal)]` on by default + = note: `#[warn(refining_impl_trait_internal)]` (part of `#[warn(refining_impl_trait)]`) on by default help: replace the return type so that it matches the trait | LL | fn bar(&self) -> impl Iterator + '_ { diff --git a/tests/ui/impl-trait/in-trait/refine-captures.stderr b/tests/ui/impl-trait/in-trait/refine-captures.stderr index 6f213f1614499..f7ba99c076342 100644 --- a/tests/ui/impl-trait/in-trait/refine-captures.stderr +++ b/tests/ui/impl-trait/in-trait/refine-captures.stderr @@ -6,7 +6,7 @@ LL | fn test() -> impl Sized + use<> {} | = note: add `#[allow(refining_impl_trait)]` if it is intended for this to be part of the public API of this crate = note: we are soliciting feedback, see issue #121718 for more information - = note: `#[warn(refining_impl_trait_internal)]` on by default + = note: `#[warn(refining_impl_trait_internal)]` (part of `#[warn(refining_impl_trait)]`) on by default help: modify the `use<..>` bound to capture the same lifetimes that the trait does | LL | fn test() -> impl Sized + use<'a> {} diff --git a/tests/ui/impl-trait/in-trait/unconstrained-lt.stderr b/tests/ui/impl-trait/in-trait/unconstrained-lt.stderr index 27340c5b362ee..3a4d90dfd4e8d 100644 --- a/tests/ui/impl-trait/in-trait/unconstrained-lt.stderr +++ b/tests/ui/impl-trait/in-trait/unconstrained-lt.stderr @@ -9,7 +9,7 @@ LL | fn test() -> &'a () { | = note: add `#[allow(refining_impl_trait)]` if it is intended for this to be part of the public API of this crate = note: we are soliciting feedback, see issue #121718 for more information - = note: `#[warn(refining_impl_trait_internal)]` on by default + = note: `#[warn(refining_impl_trait_internal)]` (part of `#[warn(refining_impl_trait)]`) on by default help: replace the return type so that it matches the trait | LL - fn test() -> &'a () { diff --git a/tests/ui/impl-trait/type-alias-generic-param.stderr b/tests/ui/impl-trait/type-alias-generic-param.stderr index e4115dc1319d1..0a063eed25735 100644 --- a/tests/ui/impl-trait/type-alias-generic-param.stderr +++ b/tests/ui/impl-trait/type-alias-generic-param.stderr @@ -4,7 +4,7 @@ warning: trait `Meow` is never used LL | trait Meow { | ^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/imports/ambiguous-10.stderr b/tests/ui/imports/ambiguous-10.stderr index cd36795b3c0f7..f175d27c99e98 100644 --- a/tests/ui/imports/ambiguous-10.stderr +++ b/tests/ui/imports/ambiguous-10.stderr @@ -19,7 +19,7 @@ note: `Token` could also refer to the enum imported here LL | use crate::b::*; | ^^^^^^^^^^^ = help: consider adding an explicit import of `Token` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 1 previous error @@ -45,5 +45,5 @@ note: `Token` could also refer to the enum imported here LL | use crate::b::*; | ^^^^^^^^^^^ = help: consider adding an explicit import of `Token` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/imports/ambiguous-12.stderr b/tests/ui/imports/ambiguous-12.stderr index 273a4ed3c0f06..5f92eae0dbcb1 100644 --- a/tests/ui/imports/ambiguous-12.stderr +++ b/tests/ui/imports/ambiguous-12.stderr @@ -19,7 +19,7 @@ note: `b` could also refer to the function imported here LL | use crate::public::*; | ^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `b` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 1 previous error @@ -45,5 +45,5 @@ note: `b` could also refer to the function imported here LL | use crate::public::*; | ^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `b` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/imports/ambiguous-13.stderr b/tests/ui/imports/ambiguous-13.stderr index c4a42c01c9148..279b4e8f1420a 100644 --- a/tests/ui/imports/ambiguous-13.stderr +++ b/tests/ui/imports/ambiguous-13.stderr @@ -19,7 +19,7 @@ note: `Rect` could also refer to the struct imported here LL | use crate::content::*; | ^^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `Rect` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 1 previous error @@ -45,5 +45,5 @@ note: `Rect` could also refer to the struct imported here LL | use crate::content::*; | ^^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `Rect` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/imports/ambiguous-14.stderr b/tests/ui/imports/ambiguous-14.stderr index f3115f8c8b516..ef7e2669bae4c 100644 --- a/tests/ui/imports/ambiguous-14.stderr +++ b/tests/ui/imports/ambiguous-14.stderr @@ -19,7 +19,7 @@ note: `foo` could also refer to the function imported here LL | pub use b::*; | ^^^^ = help: consider adding an explicit import of `foo` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 1 previous error @@ -45,5 +45,5 @@ note: `foo` could also refer to the function imported here LL | pub use b::*; | ^^^^ = help: consider adding an explicit import of `foo` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/imports/ambiguous-15.stderr b/tests/ui/imports/ambiguous-15.stderr index 1312f2c63c48f..15f83546532ec 100644 --- a/tests/ui/imports/ambiguous-15.stderr +++ b/tests/ui/imports/ambiguous-15.stderr @@ -19,7 +19,7 @@ note: `Error` could also refer to the enum imported here LL | pub use t2::*; | ^^^^^ = help: consider adding an explicit import of `Error` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 1 previous error @@ -45,5 +45,5 @@ note: `Error` could also refer to the enum imported here LL | pub use t2::*; | ^^^^^ = help: consider adding an explicit import of `Error` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/imports/ambiguous-16.stderr b/tests/ui/imports/ambiguous-16.stderr index ae65f9a84fc55..7c80dee17f040 100644 --- a/tests/ui/imports/ambiguous-16.stderr +++ b/tests/ui/imports/ambiguous-16.stderr @@ -19,7 +19,7 @@ note: `ConfirmedTranscriptHashInput` could also refer to the struct imported her LL | pub use self::public_message_in::*; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `ConfirmedTranscriptHashInput` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 1 previous error @@ -45,5 +45,5 @@ note: `ConfirmedTranscriptHashInput` could also refer to the struct imported her LL | pub use self::public_message_in::*; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `ConfirmedTranscriptHashInput` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/imports/ambiguous-17.stderr b/tests/ui/imports/ambiguous-17.stderr index a87e2572d630e..38491ce10628d 100644 --- a/tests/ui/imports/ambiguous-17.stderr +++ b/tests/ui/imports/ambiguous-17.stderr @@ -29,7 +29,7 @@ note: `id` could also refer to the function imported here LL | pub use handwritten::*; | ^^^^^^^^^^^^^^ = help: consider adding an explicit import of `id` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 1 previous error; 1 warning emitted @@ -55,5 +55,5 @@ note: `id` could also refer to the function imported here LL | pub use handwritten::*; | ^^^^^^^^^^^^^^ = help: consider adding an explicit import of `id` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/imports/ambiguous-3.stderr b/tests/ui/imports/ambiguous-3.stderr index 8766db5654a12..27fa05a195b94 100644 --- a/tests/ui/imports/ambiguous-3.stderr +++ b/tests/ui/imports/ambiguous-3.stderr @@ -19,7 +19,7 @@ note: `x` could also refer to the function imported here LL | pub use self::c::*; | ^^^^^^^^^^ = help: consider adding an explicit import of `x` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 1 previous error @@ -45,5 +45,5 @@ note: `x` could also refer to the function imported here LL | pub use self::c::*; | ^^^^^^^^^^ = help: consider adding an explicit import of `x` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/imports/ambiguous-5.stderr b/tests/ui/imports/ambiguous-5.stderr index 41c1580935108..1fc5f4543f358 100644 --- a/tests/ui/imports/ambiguous-5.stderr +++ b/tests/ui/imports/ambiguous-5.stderr @@ -19,7 +19,7 @@ note: `Class` could also refer to the struct imported here LL | use super::gsubgpos::*; | ^^^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `Class` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 1 previous error @@ -45,5 +45,5 @@ note: `Class` could also refer to the struct imported here LL | use super::gsubgpos::*; | ^^^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `Class` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/imports/ambiguous-6.stderr b/tests/ui/imports/ambiguous-6.stderr index d988126dbfbd6..681bc40931f52 100644 --- a/tests/ui/imports/ambiguous-6.stderr +++ b/tests/ui/imports/ambiguous-6.stderr @@ -19,7 +19,7 @@ note: `C` could also refer to the constant imported here LL | pub use mod2::*; | ^^^^^^^ = help: consider adding an explicit import of `C` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 1 previous error @@ -45,5 +45,5 @@ note: `C` could also refer to the constant imported here LL | pub use mod2::*; | ^^^^^^^ = help: consider adding an explicit import of `C` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/imports/ambiguous-9.stderr b/tests/ui/imports/ambiguous-9.stderr index 1c4768da827ac..800a2e10c9d78 100644 --- a/tests/ui/imports/ambiguous-9.stderr +++ b/tests/ui/imports/ambiguous-9.stderr @@ -29,7 +29,7 @@ note: `date_range` could also refer to the function imported here LL | use super::prelude::*; | ^^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `date_range` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default warning: ambiguous glob re-exports --> $DIR/ambiguous-9.rs:15:13 @@ -85,7 +85,7 @@ note: `date_range` could also refer to the function imported here LL | use super::prelude::*; | ^^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `date_range` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error: `date_range` is ambiguous @@ -109,5 +109,5 @@ note: `date_range` could also refer to the function imported here LL | use prelude::*; | ^^^^^^^^^^ = help: consider adding an explicit import of `date_range` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/imports/duplicate.stderr b/tests/ui/imports/duplicate.stderr index ef987d07c042b..5cd3b0c2c8a55 100644 --- a/tests/ui/imports/duplicate.stderr +++ b/tests/ui/imports/duplicate.stderr @@ -89,7 +89,7 @@ note: `foo` could also refer to the function imported here LL | pub use crate::b::*; | ^^^^^^^^^^^ = help: consider adding an explicit import of `foo` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 5 previous errors @@ -117,5 +117,5 @@ note: `foo` could also refer to the function imported here LL | pub use crate::b::*; | ^^^^^^^^^^^ = help: consider adding an explicit import of `foo` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/imports/local-modularized-tricky-fail-2.stderr b/tests/ui/imports/local-modularized-tricky-fail-2.stderr index ea4056b3d7504..e5b48d2efdddc 100644 --- a/tests/ui/imports/local-modularized-tricky-fail-2.stderr +++ b/tests/ui/imports/local-modularized-tricky-fail-2.stderr @@ -16,7 +16,7 @@ LL | | } ... LL | define_exported!(); | ------------------ in this macro invocation - = note: `#[deny(macro_expanded_macro_exports_accessed_by_absolute_paths)]` on by default + = note: `#[deny(macro_expanded_macro_exports_accessed_by_absolute_paths)]` (part of `#[deny(future_incompatible)]`) on by default = note: this error originates in the macro `define_exported` (in Nightly builds, run with -Z macro-backtrace for more info) error: macro-expanded `macro_export` macros from the current crate cannot be referred to by absolute paths @@ -60,7 +60,7 @@ LL | | } ... LL | define_exported!(); | ------------------ in this macro invocation - = note: `#[deny(macro_expanded_macro_exports_accessed_by_absolute_paths)]` on by default + = note: `#[deny(macro_expanded_macro_exports_accessed_by_absolute_paths)]` (part of `#[deny(future_incompatible)]`) on by default = note: this error originates in the macro `define_exported` (in Nightly builds, run with -Z macro-backtrace for more info) Future breakage diagnostic: @@ -82,6 +82,6 @@ LL | | } ... LL | define_exported!(); | ------------------ in this macro invocation - = note: `#[deny(macro_expanded_macro_exports_accessed_by_absolute_paths)]` on by default + = note: `#[deny(macro_expanded_macro_exports_accessed_by_absolute_paths)]` (part of `#[deny(future_incompatible)]`) on by default = note: this error originates in the macro `define_exported` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/imports/unresolved-seg-after-ambiguous.stderr b/tests/ui/imports/unresolved-seg-after-ambiguous.stderr index 3b50ae32683e7..67316462a27e9 100644 --- a/tests/ui/imports/unresolved-seg-after-ambiguous.stderr +++ b/tests/ui/imports/unresolved-seg-after-ambiguous.stderr @@ -25,7 +25,7 @@ note: `E` could also refer to the struct imported here LL | pub use self::d::*; | ^^^^^^^^^^ = help: consider adding an explicit import of `E` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 2 previous errors @@ -52,5 +52,5 @@ note: `E` could also refer to the struct imported here LL | pub use self::d::*; | ^^^^^^^^^^ = help: consider adding an explicit import of `E` to disambiguate - = note: `#[deny(ambiguous_glob_imports)]` on by default + = note: `#[deny(ambiguous_glob_imports)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/inference/inference-variable-behind-raw-pointer.stderr b/tests/ui/inference/inference-variable-behind-raw-pointer.stderr index 3dea09e7f5282..fe4e16c332869 100644 --- a/tests/ui/inference/inference-variable-behind-raw-pointer.stderr +++ b/tests/ui/inference/inference-variable-behind-raw-pointer.stderr @@ -6,7 +6,7 @@ LL | if data.is_null() {} | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #46906 - = note: `#[warn(tyvar_behind_raw_pointer)]` on by default + = note: `#[warn(tyvar_behind_raw_pointer)]` (part of `#[warn(rust_2018_compatibility)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/inference/inference_unstable.stderr b/tests/ui/inference/inference_unstable.stderr index 395dcb2661f11..0072175d51403 100644 --- a/tests/ui/inference/inference_unstable.stderr +++ b/tests/ui/inference/inference_unstable.stderr @@ -7,7 +7,7 @@ LL | assert_eq!('x'.ipu_flatten(), 1); = warning: once this associated item is added to the standard library, the ambiguity may cause an error or change in behavior! = note: for more information, see issue #48919 = help: call with fully qualified syntax `inference_unstable_itertools::IpuItertools::ipu_flatten(...)` to keep using the current method - = note: `#[warn(unstable_name_collisions)]` on by default + = note: `#[warn(unstable_name_collisions)]` (part of `#[warn(future_incompatible)]`) on by default help: add `#![feature(ipu_flatten)]` to the crate attributes to enable `inference_unstable_iterator::IpuIterator::ipu_flatten` | LL + #![feature(ipu_flatten)] diff --git a/tests/ui/issues/issue-17351.stderr b/tests/ui/issues/issue-17351.stderr index e4c84ab9315ab..043d4ffc78082 100644 --- a/tests/ui/issues/issue-17351.stderr +++ b/tests/ui/issues/issue-17351.stderr @@ -6,7 +6,7 @@ LL | trait Str { fn foo(&self) {} } | | | method in this trait | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/issues/issue-20055-box-trait.stderr b/tests/ui/issues/issue-20055-box-trait.stderr index db9d359e2252c..b1cbb2a571733 100644 --- a/tests/ui/issues/issue-20055-box-trait.stderr +++ b/tests/ui/issues/issue-20055-box-trait.stderr @@ -6,7 +6,7 @@ LL | trait Boo { LL | fn dummy(&self) { } | ^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/issues/issue-23485.stderr b/tests/ui/issues/issue-23485.stderr index ed2d2400d0d93..7ad518e449bd9 100644 --- a/tests/ui/issues/issue-23485.stderr +++ b/tests/ui/issues/issue-23485.stderr @@ -7,7 +7,7 @@ LL | trait Iterator { LL | fn clone_first(mut self) -> Option<::Target> where | ^^^^^^^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/issues/issue-28344.stderr b/tests/ui/issues/issue-28344.stderr index dfd4951f172c6..c23b5767302c9 100644 --- a/tests/ui/issues/issue-28344.stderr +++ b/tests/ui/issues/issue-28344.stderr @@ -6,7 +6,7 @@ LL | let x: u8 = BitXor::bitor(0 as u8, 0 as u8); | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | let x: u8 = ::bitor(0 as u8, 0 as u8); diff --git a/tests/ui/issues/issue-2989.stderr b/tests/ui/issues/issue-2989.stderr index 57181607cecd3..500ace8f2753e 100644 --- a/tests/ui/issues/issue-2989.stderr +++ b/tests/ui/issues/issue-2989.stderr @@ -4,7 +4,7 @@ warning: trait `methods` is never used LL | trait methods { | ^^^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/issues/issue-34503.stderr b/tests/ui/issues/issue-34503.stderr index 60d8d76a61965..1877e20bbc14d 100644 --- a/tests/ui/issues/issue-34503.stderr +++ b/tests/ui/issues/issue-34503.stderr @@ -8,7 +8,7 @@ LL | fn foo(&self) where (T, Option): Ord {} LL | fn bar(&self, x: &Option) -> bool | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/issues/issue-39367.stderr b/tests/ui/issues/issue-39367.stderr index 65076375e96ee..1592b8b6672c7 100644 --- a/tests/ui/issues/issue-39367.stderr +++ b/tests/ui/issues/issue-39367.stderr @@ -11,7 +11,7 @@ LL | | }); | = note: for more information, see = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives - = note: `#[warn(static_mut_refs)]` on by default + = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/issues/issue-47094.stderr b/tests/ui/issues/issue-47094.stderr index 1c6693403b85b..da414d68214a8 100644 --- a/tests/ui/issues/issue-47094.stderr +++ b/tests/ui/issues/issue-47094.stderr @@ -6,7 +6,7 @@ LL | #[repr(C, u8)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #68585 - = note: `#[deny(conflicting_repr_hints)]` on by default + = note: `#[deny(conflicting_repr_hints)]` (part of `#[deny(future_incompatible)]`) on by default error[E0566]: conflicting representation hints --> $DIR/issue-47094.rs:8:8 @@ -32,7 +32,7 @@ LL | #[repr(C, u8)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #68585 - = note: `#[deny(conflicting_repr_hints)]` on by default + = note: `#[deny(conflicting_repr_hints)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error[E0566]: conflicting representation hints @@ -46,5 +46,5 @@ LL | #[repr(u8)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #68585 - = note: `#[deny(conflicting_repr_hints)]` on by default + = note: `#[deny(conflicting_repr_hints)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/issues/issue-58734.stderr b/tests/ui/issues/issue-58734.stderr index c246d1fc11119..2336a94f1504d 100644 --- a/tests/ui/issues/issue-58734.stderr +++ b/tests/ui/issues/issue-58734.stderr @@ -6,7 +6,7 @@ LL | Trait::nonexistent(()); | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | ::nonexistent(()); diff --git a/tests/ui/issues/issue-72278.stderr b/tests/ui/issues/issue-72278.stderr index 5468837a30591..91efada3d8d12 100644 --- a/tests/ui/issues/issue-72278.stderr +++ b/tests/ui/issues/issue-72278.stderr @@ -9,7 +9,7 @@ LL | S.func::<'a, U>() | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #42868 - = note: `#[warn(late_bound_lifetime_arguments)]` on by default + = note: `#[warn(late_bound_lifetime_arguments)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/iterators/into-iter-on-arrays-2018.stderr b/tests/ui/iterators/into-iter-on-arrays-2018.stderr index 8818ef80f76e5..6419d779b4f57 100644 --- a/tests/ui/iterators/into-iter-on-arrays-2018.stderr +++ b/tests/ui/iterators/into-iter-on-arrays-2018.stderr @@ -6,7 +6,7 @@ LL | let _: Iter<'_, i32> = array.into_iter(); | = warning: this changes meaning in Rust 2021 = note: for more information, see - = note: `#[warn(array_into_iter)]` on by default + = note: `#[warn(array_into_iter)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: use `.iter()` instead of `.into_iter()` to avoid ambiguity | LL - let _: Iter<'_, i32> = array.into_iter(); diff --git a/tests/ui/iterators/into-iter-on-arrays-lint.stderr b/tests/ui/iterators/into-iter-on-arrays-lint.stderr index a9dfa5819c145..a3eb3133a00f3 100644 --- a/tests/ui/iterators/into-iter-on-arrays-lint.stderr +++ b/tests/ui/iterators/into-iter-on-arrays-lint.stderr @@ -6,7 +6,7 @@ LL | small.into_iter(); | = warning: this changes meaning in Rust 2021 = note: for more information, see - = note: `#[warn(array_into_iter)]` on by default + = note: `#[warn(array_into_iter)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: use `.iter()` instead of `.into_iter()` to avoid ambiguity | LL - small.into_iter(); diff --git a/tests/ui/iterators/into-iter-on-boxed-slices-2021.stderr b/tests/ui/iterators/into-iter-on-boxed-slices-2021.stderr index a0c1432756d4d..d2df6a2f40c6d 100644 --- a/tests/ui/iterators/into-iter-on-boxed-slices-2021.stderr +++ b/tests/ui/iterators/into-iter-on-boxed-slices-2021.stderr @@ -6,7 +6,7 @@ LL | let _: Iter<'_, i32> = boxed_slice.into_iter(); | = warning: this changes meaning in Rust 2024 = note: for more information, see - = note: `#[warn(boxed_slice_into_iter)]` on by default + = note: `#[warn(boxed_slice_into_iter)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `.iter()` instead of `.into_iter()` to avoid ambiguity | LL - let _: Iter<'_, i32> = boxed_slice.into_iter(); diff --git a/tests/ui/iterators/into-iter-on-boxed-slices-lint.stderr b/tests/ui/iterators/into-iter-on-boxed-slices-lint.stderr index 377455d6a2606..670a741ab8bd0 100644 --- a/tests/ui/iterators/into-iter-on-boxed-slices-lint.stderr +++ b/tests/ui/iterators/into-iter-on-boxed-slices-lint.stderr @@ -6,7 +6,7 @@ LL | boxed.into_iter(); | = warning: this changes meaning in Rust 2024 = note: for more information, see - = note: `#[warn(boxed_slice_into_iter)]` on by default + = note: `#[warn(boxed_slice_into_iter)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `.iter()` instead of `.into_iter()` to avoid ambiguity | LL - boxed.into_iter(); diff --git a/tests/ui/lang-items/issue-83471.stderr b/tests/ui/lang-items/issue-83471.stderr index e913c0bf10fd0..28fa552fbeb4d 100644 --- a/tests/ui/lang-items/issue-83471.stderr +++ b/tests/ui/lang-items/issue-83471.stderr @@ -48,7 +48,7 @@ LL | fn call(export_name); | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #41686 - = note: `#[warn(anonymous_parameters)]` on by default + = note: `#[warn(anonymous_parameters)]` (part of `#[warn(rust_2018_compatibility)]`) on by default error[E0718]: `fn` lang item must be applied to a trait with 1 generic argument --> $DIR/issue-83471.rs:19:1 diff --git a/tests/ui/lifetimes/unusual-rib-combinations.stderr b/tests/ui/lifetimes/unusual-rib-combinations.stderr index bd68479c58c54..7f44ab2ed6b43 100644 --- a/tests/ui/lifetimes/unusual-rib-combinations.stderr +++ b/tests/ui/lifetimes/unusual-rib-combinations.stderr @@ -30,7 +30,7 @@ LL | fn c() {} | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #36887 - = note: `#[deny(invalid_type_param_default)]` on by default + = note: `#[deny(invalid_type_param_default)]` (part of `#[deny(future_incompatible)]`) on by default error[E0308]: mismatched types --> $DIR/unusual-rib-combinations.rs:5:16 @@ -51,5 +51,5 @@ LL | fn c() {} | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #36887 - = note: `#[deny(invalid_type_param_default)]` on by default + = note: `#[deny(invalid_type_param_default)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/link-native-libs/link-attr-validation-early.stderr b/tests/ui/link-native-libs/link-attr-validation-early.stderr index 36cca6f27ef16..d4fc2e272f855 100644 --- a/tests/ui/link-native-libs/link-attr-validation-early.stderr +++ b/tests/ui/link-native-libs/link-attr-validation-early.stderr @@ -7,7 +7,7 @@ LL | #[link] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 = note: for more information, visit - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default error: valid forms for the attribute are `#[link(name = "...")]`, `#[link(name = "...", kind = "dylib|static|...")]`, `#[link(name = "...", wasm_import_module = "...")]`, `#[link(name = "...", import_name_type = "decorated|noprefix|undecorated")]`, and `#[link(name = "...", kind = "dylib|static|...", wasm_import_module = "...", import_name_type = "decorated|noprefix|undecorated")]` --> $DIR/link-attr-validation-early.rs:4:1 @@ -31,7 +31,7 @@ LL | #[link] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 = note: for more information, visit - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error: valid forms for the attribute are `#[link(name = "...")]`, `#[link(name = "...", kind = "dylib|static|...")]`, `#[link(name = "...", wasm_import_module = "...")]`, `#[link(name = "...", import_name_type = "decorated|noprefix|undecorated")]`, and `#[link(name = "...", kind = "dylib|static|...", wasm_import_module = "...", import_name_type = "decorated|noprefix|undecorated")]` @@ -43,5 +43,5 @@ LL | #[link = "foo"] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 = note: for more information, visit - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.stderr b/tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.stderr index 91e42f2909e0c..8727e55f4cefb 100644 --- a/tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.stderr +++ b/tests/ui/linkage-attr/raw-dylib/windows/unsupported-abi.stderr @@ -12,7 +12,7 @@ LL | | } = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #137018 = help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"` - = note: `#[warn(unsupported_calling_conventions)]` on by default + = note: `#[warn(unsupported_calling_conventions)]` (part of `#[warn(future_incompatible)]`) on by default error: ABI not supported by `#[link(kind = "raw-dylib")]` on this architecture --> $DIR/unsupported-abi.rs:16:5 diff --git a/tests/ui/lint/bare-trait-objects-path.stderr b/tests/ui/lint/bare-trait-objects-path.stderr index 8da63a9c546f3..5d756db23191c 100644 --- a/tests/ui/lint/bare-trait-objects-path.stderr +++ b/tests/ui/lint/bare-trait-objects-path.stderr @@ -6,7 +6,7 @@ LL | Dyn::func(); | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | ::func(); diff --git a/tests/ui/lint/forbid-group-member.stderr b/tests/ui/lint/forbid-group-member.stderr index 2e0147693f333..54f56ecbe64a8 100644 --- a/tests/ui/lint/forbid-group-member.stderr +++ b/tests/ui/lint/forbid-group-member.stderr @@ -9,7 +9,7 @@ LL | #[allow(unused_variables)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #81670 - = note: `#[warn(forbidden_lint_groups)]` on by default + = note: `#[warn(forbidden_lint_groups)]` (part of `#[warn(future_incompatible)]`) on by default warning: 1 warning emitted @@ -25,5 +25,5 @@ LL | #[allow(unused_variables)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #81670 - = note: `#[warn(forbidden_lint_groups)]` on by default + = note: `#[warn(forbidden_lint_groups)]` (part of `#[warn(future_incompatible)]`) on by default diff --git a/tests/ui/lint/future-incompatible-lint-group.stderr b/tests/ui/lint/future-incompatible-lint-group.stderr index 87b9ebec08b37..4157cd0c77d94 100644 --- a/tests/ui/lint/future-incompatible-lint-group.stderr +++ b/tests/ui/lint/future-incompatible-lint-group.stderr @@ -6,7 +6,7 @@ LL | fn f(u8) {} | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #41686 - = note: `#[warn(anonymous_parameters)]` on by default + = note: `#[warn(anonymous_parameters)]` (part of `#[warn(rust_2018_compatibility)]`) on by default error: ambiguous associated item --> $DIR/future-incompatible-lint-group.rs:18:17 diff --git a/tests/ui/lint/let_underscore/let_underscore_lock.stderr b/tests/ui/lint/let_underscore/let_underscore_lock.stderr index a54a23e364b3b..d70dab32e3e08 100644 --- a/tests/ui/lint/let_underscore/let_underscore_lock.stderr +++ b/tests/ui/lint/let_underscore/let_underscore_lock.stderr @@ -4,7 +4,7 @@ error: non-binding let on a synchronization lock LL | let _ = data.lock().unwrap(); | ^ this lock is not assigned to a binding and is immediately dropped | - = note: `#[deny(let_underscore_lock)]` on by default + = note: `#[deny(let_underscore_lock)]` (part of `#[deny(let_underscore)]`) on by default help: consider binding to an unused variable to avoid immediately dropping the value | LL | let _unused = data.lock().unwrap(); diff --git a/tests/ui/lint/lint-non-uppercase-usages.stderr b/tests/ui/lint/lint-non-uppercase-usages.stderr index b34be31216d3a..5dde4d4c89dcb 100644 --- a/tests/ui/lint/lint-non-uppercase-usages.stderr +++ b/tests/ui/lint/lint-non-uppercase-usages.stderr @@ -4,7 +4,7 @@ warning: constant `my_static` should have an upper case name LL | const my_static: u32 = 0; | ^^^^^^^^^ | - = note: `#[warn(non_upper_case_globals)]` on by default + = note: `#[warn(non_upper_case_globals)]` (part of `#[warn(nonstandard_style)]`) on by default help: convert the identifier to upper case | LL - const my_static: u32 = 0; diff --git a/tests/ui/lint/rfc-2457-non-ascii-idents/lint-uncommon-codepoints.stderr b/tests/ui/lint/rfc-2457-non-ascii-idents/lint-uncommon-codepoints.stderr index 000545a060075..1ba4deded461c 100644 --- a/tests/ui/lint/rfc-2457-non-ascii-idents/lint-uncommon-codepoints.stderr +++ b/tests/ui/lint/rfc-2457-non-ascii-idents/lint-uncommon-codepoints.stderr @@ -33,7 +33,7 @@ warning: constant `µ` should have an upper case name LL | const µ: f64 = 0.000001; | ^ help: convert the identifier to upper case: `Μ` | - = note: `#[warn(non_upper_case_globals)]` on by default + = note: `#[warn(non_upper_case_globals)]` (part of `#[warn(nonstandard_style)]`) on by default error: aborting due to 3 previous errors; 1 warning emitted diff --git a/tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.stderr b/tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.stderr index 99cdcafab39a4..9506d702f51f1 100644 --- a/tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.stderr +++ b/tests/ui/lint/semicolon-in-expressions-from-macros/warn-semicolon-in-expressions-from-macros.stderr @@ -9,7 +9,7 @@ LL | _ => foo!() | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #79813 - = note: `#[deny(semicolon_in_expressions_from_macros)]` on by default + = note: `#[deny(semicolon_in_expressions_from_macros)]` (part of `#[deny(future_incompatible)]`) on by default = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error @@ -26,6 +26,6 @@ LL | _ => foo!() | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #79813 - = note: `#[deny(semicolon_in_expressions_from_macros)]` on by default + = note: `#[deny(semicolon_in_expressions_from_macros)]` (part of `#[deny(future_incompatible)]`) on by default = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/lint/special-upper-lower-cases.stderr b/tests/ui/lint/special-upper-lower-cases.stderr index 2aa13c33be3a6..0f5cf336aec2d 100644 --- a/tests/ui/lint/special-upper-lower-cases.stderr +++ b/tests/ui/lint/special-upper-lower-cases.stderr @@ -4,7 +4,7 @@ warning: type `𝕟𝕠𝕥𝕒𝕔𝕒𝕞𝕖𝕝` should have an upper camel LL | struct 𝕟𝕠𝕥𝕒𝕔𝕒𝕞𝕖𝕝; | ^^^^^^^^^ should have an UpperCamelCase name | - = note: `#[warn(non_camel_case_types)]` on by default + = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default warning: type `𝕟𝕠𝕥_𝕒_𝕔𝕒𝕞𝕖𝕝` should have an upper camel case name --> $DIR/special-upper-lower-cases.rs:14:8 @@ -18,7 +18,7 @@ warning: static variable `𝗻𝗼𝗻𝘂𝗽𝗽𝗲𝗿𝗰𝗮𝘀𝗲` shou LL | static 𝗻𝗼𝗻𝘂𝗽𝗽𝗲𝗿𝗰𝗮𝘀𝗲: i32 = 1; | ^^^^^^^^^^^^ should have an UPPER_CASE name | - = note: `#[warn(non_upper_case_globals)]` on by default + = note: `#[warn(non_upper_case_globals)]` (part of `#[warn(nonstandard_style)]`) on by default warning: variable `𝓢𝓝𝓐𝓐𝓐𝓐𝓚𝓔𝓢` should have a snake case name --> $DIR/special-upper-lower-cases.rs:21:9 @@ -26,7 +26,7 @@ warning: variable `𝓢𝓝𝓐𝓐𝓐𝓐𝓚𝓔𝓢` should have a snake cas LL | let 𝓢𝓝𝓐𝓐𝓐𝓐𝓚𝓔𝓢 = 1; | ^^^^^^^^^ should have a snake_case name | - = note: `#[warn(non_snake_case)]` on by default + = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default warning: 4 warnings emitted diff --git a/tests/ui/lint/static-mut-refs.e2021.stderr b/tests/ui/lint/static-mut-refs.e2021.stderr index 75a7e60690cf2..86854ab2ddab2 100644 --- a/tests/ui/lint/static-mut-refs.e2021.stderr +++ b/tests/ui/lint/static-mut-refs.e2021.stderr @@ -6,7 +6,7 @@ LL | let _y = &X; | = note: for more information, see = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives - = note: `#[warn(static_mut_refs)]` on by default + = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `&raw const` instead to create a raw pointer | LL | let _y = &raw const X; diff --git a/tests/ui/lint/static-mut-refs.e2024.stderr b/tests/ui/lint/static-mut-refs.e2024.stderr index 42a96bafc8827..5c21c5b0dd9b3 100644 --- a/tests/ui/lint/static-mut-refs.e2024.stderr +++ b/tests/ui/lint/static-mut-refs.e2024.stderr @@ -6,7 +6,7 @@ LL | let _y = &X; | = note: for more information, see = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives - = note: `#[deny(static_mut_refs)]` on by default + = note: `#[deny(static_mut_refs)]` (part of `#[deny(rust_2024_compatibility)]`) on by default help: use `&raw const` instead to create a raw pointer | LL | let _y = &raw const X; diff --git a/tests/ui/lint/unused/issue-70041.stderr b/tests/ui/lint/unused/issue-70041.stderr index b2e6d1aeb3f50..4a2c4b8b90746 100644 --- a/tests/ui/lint/unused/issue-70041.stderr +++ b/tests/ui/lint/unused/issue-70041.stderr @@ -4,7 +4,7 @@ warning: unused macro definition: `regex` LL | macro_rules! regex { | ^^^^^ | - = note: `#[warn(unused_macros)]` on by default + = note: `#[warn(unused_macros)]` (part of `#[warn(unused)]`) on by default warning: unused import: `regex` --> $DIR/issue-70041.rs:10:5 @@ -12,7 +12,7 @@ warning: unused import: `regex` LL | use regex; | ^^^^^ | - = note: `#[warn(unused_imports)]` on by default + = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default warning: 2 warnings emitted diff --git a/tests/ui/macros/issue-111749.stderr b/tests/ui/macros/issue-111749.stderr index 884537ef53195..ae953e042e094 100644 --- a/tests/ui/macros/issue-111749.stderr +++ b/tests/ui/macros/issue-111749.stderr @@ -12,7 +12,7 @@ LL | cbor_map! { #[test(test)] 4}; | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 2 previous errors @@ -25,5 +25,5 @@ LL | cbor_map! { #[test(test)] 4}; | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/macros/lint-trailing-macro-call.stderr b/tests/ui/macros/lint-trailing-macro-call.stderr index 3fd1ea813459f..cf836abb80f4a 100644 --- a/tests/ui/macros/lint-trailing-macro-call.stderr +++ b/tests/ui/macros/lint-trailing-macro-call.stderr @@ -11,7 +11,7 @@ LL | expand_it!() = note: for more information, see issue #79813 = note: macro invocations at the end of a block are treated as expressions = note: to ignore the value produced by the macro, add a semicolon after the invocation of `expand_it` - = note: `#[deny(semicolon_in_expressions_from_macros)]` on by default + = note: `#[deny(semicolon_in_expressions_from_macros)]` (part of `#[deny(future_incompatible)]`) on by default = note: this error originates in the macro `expand_it` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error @@ -30,6 +30,6 @@ LL | expand_it!() = note: for more information, see issue #79813 = note: macro invocations at the end of a block are treated as expressions = note: to ignore the value produced by the macro, add a semicolon after the invocation of `expand_it` - = note: `#[deny(semicolon_in_expressions_from_macros)]` on by default + = note: `#[deny(semicolon_in_expressions_from_macros)]` (part of `#[deny(future_incompatible)]`) on by default = note: this error originates in the macro `expand_it` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/macros/macro-context.stderr b/tests/ui/macros/macro-context.stderr index 6b49c05f360da..2efc0b136bc14 100644 --- a/tests/ui/macros/macro-context.stderr +++ b/tests/ui/macros/macro-context.stderr @@ -75,7 +75,7 @@ LL | let i = m!(); | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #79813 - = note: `#[deny(semicolon_in_expressions_from_macros)]` on by default + = note: `#[deny(semicolon_in_expressions_from_macros)]` (part of `#[deny(future_incompatible)]`) on by default = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 7 previous errors @@ -94,6 +94,6 @@ LL | let i = m!(); | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #79813 - = note: `#[deny(semicolon_in_expressions_from_macros)]` on by default + = note: `#[deny(semicolon_in_expressions_from_macros)]` (part of `#[deny(future_incompatible)]`) on by default = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/macros/macro-in-expression-context.fixed b/tests/ui/macros/macro-in-expression-context.fixed index 52e1b429e48ac..1d767266025f5 100644 --- a/tests/ui/macros/macro-in-expression-context.fixed +++ b/tests/ui/macros/macro-in-expression-context.fixed @@ -8,7 +8,7 @@ macro_rules! foo { //~| NOTE macro invocations at the end of a block //~| NOTE to ignore the value produced by the macro //~| NOTE for more information - //~| NOTE `#[deny(semicolon_in_expressions_from_macros)]` on by default + //~| NOTE `#[deny(semicolon_in_expressions_from_macros)]` (part of `#[deny(future_incompatible)]`) on by default assert_eq!("B", "B"); } //~^^ ERROR macro expansion ignores `assert_eq` and any tokens following diff --git a/tests/ui/macros/macro-in-expression-context.rs b/tests/ui/macros/macro-in-expression-context.rs index 5c560e78dad4c..0bdead1b48021 100644 --- a/tests/ui/macros/macro-in-expression-context.rs +++ b/tests/ui/macros/macro-in-expression-context.rs @@ -8,7 +8,7 @@ macro_rules! foo { //~| NOTE macro invocations at the end of a block //~| NOTE to ignore the value produced by the macro //~| NOTE for more information - //~| NOTE `#[deny(semicolon_in_expressions_from_macros)]` on by default + //~| NOTE `#[deny(semicolon_in_expressions_from_macros)]` (part of `#[deny(future_incompatible)]`) on by default assert_eq!("B", "B"); } //~^^ ERROR macro expansion ignores `assert_eq` and any tokens following diff --git a/tests/ui/macros/macro-in-expression-context.stderr b/tests/ui/macros/macro-in-expression-context.stderr index b04348d701089..ce5abdb94b2e2 100644 --- a/tests/ui/macros/macro-in-expression-context.stderr +++ b/tests/ui/macros/macro-in-expression-context.stderr @@ -26,7 +26,7 @@ LL | foo!() = note: for more information, see issue #79813 = note: macro invocations at the end of a block are treated as expressions = note: to ignore the value produced by the macro, add a semicolon after the invocation of `foo` - = note: `#[deny(semicolon_in_expressions_from_macros)]` on by default + = note: `#[deny(semicolon_in_expressions_from_macros)]` (part of `#[deny(future_incompatible)]`) on by default = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 2 previous errors @@ -45,6 +45,6 @@ LL | foo!() = note: for more information, see issue #79813 = note: macro invocations at the end of a block are treated as expressions = note: to ignore the value produced by the macro, add a semicolon after the invocation of `foo` - = note: `#[deny(semicolon_in_expressions_from_macros)]` on by default + = note: `#[deny(semicolon_in_expressions_from_macros)]` (part of `#[deny(future_incompatible)]`) on by default = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/macros/macro-self-mutability-7911.stderr b/tests/ui/macros/macro-self-mutability-7911.stderr index 7fc2abe06eb39..43335aee3ead8 100644 --- a/tests/ui/macros/macro-self-mutability-7911.stderr +++ b/tests/ui/macros/macro-self-mutability-7911.stderr @@ -6,7 +6,7 @@ LL | trait FooBar { LL | fn dummy(&self) { } | ^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/macros/non-fmt-panic.stderr b/tests/ui/macros/non-fmt-panic.stderr index 83410d365864c..1787316b48bb1 100644 --- a/tests/ui/macros/non-fmt-panic.stderr +++ b/tests/ui/macros/non-fmt-panic.stderr @@ -5,7 +5,7 @@ LL | panic!("here's a brace: {"); | ^ | = note: this message is not used as a format string, but will be in Rust 2021 - = note: `#[warn(non_fmt_panics)]` on by default + = note: `#[warn(non_fmt_panics)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: add a "{}" format string to use the message literally | LL | panic!("{}", "here's a brace: {"); diff --git a/tests/ui/malformed/malformed-regressions.stderr b/tests/ui/malformed/malformed-regressions.stderr index 4a00c9b4a7d8e..cab347a8062e4 100644 --- a/tests/ui/malformed/malformed-regressions.stderr +++ b/tests/ui/malformed/malformed-regressions.stderr @@ -7,7 +7,7 @@ LL | #[doc] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 = note: for more information, visit - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default error: valid forms for the attribute are `#[link(name = "...")]`, `#[link(name = "...", kind = "dylib|static|...")]`, `#[link(name = "...", wasm_import_module = "...")]`, `#[link(name = "...", import_name_type = "decorated|noprefix|undecorated")]`, and `#[link(name = "...", kind = "dylib|static|...", wasm_import_module = "...", import_name_type = "decorated|noprefix|undecorated")]` --> $DIR/malformed-regressions.rs:7:1 @@ -59,7 +59,7 @@ LL | #[doc] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 = note: for more information, visit - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error: valid forms for the attribute are `#[link(name = "...")]`, `#[link(name = "...", kind = "dylib|static|...")]`, `#[link(name = "...", wasm_import_module = "...")]`, `#[link(name = "...", import_name_type = "decorated|noprefix|undecorated")]`, and `#[link(name = "...", kind = "dylib|static|...", wasm_import_module = "...", import_name_type = "decorated|noprefix|undecorated")]` @@ -71,7 +71,7 @@ LL | #[link] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 = note: for more information, visit - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error: valid forms for the attribute are `#[link(name = "...")]`, `#[link(name = "...", kind = "dylib|static|...")]`, `#[link(name = "...", wasm_import_module = "...")]`, `#[link(name = "...", import_name_type = "decorated|noprefix|undecorated")]`, and `#[link(name = "...", kind = "dylib|static|...", wasm_import_module = "...", import_name_type = "decorated|noprefix|undecorated")]` @@ -83,7 +83,7 @@ LL | #[link = ""] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 = note: for more information, visit - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error: valid forms for the attribute are `#[ignore = "reason"]` and `#[ignore]` @@ -94,7 +94,7 @@ LL | #[ignore()] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error: valid forms for the attribute are `#[inline(always)]`, `#[inline(never)]`, and `#[inline]` @@ -105,5 +105,5 @@ LL | #[inline = ""] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #57571 - = note: `#[deny(ill_formed_attribute_input)]` on by default + = note: `#[deny(ill_formed_attribute_input)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/methods/method-call-lifetime-args-unresolved.stderr b/tests/ui/methods/method-call-lifetime-args-unresolved.stderr index d3bd74a49fb3d..a87c47a9f12a3 100644 --- a/tests/ui/methods/method-call-lifetime-args-unresolved.stderr +++ b/tests/ui/methods/method-call-lifetime-args-unresolved.stderr @@ -20,7 +20,7 @@ LL | 0.clone::<'a>(); | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #42868 - = note: `#[warn(late_bound_lifetime_arguments)]` on by default + = note: `#[warn(late_bound_lifetime_arguments)]` (part of `#[warn(future_incompatible)]`) on by default error: aborting due to 1 previous error; 1 warning emitted diff --git a/tests/ui/methods/method-recursive-blanket-impl.stderr b/tests/ui/methods/method-recursive-blanket-impl.stderr index e358f80d3ff50..1074893744abd 100644 --- a/tests/ui/methods/method-recursive-blanket-impl.stderr +++ b/tests/ui/methods/method-recursive-blanket-impl.stderr @@ -4,7 +4,7 @@ warning: trait `Foo` is never used LL | trait Foo { | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/methods/method-two-trait-defer-resolution-2.stderr b/tests/ui/methods/method-two-trait-defer-resolution-2.stderr index 4501ea5d24334..17ceb745b900b 100644 --- a/tests/ui/methods/method-two-trait-defer-resolution-2.stderr +++ b/tests/ui/methods/method-two-trait-defer-resolution-2.stderr @@ -6,7 +6,7 @@ LL | trait MyCopy { fn foo(&self) { } } | | | method in this trait | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/methods/method-two-traits-distinguished-via-where-clause.stderr b/tests/ui/methods/method-two-traits-distinguished-via-where-clause.stderr index fa87ce5cc49ff..40f9133705274 100644 --- a/tests/ui/methods/method-two-traits-distinguished-via-where-clause.stderr +++ b/tests/ui/methods/method-two-traits-distinguished-via-where-clause.stderr @@ -4,7 +4,7 @@ warning: trait `A` is never used LL | trait A { | ^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/methods/trait-method-self-param-error-7575.stderr b/tests/ui/methods/trait-method-self-param-error-7575.stderr index 5c10a7e1da9d0..656db30352d56 100644 --- a/tests/ui/methods/trait-method-self-param-error-7575.stderr +++ b/tests/ui/methods/trait-method-self-param-error-7575.stderr @@ -4,7 +4,7 @@ warning: trait `Foo` is never used LL | trait Foo { | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/mir/mir_raw_fat_ptr.stderr b/tests/ui/mir/mir_raw_fat_ptr.stderr index cd99d566654f9..d1f91a79acc1e 100644 --- a/tests/ui/mir/mir_raw_fat_ptr.stderr +++ b/tests/ui/mir/mir_raw_fat_ptr.stderr @@ -6,7 +6,7 @@ LL | trait Foo { fn foo(&self) -> usize; } | | | method in this trait | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/moves/issue-22536-copy-mustnt-zero.stderr b/tests/ui/moves/issue-22536-copy-mustnt-zero.stderr index b1fcdfa44c33d..1be612af44c75 100644 --- a/tests/ui/moves/issue-22536-copy-mustnt-zero.stderr +++ b/tests/ui/moves/issue-22536-copy-mustnt-zero.stderr @@ -7,7 +7,7 @@ LL | type Buffer: Copy; LL | fn foo(&self) {} | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/never_type/defaulted-never-note.nofallback.stderr b/tests/ui/never_type/defaulted-never-note.nofallback.stderr index b7df6fb7a67ab..b82bea0bc48f0 100644 --- a/tests/ui/never_type/defaulted-never-note.nofallback.stderr +++ b/tests/ui/never_type/defaulted-never-note.nofallback.stderr @@ -12,7 +12,7 @@ note: in edition 2024, the requirement `!: ImplementedForUnitButNotNever` will f | LL | foo(_x); | ^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let _x: () = return; @@ -35,7 +35,7 @@ note: in edition 2024, the requirement `!: ImplementedForUnitButNotNever` will f | LL | foo(_x); | ^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let _x: () = return; diff --git a/tests/ui/never_type/dependency-on-fallback-to-unit.stderr b/tests/ui/never_type/dependency-on-fallback-to-unit.stderr index 6ee57d531fb29..6394bab895222 100644 --- a/tests/ui/never_type/dependency-on-fallback-to-unit.stderr +++ b/tests/ui/never_type/dependency-on-fallback-to-unit.stderr @@ -12,7 +12,7 @@ note: in edition 2024, the requirement `!: Default` will fail | LL | false => <_>::default(), | ^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL - false => <_>::default(), @@ -55,7 +55,7 @@ note: in edition 2024, the requirement `!: Default` will fail | LL | false => <_>::default(), | ^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL - false => <_>::default(), @@ -77,7 +77,7 @@ note: in edition 2024, the requirement `!: Default` will fail | LL | deserialize()?; | ^^^^^^^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | deserialize::<()>()?; diff --git a/tests/ui/never_type/diverging-fallback-control-flow.nofallback.stderr b/tests/ui/never_type/diverging-fallback-control-flow.nofallback.stderr index 64a8ecdf5464b..7f857c83655a5 100644 --- a/tests/ui/never_type/diverging-fallback-control-flow.nofallback.stderr +++ b/tests/ui/never_type/diverging-fallback-control-flow.nofallback.stderr @@ -12,7 +12,7 @@ note: in edition 2024, the requirement `!: UnitDefault` will fail | LL | x = UnitDefault::default(); | ^^^^^^^^^^^^^^^^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let x: (); @@ -54,7 +54,7 @@ note: in edition 2024, the requirement `!: UnitDefault` will fail | LL | x = UnitDefault::default(); | ^^^^^^^^^^^^^^^^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let x: (); @@ -75,7 +75,7 @@ note: in edition 2024, the requirement `!: UnitDefault` will fail | LL | x = UnitDefault::default(); | ^^^^^^^^^^^^^^^^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let x: (); diff --git a/tests/ui/never_type/diverging-fallback-no-leak.nofallback.stderr b/tests/ui/never_type/diverging-fallback-no-leak.nofallback.stderr index ec48c38b6d761..d4bb5f9442ec0 100644 --- a/tests/ui/never_type/diverging-fallback-no-leak.nofallback.stderr +++ b/tests/ui/never_type/diverging-fallback-no-leak.nofallback.stderr @@ -12,7 +12,7 @@ note: in edition 2024, the requirement `!: Test` will fail | LL | unconstrained_arg(return); | ^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | unconstrained_arg::<()>(return); @@ -35,7 +35,7 @@ note: in edition 2024, the requirement `!: Test` will fail | LL | unconstrained_arg(return); | ^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | unconstrained_arg::<()>(return); diff --git a/tests/ui/never_type/diverging-fallback-unconstrained-return.nofallback.stderr b/tests/ui/never_type/diverging-fallback-unconstrained-return.nofallback.stderr index 48debdd61c840..a706ad8b09b94 100644 --- a/tests/ui/never_type/diverging-fallback-unconstrained-return.nofallback.stderr +++ b/tests/ui/never_type/diverging-fallback-unconstrained-return.nofallback.stderr @@ -12,7 +12,7 @@ note: in edition 2024, the requirement `!: UnitReturn` will fail | LL | let _ = if true { unconstrained_return() } else { panic!() }; | ^^^^^^^^^^^^^^^^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let _: () = if true { unconstrained_return() } else { panic!() }; @@ -35,7 +35,7 @@ note: in edition 2024, the requirement `!: UnitReturn` will fail | LL | let _ = if true { unconstrained_return() } else { panic!() }; | ^^^^^^^^^^^^^^^^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let _: () = if true { unconstrained_return() } else { panic!() }; diff --git a/tests/ui/never_type/fallback-closure-ret.nofallback.stderr b/tests/ui/never_type/fallback-closure-ret.nofallback.stderr index 5651a2658885e..39b40cdd76d8e 100644 --- a/tests/ui/never_type/fallback-closure-ret.nofallback.stderr +++ b/tests/ui/never_type/fallback-closure-ret.nofallback.stderr @@ -12,7 +12,7 @@ note: in edition 2024, the requirement `!: Bar` will fail | LL | foo(|| panic!()); | ^^^^^^^^^^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | foo::<()>(|| panic!()); @@ -35,7 +35,7 @@ note: in edition 2024, the requirement `!: Bar` will fail | LL | foo(|| panic!()); | ^^^^^^^^^^^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | foo::<()>(|| panic!()); diff --git a/tests/ui/never_type/impl_trait_fallback.stderr b/tests/ui/never_type/impl_trait_fallback.stderr index 36d2eae1df24a..7d8624b1fe58f 100644 --- a/tests/ui/never_type/impl_trait_fallback.stderr +++ b/tests/ui/never_type/impl_trait_fallback.stderr @@ -12,7 +12,7 @@ note: in edition 2024, the requirement `!: T` will fail | LL | fn should_ret_unit() -> impl T { | ^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default warning: 1 warning emitted @@ -31,5 +31,5 @@ note: in edition 2024, the requirement `!: T` will fail | LL | fn should_ret_unit() -> impl T { | ^^^^^^ - = note: `#[warn(dependency_on_unit_never_type_fallback)]` on by default + = note: `#[warn(dependency_on_unit_never_type_fallback)]` (part of `#[warn(rust_2024_compatibility)]`) on by default diff --git a/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.e2015.stderr b/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.e2015.stderr index 48734f3b3f8b3..f9d0a89eabc41 100644 --- a/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.e2015.stderr +++ b/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.e2015.stderr @@ -7,7 +7,7 @@ LL | unsafe { mem::zeroed() } = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | unsafe { mem::zeroed::<()>() } @@ -143,7 +143,7 @@ LL | unsafe { mem::zeroed() } = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | unsafe { mem::zeroed::<()>() } @@ -159,7 +159,7 @@ LL | core::mem::transmute(Zst) = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | core::mem::transmute::<_, ()>(Zst) @@ -175,7 +175,7 @@ LL | unsafe { Union { a: () }.b } = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` (part of `#[warn(rust_2024_compatibility)]`) on by default Future breakage diagnostic: warning: never type fallback affects this raw pointer dereference @@ -187,7 +187,7 @@ LL | unsafe { *ptr::from_ref(&()).cast() } = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | unsafe { *ptr::from_ref(&()).cast::<()>() } @@ -203,7 +203,7 @@ LL | unsafe { internally_create(x) } = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | unsafe { internally_create::<()>(x) } @@ -219,7 +219,7 @@ LL | unsafe { zeroed() } = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let zeroed = mem::zeroed::<()>; @@ -235,7 +235,7 @@ LL | let zeroed = mem::zeroed; = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let zeroed = mem::zeroed::<()>; @@ -251,7 +251,7 @@ LL | let f = internally_create; = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let f = internally_create::<()>; @@ -267,7 +267,7 @@ LL | S(marker::PhantomData).create_out_of_thin_air() = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` (part of `#[warn(rust_2024_compatibility)]`) on by default Future breakage diagnostic: warning: never type fallback affects this call to an `unsafe` function @@ -282,6 +282,6 @@ LL | msg_send!(); = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[warn(never_type_fallback_flowing_into_unsafe)]` (part of `#[warn(rust_2024_compatibility)]`) on by default = note: this warning originates in the macro `msg_send` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.e2024.stderr b/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.e2024.stderr index 8039ef427c19f..7205c13cc2a1b 100644 --- a/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.e2024.stderr +++ b/tests/ui/never_type/lint-never-type-fallback-flowing-into-unsafe.e2024.stderr @@ -7,7 +7,7 @@ LL | unsafe { mem::zeroed() } = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` (part of `#[deny(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | unsafe { mem::zeroed::<()>() } @@ -152,7 +152,7 @@ LL | unsafe { mem::zeroed() } = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` (part of `#[deny(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | unsafe { mem::zeroed::<()>() } @@ -168,7 +168,7 @@ LL | core::mem::transmute(Zst) = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` (part of `#[deny(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | core::mem::transmute::<_, ()>(Zst) @@ -184,7 +184,7 @@ LL | unsafe { Union { a: () }.b } = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` (part of `#[deny(rust_2024_compatibility)]`) on by default Future breakage diagnostic: error: never type fallback affects this raw pointer dereference @@ -196,7 +196,7 @@ LL | unsafe { *ptr::from_ref(&()).cast() } = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` (part of `#[deny(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | unsafe { *ptr::from_ref(&()).cast::<()>() } @@ -212,7 +212,7 @@ LL | unsafe { internally_create(x) } = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` (part of `#[deny(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | unsafe { internally_create::<()>(x) } @@ -228,7 +228,7 @@ LL | unsafe { zeroed() } = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` (part of `#[deny(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let zeroed = mem::zeroed::<()>; @@ -244,7 +244,7 @@ LL | let zeroed = mem::zeroed; = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` (part of `#[deny(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let zeroed = mem::zeroed::<()>; @@ -260,7 +260,7 @@ LL | let f = internally_create; = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` (part of `#[deny(rust_2024_compatibility)]`) on by default help: use `()` annotations to avoid fallback changes | LL | let f = internally_create::<()>; @@ -276,7 +276,7 @@ LL | S(marker::PhantomData).create_out_of_thin_air() = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` (part of `#[deny(rust_2024_compatibility)]`) on by default Future breakage diagnostic: error: never type fallback affects this call to an `unsafe` function @@ -291,6 +291,6 @@ LL | msg_send!(); = warning: this changes meaning in Rust 2024 and in a future release in all editions! = note: for more information, see = help: specify the type explicitly - = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` on by default + = note: `#[deny(never_type_fallback_flowing_into_unsafe)]` (part of `#[deny(rust_2024_compatibility)]`) on by default = note: this error originates in the macro `msg_send` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.stderr b/tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.stderr index 331c6510ce733..63744c15fda9c 100644 --- a/tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.stderr +++ b/tests/ui/nll/borrowck-thread-local-static-mut-borrow-outlives-fn.stderr @@ -6,7 +6,7 @@ LL | S1 { a: unsafe { &mut X1 } } | = note: for more information, see = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives - = note: `#[warn(static_mut_refs)]` on by default + = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `&raw mut` instead to create a raw pointer | LL | S1 { a: unsafe { &raw mut X1 } } diff --git a/tests/ui/nll/issue-48623-coroutine.stderr b/tests/ui/nll/issue-48623-coroutine.stderr index 4e4cd28ef2ae9..2862d7b2a2f05 100644 --- a/tests/ui/nll/issue-48623-coroutine.stderr +++ b/tests/ui/nll/issue-48623-coroutine.stderr @@ -5,7 +5,7 @@ LL | #[coroutine] move || { d; yield; &mut *r }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: coroutines are lazy and do nothing unless resumed - = note: `#[warn(unused_must_use)]` on by default + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/overloaded/issue-14958.stderr b/tests/ui/overloaded/issue-14958.stderr index e4f527319e7af..d07dba78dc3bf 100644 --- a/tests/ui/overloaded/issue-14958.stderr +++ b/tests/ui/overloaded/issue-14958.stderr @@ -6,7 +6,7 @@ LL | trait Foo { fn dummy(&self) { }} | | | method in this trait | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/overloaded/overloaded-index-in-field.stderr b/tests/ui/overloaded/overloaded-index-in-field.stderr index 10c0a3faeb59a..5ff15ba0bcb62 100644 --- a/tests/ui/overloaded/overloaded-index-in-field.stderr +++ b/tests/ui/overloaded/overloaded-index-in-field.stderr @@ -9,7 +9,7 @@ LL | fn get_from_ref(&self) -> isize; LL | fn inc(&mut self); | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/parser/recover/recover-pat-ranges.stderr b/tests/ui/parser/recover/recover-pat-ranges.stderr index 246c704d53fab..afa7f25405435 100644 --- a/tests/ui/parser/recover/recover-pat-ranges.stderr +++ b/tests/ui/parser/recover/recover-pat-ranges.stderr @@ -192,7 +192,7 @@ LL | (1 + 4)...1 * 2 => (), | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default + = note: `#[warn(ellipsis_inclusive_range_patterns)]` (part of `#[warn(rust_2021_compatibility)]`) on by default error: aborting due to 13 previous errors; 1 warning emitted diff --git a/tests/ui/parser/removed-syntax/removed-syntax-fixed-vec.stderr b/tests/ui/parser/removed-syntax/removed-syntax-fixed-vec.stderr index 8d7938a1a4699..f584197c98e8d 100644 --- a/tests/ui/parser/removed-syntax/removed-syntax-fixed-vec.stderr +++ b/tests/ui/parser/removed-syntax/removed-syntax-fixed-vec.stderr @@ -17,7 +17,7 @@ warning: type `v` should have an upper camel case name LL | type v = [isize * 3]; | ^ help: convert the identifier to upper camel case (notice the capitalization): `V` | - = note: `#[warn(non_camel_case_types)]` on by default + = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default error: aborting due to 1 previous error; 1 warning emitted diff --git a/tests/ui/parser/trait-object-trait-parens.stderr b/tests/ui/parser/trait-object-trait-parens.stderr index b20675475689c..f498d7d36bba6 100644 --- a/tests/ui/parser/trait-object-trait-parens.stderr +++ b/tests/ui/parser/trait-object-trait-parens.stderr @@ -24,7 +24,7 @@ LL | let _: Box<(Obj) + (?Sized) + (for<'a> Trait<'a>)>; | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | let _: Box Trait<'a>)>; diff --git a/tests/ui/pattern/skipped-ref-pats-issue-125058.stderr b/tests/ui/pattern/skipped-ref-pats-issue-125058.stderr index f7fd4a4cc292a..9580bab2b4f68 100644 --- a/tests/ui/pattern/skipped-ref-pats-issue-125058.stderr +++ b/tests/ui/pattern/skipped-ref-pats-issue-125058.stderr @@ -4,7 +4,7 @@ warning: struct `Foo` is never constructed LL | struct Foo; | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: unused closure that must be used --> $DIR/skipped-ref-pats-issue-125058.rs:11:5 @@ -18,7 +18,7 @@ LL | | }; | |_____^ | = note: closures are lazy and do nothing unless called - = note: `#[warn(unused_must_use)]` on by default + = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default warning: 2 warnings emitted diff --git a/tests/ui/proc-macro/derive-helper-shadowing.stderr b/tests/ui/proc-macro/derive-helper-shadowing.stderr index 65989375ab5d0..2e4ddd19b7e1f 100644 --- a/tests/ui/proc-macro/derive-helper-shadowing.stderr +++ b/tests/ui/proc-macro/derive-helper-shadowing.stderr @@ -69,7 +69,7 @@ LL | #[derive(Empty)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #79202 - = note: `#[deny(legacy_derive_helpers)]` on by default + = note: `#[deny(legacy_derive_helpers)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 5 previous errors @@ -86,5 +86,5 @@ LL | #[derive(Empty)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #79202 - = note: `#[deny(legacy_derive_helpers)]` on by default + = note: `#[deny(legacy_derive_helpers)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/proc-macro/generate-mod.stderr b/tests/ui/proc-macro/generate-mod.stderr index cbe6b14ca9af5..142ff1abeed6b 100644 --- a/tests/ui/proc-macro/generate-mod.stderr +++ b/tests/ui/proc-macro/generate-mod.stderr @@ -46,7 +46,7 @@ LL | #[derive(generate_mod::CheckDerive)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #83583 - = note: `#[deny(proc_macro_derive_resolution_fallback)]` on by default + = note: `#[deny(proc_macro_derive_resolution_fallback)]` (part of `#[deny(future_incompatible)]`) on by default = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info) error: cannot find type `OuterDerive` in this scope @@ -91,7 +91,7 @@ LL | #[derive(generate_mod::CheckDerive)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #83583 - = note: `#[deny(proc_macro_derive_resolution_fallback)]` on by default + = note: `#[deny(proc_macro_derive_resolution_fallback)]` (part of `#[deny(future_incompatible)]`) on by default = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info) Future breakage diagnostic: @@ -103,7 +103,7 @@ LL | #[derive(generate_mod::CheckDerive)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #83583 - = note: `#[deny(proc_macro_derive_resolution_fallback)]` on by default + = note: `#[deny(proc_macro_derive_resolution_fallback)]` (part of `#[deny(future_incompatible)]`) on by default = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info) Future breakage diagnostic: @@ -115,7 +115,7 @@ LL | #[derive(generate_mod::CheckDerive)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #83583 - = note: `#[deny(proc_macro_derive_resolution_fallback)]` on by default + = note: `#[deny(proc_macro_derive_resolution_fallback)]` (part of `#[deny(future_incompatible)]`) on by default = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info) Future breakage diagnostic: @@ -127,7 +127,7 @@ LL | #[derive(generate_mod::CheckDerive)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #83583 - = note: `#[deny(proc_macro_derive_resolution_fallback)]` on by default + = note: `#[deny(proc_macro_derive_resolution_fallback)]` (part of `#[deny(future_incompatible)]`) on by default = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info) Future breakage diagnostic: diff --git a/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.stderr b/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.stderr index df7951464fb8e..88e829521f9e8 100644 --- a/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.stderr +++ b/tests/ui/proc-macro/helper-attr-blocked-by-import-ambig.stderr @@ -28,7 +28,7 @@ LL | #[derive(Empty)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #79202 - = note: `#[deny(legacy_derive_helpers)]` on by default + = note: `#[deny(legacy_derive_helpers)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 2 previous errors @@ -45,5 +45,5 @@ LL | #[derive(Empty)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #79202 - = note: `#[deny(legacy_derive_helpers)]` on by default + = note: `#[deny(legacy_derive_helpers)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/proc-macro/proc-macro-attributes.stderr b/tests/ui/proc-macro/proc-macro-attributes.stderr index 892728901fb99..6a1387a3b1c22 100644 --- a/tests/ui/proc-macro/proc-macro-attributes.stderr +++ b/tests/ui/proc-macro/proc-macro-attributes.stderr @@ -93,7 +93,7 @@ LL | #[derive(B)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #79202 - = note: `#[deny(legacy_derive_helpers)]` on by default + = note: `#[deny(legacy_derive_helpers)]` (part of `#[deny(future_incompatible)]`) on by default error: derive helper attribute is used before it is introduced --> $DIR/proc-macro-attributes.rs:10:3 @@ -146,7 +146,7 @@ LL | #[derive(B)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #79202 - = note: `#[deny(legacy_derive_helpers)]` on by default + = note: `#[deny(legacy_derive_helpers)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error: derive helper attribute is used before it is introduced @@ -160,7 +160,7 @@ LL | #[derive(B)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #79202 - = note: `#[deny(legacy_derive_helpers)]` on by default + = note: `#[deny(legacy_derive_helpers)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error: derive helper attribute is used before it is introduced @@ -174,7 +174,7 @@ LL | #[derive(B)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #79202 - = note: `#[deny(legacy_derive_helpers)]` on by default + = note: `#[deny(legacy_derive_helpers)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error: derive helper attribute is used before it is introduced @@ -188,5 +188,5 @@ LL | #[derive(B)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #79202 - = note: `#[deny(legacy_derive_helpers)]` on by default + = note: `#[deny(legacy_derive_helpers)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/pub/pub-reexport-priv-extern-crate.stderr b/tests/ui/pub/pub-reexport-priv-extern-crate.stderr index 9bb64a3325b5d..dbb080e1b0940 100644 --- a/tests/ui/pub/pub-reexport-priv-extern-crate.stderr +++ b/tests/ui/pub/pub-reexport-priv-extern-crate.stderr @@ -30,7 +30,7 @@ LL | pub use core as reexported_core; | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #127909 - = note: `#[deny(pub_use_of_private_extern_crate)]` on by default + = note: `#[deny(pub_use_of_private_extern_crate)]` (part of `#[deny(future_incompatible)]`) on by default help: consider making the `extern crate` item publicly accessible | LL | pub extern crate core; @@ -49,7 +49,7 @@ LL | pub use core as reexported_core; | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #127909 - = note: `#[deny(pub_use_of_private_extern_crate)]` on by default + = note: `#[deny(pub_use_of_private_extern_crate)]` (part of `#[deny(future_incompatible)]`) on by default help: consider making the `extern crate` item publicly accessible | LL | pub extern crate core; diff --git a/tests/ui/repr/conflicting-repr-hints.stderr b/tests/ui/repr/conflicting-repr-hints.stderr index fbfa69e7fb145..4da3d454e037d 100644 --- a/tests/ui/repr/conflicting-repr-hints.stderr +++ b/tests/ui/repr/conflicting-repr-hints.stderr @@ -6,7 +6,7 @@ LL | #[repr(C, u64)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #68585 - = note: `#[deny(conflicting_repr_hints)]` on by default + = note: `#[deny(conflicting_repr_hints)]` (part of `#[deny(future_incompatible)]`) on by default error[E0566]: conflicting representation hints --> $DIR/conflicting-repr-hints.rs:19:8 @@ -90,7 +90,7 @@ LL | #[repr(C, u64)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #68585 - = note: `#[deny(conflicting_repr_hints)]` on by default + = note: `#[deny(conflicting_repr_hints)]` (part of `#[deny(future_incompatible)]`) on by default Future breakage diagnostic: error[E0566]: conflicting representation hints @@ -101,5 +101,5 @@ LL | #[repr(u32, u64)] | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #68585 - = note: `#[deny(conflicting_repr_hints)]` on by default + = note: `#[deny(conflicting_repr_hints)]` (part of `#[deny(future_incompatible)]`) on by default diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/protect-precedences.stderr b/tests/ui/rfcs/rfc-2497-if-let-chains/protect-precedences.stderr index 24b35a2ab3167..689ccb4bc9a86 100644 --- a/tests/ui/rfcs/rfc-2497-if-let-chains/protect-precedences.stderr +++ b/tests/ui/rfcs/rfc-2497-if-let-chains/protect-precedences.stderr @@ -6,7 +6,7 @@ LL | if let _ = return true && false {}; | | | any code following this expression is unreachable | - = note: `#[warn(unreachable_code)]` on by default + = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/self/self-ctor-nongeneric.stderr b/tests/ui/self/self-ctor-nongeneric.stderr index 6c03c6f3e38a4..b53ecbe55b594 100644 --- a/tests/ui/self/self-ctor-nongeneric.stderr +++ b/tests/ui/self/self-ctor-nongeneric.stderr @@ -9,7 +9,7 @@ LL | const C: S0 = Self(0); | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #124186 - = note: `#[warn(self_constructor_from_outer_item)]` on by default + = note: `#[warn(self_constructor_from_outer_item)]` (part of `#[warn(future_incompatible)]`) on by default warning: can't reference `Self` constructor from outer item --> $DIR/self-ctor-nongeneric.rs:12:13 diff --git a/tests/ui/sized/coinductive-2.stderr b/tests/ui/sized/coinductive-2.stderr index 1390b1f8d7bf1..5faec7397e295 100644 --- a/tests/ui/sized/coinductive-2.stderr +++ b/tests/ui/sized/coinductive-2.stderr @@ -4,7 +4,7 @@ warning: trait `Collection` is never used LL | trait Collection: Sized { | ^^^^^^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/span/issue-24690.stderr b/tests/ui/span/issue-24690.stderr index 73e166e6403e4..8626108c0be44 100644 --- a/tests/ui/span/issue-24690.stderr +++ b/tests/ui/span/issue-24690.stderr @@ -17,7 +17,7 @@ warning: variable `theTwo` should have a snake case name LL | let theTwo = 2; | ^^^^^^ help: convert the identifier to snake case: `the_two` | - = note: `#[warn(non_snake_case)]` on by default + = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default warning: variable `theOtherTwo` should have a snake case name --> $DIR/issue-24690.rs:13:9 diff --git a/tests/ui/statics/issue-15261.stderr b/tests/ui/statics/issue-15261.stderr index 60c5fb93dbaf2..20ac078524508 100644 --- a/tests/ui/statics/issue-15261.stderr +++ b/tests/ui/statics/issue-15261.stderr @@ -6,7 +6,7 @@ LL | static n: &'static usize = unsafe { &n_mut }; | = note: for more information, see = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives - = note: `#[warn(static_mut_refs)]` on by default + = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `&raw const` instead to create a raw pointer | LL | static n: &'static usize = unsafe { &raw const n_mut }; diff --git a/tests/ui/statics/static-impl.stderr b/tests/ui/statics/static-impl.stderr index 83c3ffbefe1f2..77785d1df0e95 100644 --- a/tests/ui/statics/static-impl.stderr +++ b/tests/ui/statics/static-impl.stderr @@ -7,7 +7,7 @@ LL | fn length_(&self, ) -> usize; LL | fn iter_(&self, f: F) where F: FnMut(&T); | ^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/statics/static-mut-shared-parens.stderr b/tests/ui/statics/static-mut-shared-parens.stderr index 16daee091a800..c900fcde16f6a 100644 --- a/tests/ui/statics/static-mut-shared-parens.stderr +++ b/tests/ui/statics/static-mut-shared-parens.stderr @@ -6,7 +6,7 @@ LL | let _ = unsafe { (&TEST) as *const usize }; | = note: for more information, see = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives - = note: `#[warn(static_mut_refs)]` on by default + = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `&raw const` instead to create a raw pointer | LL | let _ = unsafe { (&raw const TEST) as *const usize }; diff --git a/tests/ui/statics/static-mut-xc.stderr b/tests/ui/statics/static-mut-xc.stderr index 2e5aa1b264531..73c4e91b8e034 100644 --- a/tests/ui/statics/static-mut-xc.stderr +++ b/tests/ui/statics/static-mut-xc.stderr @@ -6,7 +6,7 @@ LL | assert_eq!(static_mut_xc::a, 3); | = note: for more information, see = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives - = note: `#[warn(static_mut_refs)]` on by default + = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default warning: creating a shared reference to mutable static --> $DIR/static-mut-xc.rs:22:16 diff --git a/tests/ui/statics/static-recursive.stderr b/tests/ui/statics/static-recursive.stderr index 0c3f961372b71..16d5e183ccbd7 100644 --- a/tests/ui/statics/static-recursive.stderr +++ b/tests/ui/statics/static-recursive.stderr @@ -6,7 +6,7 @@ LL | static mut S: *const u8 = unsafe { &S as *const *const u8 as *const u8 }; | = note: for more information, see = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives - = note: `#[warn(static_mut_refs)]` on by default + = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default help: use `&raw const` instead to create a raw pointer | LL | static mut S: *const u8 = unsafe { &raw const S as *const *const u8 as *const u8 }; diff --git a/tests/ui/std/issue-3563-3.stderr b/tests/ui/std/issue-3563-3.stderr index bd65c1e3fd5b4..5885bafeb99f8 100644 --- a/tests/ui/std/issue-3563-3.stderr +++ b/tests/ui/std/issue-3563-3.stderr @@ -7,7 +7,7 @@ LL | trait Canvas { LL | fn add_points(&mut self, shapes: &[Point]) { | ^^^^^^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/stdlib-unit-tests/raw-fat-ptr.stderr b/tests/ui/stdlib-unit-tests/raw-fat-ptr.stderr index 670fa5bb9224b..8108296621c87 100644 --- a/tests/ui/stdlib-unit-tests/raw-fat-ptr.stderr +++ b/tests/ui/stdlib-unit-tests/raw-fat-ptr.stderr @@ -6,7 +6,7 @@ LL | trait Foo { fn foo(&self) -> usize; } | | | method in this trait | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/structs-enums/enum-null-pointer-opt.stderr b/tests/ui/structs-enums/enum-null-pointer-opt.stderr index 64e93ffaffd60..178d76cd732cf 100644 --- a/tests/ui/structs-enums/enum-null-pointer-opt.stderr +++ b/tests/ui/structs-enums/enum-null-pointer-opt.stderr @@ -6,7 +6,7 @@ LL | trait Trait { fn dummy(&self) { } } | | | method in this trait | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/suggestions/dont-try-removing-the-field.stderr b/tests/ui/suggestions/dont-try-removing-the-field.stderr index 263171a4ac456..e327b21417a6b 100644 --- a/tests/ui/suggestions/dont-try-removing-the-field.stderr +++ b/tests/ui/suggestions/dont-try-removing-the-field.stderr @@ -4,7 +4,7 @@ warning: unused variable: `baz` LL | let Foo { foo, bar, baz } = x; | ^^^ help: try ignoring the field: `baz: _` | - = note: `#[warn(unused_variables)]` on by default + = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/suggestions/ice-unwrap-probe-many-result-125876.stderr b/tests/ui/suggestions/ice-unwrap-probe-many-result-125876.stderr index 696151b6ee2c0..8bb2bb290d3dc 100644 --- a/tests/ui/suggestions/ice-unwrap-probe-many-result-125876.stderr +++ b/tests/ui/suggestions/ice-unwrap-probe-many-result-125876.stderr @@ -12,7 +12,7 @@ LL | std::ptr::from_ref(num).cast_mut().as_deref(); | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! = note: for more information, see issue #46906 - = note: `#[warn(tyvar_behind_raw_pointer)]` on by default + = note: `#[warn(tyvar_behind_raw_pointer)]` (part of `#[warn(rust_2018_compatibility)]`) on by default warning: type annotations needed --> $DIR/ice-unwrap-probe-many-result-125876.rs:5:40 diff --git a/tests/ui/suggestions/issue-116434-2015.stderr b/tests/ui/suggestions/issue-116434-2015.stderr index e7173d91438a0..475cc84962538 100644 --- a/tests/ui/suggestions/issue-116434-2015.stderr +++ b/tests/ui/suggestions/issue-116434-2015.stderr @@ -6,7 +6,7 @@ LL | fn foo() -> Clone; | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | fn foo() -> dyn Clone; diff --git a/tests/ui/suggestions/suggest-swapping-self-ty-and-trait.stderr b/tests/ui/suggestions/suggest-swapping-self-ty-and-trait.stderr index d90dd201bcfb5..72ac7209bdf40 100644 --- a/tests/ui/suggestions/suggest-swapping-self-ty-and-trait.stderr +++ b/tests/ui/suggestions/suggest-swapping-self-ty-and-trait.stderr @@ -69,7 +69,7 @@ LL | impl<'a, T> Struct for Trait<'a, T> {} | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | impl<'a, T> Struct for dyn Trait<'a, T> {} diff --git a/tests/ui/suggestions/try-removing-the-field.stderr b/tests/ui/suggestions/try-removing-the-field.stderr index 7a6013d4a6eab..aaf260bb86ede 100644 --- a/tests/ui/suggestions/try-removing-the-field.stderr +++ b/tests/ui/suggestions/try-removing-the-field.stderr @@ -6,7 +6,7 @@ LL | let Foo { foo, bar, .. } = x; | | | help: try removing the field | - = note: `#[warn(unused_variables)]` on by default + = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default warning: unused variable: `unused` --> $DIR/try-removing-the-field.rs:20:20 diff --git a/tests/ui/traits/alias/bounds.stderr b/tests/ui/traits/alias/bounds.stderr index 7fb8e918da36d..215a9b57fbf88 100644 --- a/tests/ui/traits/alias/bounds.stderr +++ b/tests/ui/traits/alias/bounds.stderr @@ -4,7 +4,7 @@ warning: trait `Empty` is never used LL | trait Empty {} | ^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/traits/alias/style_lint.stderr b/tests/ui/traits/alias/style_lint.stderr index 91e2ea90eb9e8..e11e51c018f6b 100644 --- a/tests/ui/traits/alias/style_lint.stderr +++ b/tests/ui/traits/alias/style_lint.stderr @@ -4,7 +4,7 @@ warning: trait alias `bar` should have an upper camel case name LL | trait bar = std::fmt::Display + std::fmt::Debug; | ^^^ help: convert the identifier to upper camel case: `Bar` | - = note: `#[warn(non_camel_case_types)]` on by default + = note: `#[warn(non_camel_case_types)]` (part of `#[warn(nonstandard_style)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/traits/bound/not-on-bare-trait.stderr b/tests/ui/traits/bound/not-on-bare-trait.stderr index 69413ca96cdae..fa2c531d53584 100644 --- a/tests/ui/traits/bound/not-on-bare-trait.stderr +++ b/tests/ui/traits/bound/not-on-bare-trait.stderr @@ -6,7 +6,7 @@ LL | fn foo(_x: Foo + Send) { | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | fn foo(_x: dyn Foo + Send) { diff --git a/tests/ui/traits/const-traits/macro-const-trait-bound-theoretical-regression.stderr b/tests/ui/traits/const-traits/macro-const-trait-bound-theoretical-regression.stderr index 9fad260f0bea2..7a4061d9c18e5 100644 --- a/tests/ui/traits/const-traits/macro-const-trait-bound-theoretical-regression.stderr +++ b/tests/ui/traits/const-traits/macro-const-trait-bound-theoretical-regression.stderr @@ -45,7 +45,7 @@ LL | demo! { impl const Trait } | = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default = note: this warning originates in the macro `demo` (in Nightly builds, run with -Z macro-backtrace for more info) help: you might have intended to implement this trait for a given type | diff --git a/tests/ui/traits/default-method/bound-subst4.stderr b/tests/ui/traits/default-method/bound-subst4.stderr index 548c46f123322..62be4c3a8fce4 100644 --- a/tests/ui/traits/default-method/bound-subst4.stderr +++ b/tests/ui/traits/default-method/bound-subst4.stderr @@ -7,7 +7,7 @@ LL | fn g(&self, x: usize) -> usize { x } LL | fn h(&self, x: T) { } | ^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/traits/impl-inherent-prefer-over-trait.stderr b/tests/ui/traits/impl-inherent-prefer-over-trait.stderr index f0bb21402d873..14b3e4d903f0f 100644 --- a/tests/ui/traits/impl-inherent-prefer-over-trait.stderr +++ b/tests/ui/traits/impl-inherent-prefer-over-trait.stderr @@ -6,7 +6,7 @@ LL | trait Trait { LL | fn bar(&self); | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/traits/impl-object-overlap-issue-23853.stderr b/tests/ui/traits/impl-object-overlap-issue-23853.stderr index 9fa7a36816e4d..bdab0ae3532a9 100644 --- a/tests/ui/traits/impl-object-overlap-issue-23853.stderr +++ b/tests/ui/traits/impl-object-overlap-issue-23853.stderr @@ -6,7 +6,7 @@ LL | trait Foo { fn dummy(&self) { } } | | | method in this trait | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/traits/impl.stderr b/tests/ui/traits/impl.stderr index 9216a33c1d075..c17957f1e64c7 100644 --- a/tests/ui/traits/impl.stderr +++ b/tests/ui/traits/impl.stderr @@ -6,7 +6,7 @@ LL | trait T { LL | fn t(&self) {} | ^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/traits/issue-38033.stderr b/tests/ui/traits/issue-38033.stderr index 05385e8cf4d9d..fb713c564cf14 100644 --- a/tests/ui/traits/issue-38033.stderr +++ b/tests/ui/traits/issue-38033.stderr @@ -7,7 +7,7 @@ LL | trait IntoFuture { LL | fn into_future(self) -> Self::Future; | ^^^^^^^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/traits/issue-6128.stderr b/tests/ui/traits/issue-6128.stderr index c9518ea41ea70..1c0460df69e83 100644 --- a/tests/ui/traits/issue-6128.stderr +++ b/tests/ui/traits/issue-6128.stderr @@ -8,7 +8,7 @@ LL | fn f(&self, _: Edge); LL | fn g(&self, _: Node); | ^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/traits/missing-for-type-in-impl.e2015.stderr b/tests/ui/traits/missing-for-type-in-impl.e2015.stderr index a0bfc524252f5..40ebf8f36af27 100644 --- a/tests/ui/traits/missing-for-type-in-impl.e2015.stderr +++ b/tests/ui/traits/missing-for-type-in-impl.e2015.stderr @@ -6,7 +6,7 @@ LL | impl Foo { | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | impl dyn Foo { diff --git a/tests/ui/traits/multidispatch-conditional-impl-not-considered.stderr b/tests/ui/traits/multidispatch-conditional-impl-not-considered.stderr index 25313a477f7af..8a9c2206331e0 100644 --- a/tests/ui/traits/multidispatch-conditional-impl-not-considered.stderr +++ b/tests/ui/traits/multidispatch-conditional-impl-not-considered.stderr @@ -4,7 +4,7 @@ warning: trait `Foo` is never used LL | trait Foo { | ^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/traits/multidispatch-infer-convert-target.stderr b/tests/ui/traits/multidispatch-infer-convert-target.stderr index c8c1b64271950..fbf57e9327f5e 100644 --- a/tests/ui/traits/multidispatch-infer-convert-target.stderr +++ b/tests/ui/traits/multidispatch-infer-convert-target.stderr @@ -6,7 +6,7 @@ LL | trait Convert { LL | fn convert(&self) -> Target; | ^^^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/traits/trait-upcasting/lifetime.stderr b/tests/ui/traits/trait-upcasting/lifetime.stderr index 589e9816d5adc..f41ea68053a7d 100644 --- a/tests/ui/traits/trait-upcasting/lifetime.stderr +++ b/tests/ui/traits/trait-upcasting/lifetime.stderr @@ -10,7 +10,7 @@ LL | fn z(&self) -> i32 { LL | fn y(&self) -> i32 { | ^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: method `w` is never used --> $DIR/lifetime.rs:22:8 diff --git a/tests/ui/traits/trait-upcasting/replace-vptr.stderr b/tests/ui/traits/trait-upcasting/replace-vptr.stderr index 1a8bfd1bfa6e5..932112470c00b 100644 --- a/tests/ui/traits/trait-upcasting/replace-vptr.stderr +++ b/tests/ui/traits/trait-upcasting/replace-vptr.stderr @@ -6,7 +6,7 @@ LL | trait A { LL | fn foo_a(&self); | ^^^^^ | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: method `foo_c` is never used --> $DIR/replace-vptr.rs:12:8 diff --git a/tests/ui/traits/unspecified-self-in-trait-ref.stderr b/tests/ui/traits/unspecified-self-in-trait-ref.stderr index 2e872453184f1..3fa74d79adc32 100644 --- a/tests/ui/traits/unspecified-self-in-trait-ref.stderr +++ b/tests/ui/traits/unspecified-self-in-trait-ref.stderr @@ -6,7 +6,7 @@ LL | let a = Foo::lol(); | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | let a = ::lol(); diff --git a/tests/ui/type-alias-enum-variants/enum-variant-priority-lint-ambiguous_associated_items.stderr b/tests/ui/type-alias-enum-variants/enum-variant-priority-lint-ambiguous_associated_items.stderr index 0f42fcbe04d0a..79bd1f2adc17b 100644 --- a/tests/ui/type-alias-enum-variants/enum-variant-priority-lint-ambiguous_associated_items.stderr +++ b/tests/ui/type-alias-enum-variants/enum-variant-priority-lint-ambiguous_associated_items.stderr @@ -16,7 +16,7 @@ note: `V` could also refer to the associated type defined here | LL | type V; | ^^^^^^ - = note: `#[deny(ambiguous_associated_items)]` on by default + = note: `#[deny(ambiguous_associated_items)]` (part of `#[deny(future_incompatible)]`) on by default error: aborting due to 1 previous error diff --git a/tests/ui/unboxed-closures/unboxed-closures-counter-not-moved.stderr b/tests/ui/unboxed-closures/unboxed-closures-counter-not-moved.stderr index 6450cc30ac05f..190ef0f472463 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-counter-not-moved.stderr +++ b/tests/ui/unboxed-closures/unboxed-closures-counter-not-moved.stderr @@ -4,7 +4,7 @@ warning: unused variable: `item` LL | for item in y { | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` | - = note: `#[warn(unused_variables)]` on by default + = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default warning: value assigned to `counter` is never read --> $DIR/unboxed-closures-counter-not-moved.rs:24:9 @@ -13,7 +13,7 @@ LL | counter += 1; | ^^^^^^^ | = help: maybe it is overwritten before being read? - = note: `#[warn(unused_assignments)]` on by default + = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default warning: unused variable: `counter` --> $DIR/unboxed-closures-counter-not-moved.rs:24:9 diff --git a/tests/ui/unboxed-closures/unboxed-closures-move-mutable.stderr b/tests/ui/unboxed-closures/unboxed-closures-move-mutable.stderr index 813e2eea56848..24590128107b3 100644 --- a/tests/ui/unboxed-closures/unboxed-closures-move-mutable.stderr +++ b/tests/ui/unboxed-closures/unboxed-closures-move-mutable.stderr @@ -5,7 +5,7 @@ LL | move || x += 1; | ^ | = help: did you mean to capture by reference instead? - = note: `#[warn(unused_variables)]` on by default + = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default warning: unused variable: `x` --> $DIR/unboxed-closures-move-mutable.rs:20:17 diff --git a/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.stderr b/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.stderr index 8a26b45117cdc..b6804511ac235 100644 --- a/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.stderr +++ b/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.stderr @@ -11,7 +11,7 @@ note: an unsafe function restricts its caller, but its body is safe by default | LL | unsafe fn foo() { | ^^^^^^^^^^^^^^^ - = note: `#[warn(unsafe_op_in_unsafe_fn)]` on by default + = note: `#[warn(unsafe_op_in_unsafe_fn)]` (part of `#[warn(rust_2024_compatibility)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/unsafe/unsafe_op_in_unsafe_fn/edition_2024_default.stderr b/tests/ui/unsafe/unsafe_op_in_unsafe_fn/edition_2024_default.stderr index 458a2180a82b9..35f9d3a4ebc4c 100644 --- a/tests/ui/unsafe/unsafe_op_in_unsafe_fn/edition_2024_default.stderr +++ b/tests/ui/unsafe/unsafe_op_in_unsafe_fn/edition_2024_default.stderr @@ -11,7 +11,7 @@ note: an unsafe function restricts its caller, but its body is safe by default | LL | unsafe fn foo() { | ^^^^^^^^^^^^^^^ - = note: `#[warn(unsafe_op_in_unsafe_fn)]` on by default + = note: `#[warn(unsafe_op_in_unsafe_fn)]` (part of `#[warn(rust_2024_compatibility)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122989.stderr b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122989.stderr index 26872f60fd351..a0b443ec85011 100644 --- a/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122989.stderr +++ b/tests/ui/wf/ice-hir-wf-check-anon-const-issue-122989.stderr @@ -6,7 +6,7 @@ LL | trait Foo> { | = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see - = note: `#[warn(bare_trait_objects)]` on by default + = note: `#[warn(bare_trait_objects)]` (part of `#[warn(rust_2021_compatibility)]`) on by default help: if this is a dyn-compatible trait, use `dyn` | LL | trait Foo> { diff --git a/tests/ui/where-clauses/where-clause-early-bound-lifetimes.stderr b/tests/ui/where-clauses/where-clause-early-bound-lifetimes.stderr index 34ed8bd214674..ebe609af38a86 100644 --- a/tests/ui/where-clauses/where-clause-early-bound-lifetimes.stderr +++ b/tests/ui/where-clauses/where-clause-early-bound-lifetimes.stderr @@ -6,7 +6,7 @@ LL | trait TheTrait { fn dummy(&self) { } } | | | method in this trait | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted diff --git a/tests/ui/where-clauses/where-clause-method-substituion-rpass.stderr b/tests/ui/where-clauses/where-clause-method-substituion-rpass.stderr index 9a8faf7a64e84..5161e2aabc169 100644 --- a/tests/ui/where-clauses/where-clause-method-substituion-rpass.stderr +++ b/tests/ui/where-clauses/where-clause-method-substituion-rpass.stderr @@ -6,7 +6,7 @@ LL | trait Foo { fn dummy(&self, arg: T) { } } | | | method in this trait | - = note: `#[warn(dead_code)]` on by default + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: 1 warning emitted