diff options
| author | bors <bors@rust-lang.org> | 2023-12-26 12:27:29 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-12-26 12:27:29 +0000 |
| commit | 2fe50cd72c476ebacdedb14893e9632b4de961c2 (patch) | |
| tree | 646eae2f31ec0a7ad1dbef7bce78bf331efda17b /tests | |
| parent | ea7ef7b6c224226a4bd9f9796de39d57b527f7f9 (diff) | |
| parent | cb6d033316bdc2a1c5c1c0e04b297fbbb81eafca (diff) | |
| download | rust-2fe50cd72c476ebacdedb14893e9632b4de961c2.tar.gz rust-2fe50cd72c476ebacdedb14893e9632b4de961c2.zip | |
Auto merge of #119129 - jyn514:verbose, r=compiler-errors,estebank
rework `-Zverbose` implements the changes described in https://github.com/rust-lang/compiler-team/issues/706 the first commit is only a name change from `-Zverbose` to `-Zverbose-internals` and does not change behavior. the second commit changes diagnostics. possible follow up work: - `ty::pretty` could print more info with `--verbose` than it does currently. `-Z verbose-internals` shows too much info in a way that's not helpful to users. michael had ideas about this i didn't fully understand: https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/uplift.20some.20-Zverbose.20calls.20and.20rename.20to.E2.80.A6.20compiler-team.23706/near/408984200 - `--verbose` should imply `-Z write-long-types-to-disk=no`. the code in `ty_string_with_limit` should take `--verbose` into account (apparently this affects `Ty::sort_string`, i'm not familiar with this code). writing a file to disk should suggest passing `--verbose`. r? `@compiler-errors` cc `@estebank`
Diffstat (limited to 'tests')
54 files changed, 96 insertions, 55 deletions
diff --git a/tests/mir-opt/nll/named_lifetimes_basic.rs b/tests/mir-opt/nll/named_lifetimes_basic.rs index 5a9312de284..bb22ce0ed95 100644 --- a/tests/mir-opt/nll/named_lifetimes_basic.rs +++ b/tests/mir-opt/nll/named_lifetimes_basic.rs @@ -4,8 +4,8 @@ // suitable variables and that we setup the outlives relationship // between R0 and R1 properly. -// compile-flags: -Zverbose -// ^^^^^^^^^ force compiler to dump more region information +// compile-flags: -Zverbose-internals +// ^^^^^^^^^^^^^^^^^^^ force compiler to dump more region information #![allow(warnings)] diff --git a/tests/mir-opt/nll/region_subtyping_basic.rs b/tests/mir-opt/nll/region_subtyping_basic.rs index 83f756acdc3..940f8d17344 100644 --- a/tests/mir-opt/nll/region_subtyping_basic.rs +++ b/tests/mir-opt/nll/region_subtyping_basic.rs @@ -3,8 +3,8 @@ // in the type of `p` includes the points after `&v[0]` up to (but not // including) the call to `use_x`. The `else` branch is not included. -// compile-flags:-Zverbose -// ^^^^^^^^^ force compiler to dump more region information +// compile-flags:-Zverbose-internals +// ^^^^^^^^^^^^^^^^^^^ force compiler to dump more region information #![allow(warnings)] diff --git a/tests/ui/associated-types/substs-ppaux.rs b/tests/ui/associated-types/substs-ppaux.rs index 66cd94d7a1b..db6e7a4cf05 100644 --- a/tests/ui/associated-types/substs-ppaux.rs +++ b/tests/ui/associated-types/substs-ppaux.rs @@ -1,7 +1,7 @@ // // revisions: verbose normal // -//[verbose] compile-flags: -Z verbose +//[verbose] compile-flags: -Z verbose-internals trait Foo<'b, 'c, S=u32> { fn bar<'a, T>() where T: 'a {} diff --git a/tests/ui/closures/print/closure-print-generic-trim-off-verbose-2.rs b/tests/ui/closures/print/closure-print-generic-trim-off-verbose-2.rs index 07bf8fe4c00..b6c7659bc72 100644 --- a/tests/ui/closures/print/closure-print-generic-trim-off-verbose-2.rs +++ b/tests/ui/closures/print/closure-print-generic-trim-off-verbose-2.rs @@ -1,4 +1,4 @@ -// compile-flags: -Ztrim-diagnostic-paths=off -Zverbose +// compile-flags: -Ztrim-diagnostic-paths=off -Zverbose-internals mod mod1 { pub fn f<T: std::fmt::Display>(t: T) diff --git a/tests/ui/closures/print/closure-print-generic-verbose-1.rs b/tests/ui/closures/print/closure-print-generic-verbose-1.rs index 67d37f1c59b..6c631fabaa2 100644 --- a/tests/ui/closures/print/closure-print-generic-verbose-1.rs +++ b/tests/ui/closures/print/closure-print-generic-verbose-1.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zverbose +// compile-flags: -Zverbose-internals fn to_fn_once<F:FnOnce()>(f: F) -> F { f } diff --git a/tests/ui/closures/print/closure-print-generic-verbose-2.rs b/tests/ui/closures/print/closure-print-generic-verbose-2.rs index f460fedffb7..dcf7fb2865c 100644 --- a/tests/ui/closures/print/closure-print-generic-verbose-2.rs +++ b/tests/ui/closures/print/closure-print-generic-verbose-2.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zverbose +// compile-flags: -Zverbose-internals mod mod1 { pub fn f<T: std::fmt::Display>(t: T) diff --git a/tests/ui/closures/print/closure-print-verbose.rs b/tests/ui/closures/print/closure-print-verbose.rs index 4b0438a91ed..76fe5471a60 100644 --- a/tests/ui/closures/print/closure-print-verbose.rs +++ b/tests/ui/closures/print/closure-print-verbose.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zverbose +// compile-flags: -Zverbose-internals // Same as closure-coerce-fn-1.rs diff --git a/tests/ui/coroutine/print/coroutine-print-verbose-1.rs b/tests/ui/coroutine/print/coroutine-print-verbose-1.rs index c47d7572ca7..f0094aa694b 100644 --- a/tests/ui/coroutine/print/coroutine-print-verbose-1.rs +++ b/tests/ui/coroutine/print/coroutine-print-verbose-1.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zverbose +// compile-flags: -Zverbose-internals // Same as: tests/ui/coroutine/issue-68112.stderr diff --git a/tests/ui/coroutine/print/coroutine-print-verbose-2.rs b/tests/ui/coroutine/print/coroutine-print-verbose-2.rs index c65c33cb4ba..390bfc542b7 100644 --- a/tests/ui/coroutine/print/coroutine-print-verbose-2.rs +++ b/tests/ui/coroutine/print/coroutine-print-verbose-2.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zverbose +// compile-flags: -Zverbose-internals // Same as test/ui/coroutine/not-send-sync.rs #![feature(coroutines)] diff --git a/tests/ui/coroutine/print/coroutine-print-verbose-3.rs b/tests/ui/coroutine/print/coroutine-print-verbose-3.rs index 3e4bb628176..49b54a4cd5b 100644 --- a/tests/ui/coroutine/print/coroutine-print-verbose-3.rs +++ b/tests/ui/coroutine/print/coroutine-print-verbose-3.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zverbose +// compile-flags: -Zverbose-internals #![feature(coroutines, coroutine_trait)] diff --git a/tests/ui/fn/signature-error-reporting-under-verbose.rs b/tests/ui/fn/signature-error-reporting-under-verbose.rs index d00cbd8a0f2..d28c8530d58 100644 --- a/tests/ui/fn/signature-error-reporting-under-verbose.rs +++ b/tests/ui/fn/signature-error-reporting-under-verbose.rs @@ -1,4 +1,4 @@ -// compile-flags: -Zverbose +// compile-flags: -Zverbose-internals fn foo(_: i32, _: i32) {} diff --git a/tests/ui/impl-trait/erased-regions-in-hidden-ty.rs b/tests/ui/impl-trait/erased-regions-in-hidden-ty.rs index b1f36fc247f..0458b56f95f 100644 --- a/tests/ui/impl-trait/erased-regions-in-hidden-ty.rs +++ b/tests/ui/impl-trait/erased-regions-in-hidden-ty.rs @@ -1,5 +1,5 @@ // revisions: current next -// compile-flags: -Zverbose +// compile-flags: -Zverbose-internals //[next] compile-flags: -Znext-solver // normalize-stderr-test "DefId\([^\)]+\)" -> "DefId(..)" diff --git a/tests/ui/issues/issue-13482-2.rs b/tests/ui/issues/issue-13482-2.rs index bbcb954afcc..b5b81dea73e 100644 --- a/tests/ui/issues/issue-13482-2.rs +++ b/tests/ui/issues/issue-13482-2.rs @@ -1,4 +1,4 @@ -// compile-flags:-Z verbose +// compile-flags:-Z verbose-internals fn main() { let x = [1,2]; diff --git a/tests/ui/nll/closure-requirements/escape-argument-callee.rs b/tests/ui/nll/closure-requirements/escape-argument-callee.rs index 3aea511b056..d643a1b2a0d 100644 --- a/tests/ui/nll/closure-requirements/escape-argument-callee.rs +++ b/tests/ui/nll/closure-requirements/escape-argument-callee.rs @@ -12,7 +12,7 @@ // that appear free in its type (hence, we see it before the closure's // "external requirements" report). -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/escape-argument.rs b/tests/ui/nll/closure-requirements/escape-argument.rs index 066cd436016..7b1e6e9c820 100644 --- a/tests/ui/nll/closure-requirements/escape-argument.rs +++ b/tests/ui/nll/closure-requirements/escape-argument.rs @@ -12,7 +12,7 @@ // basically checking that the MIR type checker correctly enforces the // closure signature. -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/escape-upvar-nested.rs b/tests/ui/nll/closure-requirements/escape-upvar-nested.rs index 765a3cf961c..b104bc2479e 100644 --- a/tests/ui/nll/closure-requirements/escape-upvar-nested.rs +++ b/tests/ui/nll/closure-requirements/escape-upvar-nested.rs @@ -5,7 +5,7 @@ // // except that the closure does so via a second closure. -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/escape-upvar-ref.rs b/tests/ui/nll/closure-requirements/escape-upvar-ref.rs index 0a562a0a1bc..97c2d7dc291 100644 --- a/tests/ui/nll/closure-requirements/escape-upvar-ref.rs +++ b/tests/ui/nll/closure-requirements/escape-upvar-ref.rs @@ -9,7 +9,7 @@ // `'b`. This relationship is propagated to the closure creator, // which reports an error. -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs b/tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs index 35a864b8851..31f537d19d2 100644 --- a/tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs +++ b/tests/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs @@ -1,7 +1,7 @@ // Test where we fail to approximate due to demanding a postdom // relationship between our upper bounds. -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-ref.rs b/tests/ui/nll/closure-requirements/propagate-approximated-ref.rs index 7291c6e9749..295b9cb7755 100644 --- a/tests/ui/nll/closure-requirements/propagate-approximated-ref.rs +++ b/tests/ui/nll/closure-requirements/propagate-approximated-ref.rs @@ -12,7 +12,7 @@ // Note: the use of `Cell` here is to introduce invariance. One less // variable. -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs index afe6f10a52f..e27a7d591e7 100644 --- a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs +++ b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs @@ -2,7 +2,7 @@ // where `'x` is bound in closure type but `'a` is free. This forces // us to approximate `'x` one way or the other. -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs index 3722090754b..f11dc769a03 100644 --- a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs +++ b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs @@ -3,7 +3,7 @@ // because `'y` is higher-ranked but we know of no relations to other // regions. Note that `'static` shows up in the stderr output as `'0`. -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs index 9898777c727..5e5aa3a3cce 100644 --- a/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs +++ b/tests/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs @@ -4,7 +4,7 @@ // relations to other regions. Note that `'static` shows up in the // stderr output as `'0`. -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-approximated-val.rs b/tests/ui/nll/closure-requirements/propagate-approximated-val.rs index 5bb5eea991b..83cb37516de 100644 --- a/tests/ui/nll/closure-requirements/propagate-approximated-val.rs +++ b/tests/ui/nll/closure-requirements/propagate-approximated-val.rs @@ -5,7 +5,7 @@ // relationships. In the 'main' variant, there are a number of // anonymous regions as well. -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-despite-same-free-region.rs b/tests/ui/nll/closure-requirements/propagate-despite-same-free-region.rs index 704a026d29b..5a25e29816d 100644 --- a/tests/ui/nll/closure-requirements/propagate-despite-same-free-region.rs +++ b/tests/ui/nll/closure-requirements/propagate-despite-same-free-region.rs @@ -3,7 +3,7 @@ // need to propagate; but in fact we do because identity of free // regions is erased. -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals // check-pass #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs index dcd05d7fa2c..0fb57d47d2d 100644 --- a/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs +++ b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs @@ -7,7 +7,7 @@ // as it knows of no relationships between `'x` and any // non-higher-ranked regions. -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs index 98be92d1cd6..3bdd923543e 100644 --- a/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs +++ b/tests/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs @@ -7,7 +7,7 @@ // as it only knows of regions that `'x` is outlived by, and none that // `'x` outlives. -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/closure-requirements/propagate-from-trait-match.rs b/tests/ui/nll/closure-requirements/propagate-from-trait-match.rs index cda781d8e26..5fe2f46ee79 100644 --- a/tests/ui/nll/closure-requirements/propagate-from-trait-match.rs +++ b/tests/ui/nll/closure-requirements/propagate-from-trait-match.rs @@ -4,7 +4,7 @@ // the same `'a` for which it implements `Trait`, which can only be the `'a` // from the function definition. -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/tests/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.rs b/tests/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.rs index 8147da09d43..6e7db4578a0 100644 --- a/tests/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.rs +++ b/tests/ui/nll/closure-requirements/region-lbr-anon-does-not-outlive-static.rs @@ -3,7 +3,7 @@ // a variety of errors from the older, AST-based machinery (notably // borrowck), and then we get the NLL error at the end. -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals fn foo(x: &u32) -> &'static u32 { &*x diff --git a/tests/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs b/tests/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs index 4acd2fc92f3..c1b9e249c09 100644 --- a/tests/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs +++ b/tests/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs @@ -3,7 +3,7 @@ // a variety of errors from the older, AST-based machinery (notably // borrowck), and then we get the NLL error at the end. -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals fn foo<'a>(x: &'a u32) -> &'static u32 { &*x diff --git a/tests/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs b/tests/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs index 06e96be80d5..1d31c9cb5a5 100644 --- a/tests/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs +++ b/tests/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs @@ -3,7 +3,7 @@ // a variety of errors from the older, AST-based machinery (notably // borrowck), and then we get the NLL error at the end. -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals fn foo<'a, 'b>(x: &'a u32, y: &'b u32) -> &'b u32 { &*x diff --git a/tests/ui/nll/closure-requirements/region-lbr1-does-outlive-lbr2-because-implied-bound.rs b/tests/ui/nll/closure-requirements/region-lbr1-does-outlive-lbr2-because-implied-bound.rs index 014959fdbd4..4e57fef167a 100644 --- a/tests/ui/nll/closure-requirements/region-lbr1-does-outlive-lbr2-because-implied-bound.rs +++ b/tests/ui/nll/closure-requirements/region-lbr1-does-outlive-lbr2-because-implied-bound.rs @@ -2,7 +2,7 @@ // report an error because of the (implied) bound that `'b: 'a`. // check-pass -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals fn foo<'a, 'b>(x: &'a &'b u32) -> &'a u32 { &**x diff --git a/tests/ui/nll/closure-requirements/return-wrong-bound-region.rs b/tests/ui/nll/closure-requirements/return-wrong-bound-region.rs index e34a3f6f2cb..0277715b590 100644 --- a/tests/ui/nll/closure-requirements/return-wrong-bound-region.rs +++ b/tests/ui/nll/closure-requirements/return-wrong-bound-region.rs @@ -2,7 +2,7 @@ // the first, but actually returns the second. This should fail within // the closure. -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/nll/ty-outlives/impl-trait-captures.rs b/tests/ui/nll/ty-outlives/impl-trait-captures.rs index 67b31b8bcd4..faab2cf8bcb 100644 --- a/tests/ui/nll/ty-outlives/impl-trait-captures.rs +++ b/tests/ui/nll/ty-outlives/impl-trait-captures.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals #![allow(warnings)] diff --git a/tests/ui/nll/ty-outlives/impl-trait-outlives.rs b/tests/ui/nll/ty-outlives/impl-trait-outlives.rs index 68ccb51fcd0..2c2eb703a15 100644 --- a/tests/ui/nll/ty-outlives/impl-trait-outlives.rs +++ b/tests/ui/nll/ty-outlives/impl-trait-outlives.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals #![allow(warnings)] diff --git a/tests/ui/nll/ty-outlives/projection-implied-bounds.rs b/tests/ui/nll/ty-outlives/projection-implied-bounds.rs index e1dac082409..59854fe6d8a 100644 --- a/tests/ui/nll/ty-outlives/projection-implied-bounds.rs +++ b/tests/ui/nll/ty-outlives/projection-implied-bounds.rs @@ -1,7 +1,7 @@ // Test that we can deduce when projections like `T::Item` outlive the // function body. Test that this does not imply that `T: 'a` holds. -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals use std::cell::Cell; diff --git a/tests/ui/nll/ty-outlives/projection-no-regions-closure.rs b/tests/ui/nll/ty-outlives/projection-no-regions-closure.rs index 2d9c008c759..f908381d4ac 100644 --- a/tests/ui/nll/ty-outlives/projection-no-regions-closure.rs +++ b/tests/ui/nll/ty-outlives/projection-no-regions-closure.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals // Tests closures that propagate an outlives relationship to their // creator where the subject is a projection with no regions (`<T as diff --git a/tests/ui/nll/ty-outlives/projection-no-regions-fn.rs b/tests/ui/nll/ty-outlives/projection-no-regions-fn.rs index a10a0366ae8..d04f88f829e 100644 --- a/tests/ui/nll/ty-outlives/projection-no-regions-fn.rs +++ b/tests/ui/nll/ty-outlives/projection-no-regions-fn.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals #![allow(warnings)] diff --git a/tests/ui/nll/ty-outlives/projection-one-region-closure.rs b/tests/ui/nll/ty-outlives/projection-one-region-closure.rs index af361e990e5..5d7b5fd72c9 100644 --- a/tests/ui/nll/ty-outlives/projection-one-region-closure.rs +++ b/tests/ui/nll/ty-outlives/projection-one-region-closure.rs @@ -12,7 +12,7 @@ // // Ensuring that both `T: 'a` and `'b: 'a` holds does work (`elements_outlive`). -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs b/tests/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs index 6f8513491df..3cd586f968d 100644 --- a/tests/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs +++ b/tests/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs @@ -4,7 +4,7 @@ // case, the best way to satisfy the trait bound is to show that `'b: // 'a`, which can be done in various ways. -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs b/tests/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs index 7c0a3bc72c3..85be5fbffbc 100644 --- a/tests/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs +++ b/tests/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs @@ -2,7 +2,7 @@ // outlive `'static`. In this case, we don't get any errors, and in fact // we don't even propagate constraints from the closures to the callers. -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals // check-pass #![allow(warnings)] diff --git a/tests/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs b/tests/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs index 7b4a3c03a62..92794400b24 100644 --- a/tests/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs +++ b/tests/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs @@ -5,7 +5,7 @@ // the trait bound, and hence we propagate it to the caller as a type // test. -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs b/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs index 4d83805993a..56485593c92 100644 --- a/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs +++ b/tests/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs index 72b18c16732..9695400c400 100644 --- a/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs +++ b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs index b8028761050..9e69792d724 100644 --- a/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs +++ b/tests/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs @@ -2,7 +2,7 @@ // `correct_region` for an explanation of how this test is setup; it's // somewhat intricate. -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/ui/nll/ty-outlives/ty-param-implied-bounds.rs b/tests/ui/nll/ty-outlives/ty-param-implied-bounds.rs index 9042844e848..145ae0d735b 100644 --- a/tests/ui/nll/ty-outlives/ty-param-implied-bounds.rs +++ b/tests/ui/nll/ty-outlives/ty-param-implied-bounds.rs @@ -1,4 +1,4 @@ -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals // check-pass // Test that we assume that universal types like `T` outlive the diff --git a/tests/ui/nll/user-annotations/dump-adt-brace-struct.rs b/tests/ui/nll/user-annotations/dump-adt-brace-struct.rs index 1d0b0d55af6..36a16c8dcc6 100644 --- a/tests/ui/nll/user-annotations/dump-adt-brace-struct.rs +++ b/tests/ui/nll/user-annotations/dump-adt-brace-struct.rs @@ -1,7 +1,7 @@ // Unit test for the "user substitutions" that are annotated on each // node. -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals #![allow(warnings)] #![feature(rustc_attrs)] diff --git a/tests/ui/nll/user-annotations/dump-fn-method.rs b/tests/ui/nll/user-annotations/dump-fn-method.rs index 9bdbbc37caa..086b2d2f6fc 100644 --- a/tests/ui/nll/user-annotations/dump-fn-method.rs +++ b/tests/ui/nll/user-annotations/dump-fn-method.rs @@ -1,7 +1,7 @@ // Unit test for the "user substitutions" that are annotated on each // node. -// compile-flags:-Zverbose +// compile-flags:-Zverbose-internals #![feature(rustc_attrs)] diff --git a/tests/ui/symbol-names/types.rs b/tests/ui/symbol-names/types.rs index 0ae699c93c2..475e8d89abf 100644 --- a/tests/ui/symbol-names/types.rs +++ b/tests/ui/symbol-names/types.rs @@ -1,7 +1,7 @@ // build-fail // revisions: legacy verbose-legacy // compile-flags: --crate-name=a -C symbol-mangling-version=legacy -Z unstable-options -//[verbose-legacy]compile-flags: -Zverbose +//[verbose-legacy]compile-flags: -Zverbose-internals // normalize-stderr-test: "h[[:xdigit:]]{16}" -> "h[HASH]" #![feature(never_type)] diff --git a/tests/ui/symbol-names/verbose.rs b/tests/ui/symbol-names/verbose.rs index e00c592b6d2..2aa43e87627 100644 --- a/tests/ui/symbol-names/verbose.rs +++ b/tests/ui/symbol-names/verbose.rs @@ -1,10 +1,10 @@ -// Regression test for issue #57596, where -Zverbose flag unintentionally +// Regression test for issue #57596, where -Zverbose-internals flag unintentionally // affected produced symbols making it impossible to link between crates // with a different value of the flag (for symbols involving generic // arguments equal to defaults of their respective parameters). // // build-pass -// compile-flags: -Zverbose +// compile-flags: -Zverbose-internals pub fn error(msg: String) -> Box<dyn std::error::Error> { msg.into() diff --git a/tests/ui/type/issue-94187-verbose-type-name.rs b/tests/ui/type/issue-94187-verbose-type-name.rs index 3713a32eb11..7c765d6d810 100644 --- a/tests/ui/type/issue-94187-verbose-type-name.rs +++ b/tests/ui/type/issue-94187-verbose-type-name.rs @@ -1,8 +1,8 @@ -// Check to insure that the output of `std::any::type_name` does not change based on `-Zverbose` +// Ensure the output of `std::any::type_name` does not change based on `-Zverbose-internals` // run-pass // edition: 2018 // revisions: normal verbose -// [verbose]compile-flags:-Zverbose +// [verbose]compile-flags:-Zverbose-internals --verbose use std::any::type_name; diff --git a/tests/ui/type/verbose.normal.stderr b/tests/ui/type/verbose.normal.stderr new file mode 100644 index 00000000000..6cb26403336 --- /dev/null +++ b/tests/ui/type/verbose.normal.stderr @@ -0,0 +1,14 @@ +error[E0308]: mismatched types + --> $DIR/verbose.rs:7:28 + | +LL | let _: Foo<u32, i32> = Foo::<i32, i32> { x: 0, y: 0 }; + | ------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Foo<u32, i32>`, found `Foo<i32, i32>` + | | + | expected due to this + | + = note: expected struct `Foo<u32, _>` + found struct `Foo<i32, _>` + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/type/verbose.rs b/tests/ui/type/verbose.rs new file mode 100644 index 00000000000..4ebd5cdccfc --- /dev/null +++ b/tests/ui/type/verbose.rs @@ -0,0 +1,13 @@ +// revisions:verbose normal +// [verbose]compile-flags:--verbose +#![crate_type = "lib"] + +struct Foo<T, U> { x: T, y: U } +fn bar() { + let _: Foo<u32, i32> = Foo::<i32, i32> { x: 0, y: 0 }; + //~^ ERROR mismatched types + //[verbose]~| NOTE expected struct `Foo<u32, i32>` + //[normal]~| NOTE expected struct `Foo<u32, _>` + //~| NOTE expected `Foo<u32, i32>` + //~| NOTE expected due to this +} diff --git a/tests/ui/type/verbose.verbose.stderr b/tests/ui/type/verbose.verbose.stderr new file mode 100644 index 00000000000..7cc7a16cdb1 --- /dev/null +++ b/tests/ui/type/verbose.verbose.stderr @@ -0,0 +1,14 @@ +error[E0308]: mismatched types + --> $DIR/verbose.rs:7:28 + | +LL | let _: Foo<u32, i32> = Foo::<i32, i32> { x: 0, y: 0 }; + | ------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Foo<u32, i32>`, found `Foo<i32, i32>` + | | + | expected due to this + | + = note: expected struct `Foo<u32, i32>` + found struct `Foo<i32, i32>` + +error: aborting due to 1 previous error + +For more information about this error, try `rustc --explain E0308`. diff --git a/tests/ui/where-clauses/higher-ranked-fn-type.rs b/tests/ui/where-clauses/higher-ranked-fn-type.rs index c19e75eb7bf..5d7308b6c1c 100644 --- a/tests/ui/where-clauses/higher-ranked-fn-type.rs +++ b/tests/ui/where-clauses/higher-ranked-fn-type.rs @@ -1,5 +1,5 @@ // revisions: quiet verbose -// [verbose]compile-flags: -Zverbose +// [verbose]compile-flags: -Zverbose-internals #![allow(unused_parens)] |
