1
Fork 0

rename to verbose-internals

This commit is contained in:
jyn 2023-12-19 12:39:58 -05:00
parent 558ac1cfb7
commit b5d8361909
65 changed files with 91 additions and 80 deletions

View file

@ -146,7 +146,7 @@ impl<'a> pprust_ast::PpAnn for AstHygieneAnn<'a> {
} }
pprust_ast::AnnNode::Crate(_) => { pprust_ast::AnnNode::Crate(_) => {
s.s.hardbreak(); s.s.hardbreak();
let verbose = self.sess.verbose(); let verbose = self.sess.verbose_internals();
s.synth_comment(rustc_span::hygiene::debug_hygiene_data(verbose)); s.synth_comment(rustc_span::hygiene::debug_hygiene_data(verbose));
s.s.hardbreak_if_not_bol(); s.s.hardbreak_if_not_bol();
} }

View file

@ -187,8 +187,8 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
expected: Expectation<'tcx>, expected: Expectation<'tcx>,
args: &'tcx [hir::Expr<'tcx>], args: &'tcx [hir::Expr<'tcx>],
) -> Ty<'tcx> { ) -> Ty<'tcx> {
if self.tcx().sess.verbose() { if self.tcx().sess.verbose_internals() {
// make this code only run with -Zverbose because it is probably slow // make this code only run with -Zverbose-internals because it is probably slow
if let Ok(lint_str) = self.tcx.sess.source_map().span_to_snippet(expr.span) { if let Ok(lint_str) = self.tcx.sess.source_map().span_to_snippet(expr.span) {
if !lint_str.contains('\n') { if !lint_str.contains('\n') {
debug!("expr text: {lint_str}"); debug!("expr text: {lint_str}");

View file

@ -1323,7 +1323,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
let num_display_types = consts_offset - regions_len; let num_display_types = consts_offset - regions_len;
for (i, (ta1, ta2)) in type_arguments.take(num_display_types).enumerate() { for (i, (ta1, ta2)) in type_arguments.take(num_display_types).enumerate() {
let i = i + regions_len; let i = i + regions_len;
if ta1 == ta2 && !self.tcx.sess.verbose() { if ta1 == ta2 && !self.tcx.sess.verbose_internals() {
values.0.push_normal("_"); values.0.push_normal("_");
values.1.push_normal("_"); values.1.push_normal("_");
} else { } else {
@ -1337,7 +1337,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
let const_arguments = sub1.consts().zip(sub2.consts()); let const_arguments = sub1.consts().zip(sub2.consts());
for (i, (ca1, ca2)) in const_arguments.enumerate() { for (i, (ca1, ca2)) in const_arguments.enumerate() {
let i = i + consts_offset; let i = i + consts_offset;
if ca1 == ca2 && !self.tcx.sess.verbose() { if ca1 == ca2 && !self.tcx.sess.verbose_internals() {
values.0.push_normal("_"); values.0.push_normal("_");
values.1.push_normal("_"); values.1.push_normal("_");
} else { } else {
@ -1507,7 +1507,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
(ty::FnPtr(sig1), ty::FnPtr(sig2)) => self.cmp_fn_sig(sig1, sig2), (ty::FnPtr(sig1), ty::FnPtr(sig2)) => self.cmp_fn_sig(sig1, sig2),
_ => { _ => {
if t1 == t2 && !self.tcx.sess.verbose() { if t1 == t2 && !self.tcx.sess.verbose_internals() {
// The two types are the same, elide and don't highlight. // The two types are the same, elide and don't highlight.
(DiagnosticStyledString::normal("_"), DiagnosticStyledString::normal("_")) (DiagnosticStyledString::normal("_"), DiagnosticStyledString::normal("_"))
} else { } else {

View file

@ -17,7 +17,7 @@ impl<'tcx, T: fmt::Debug> fmt::Debug for Normalized<'tcx, T> {
impl<'tcx, O: fmt::Debug> fmt::Debug for traits::Obligation<'tcx, O> { impl<'tcx, O: fmt::Debug> fmt::Debug for traits::Obligation<'tcx, O> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
if ty::tls::with(|tcx| tcx.sess.verbose()) { if ty::tls::with(|tcx| tcx.sess.verbose_internals()) {
write!( write!(
f, f,
"Obligation(predicate={:?}, cause={:?}, param_env={:?}, depth={})", "Obligation(predicate={:?}, cause={:?}, param_env={:?}, depth={})",

View file

@ -714,7 +714,7 @@ fn test_unstable_options_tracking_hash() {
untracked!(unpretty, Some("expanded".to_string())); untracked!(unpretty, Some("expanded".to_string()));
untracked!(unstable_options, true); untracked!(unstable_options, true);
untracked!(validate_mir, true); untracked!(validate_mir, true);
untracked!(verbose, true); untracked!(verbose_internals, true);
untracked!(write_long_types_to_disk, false); untracked!(write_long_types_to_disk, false);
// tidy-alphabetical-end // tidy-alphabetical-end

View file

@ -627,7 +627,11 @@ where
w, w,
"{:A$} // {}{}", "{:A$} // {}{}",
indented_body, indented_body,
if tcx.sess.verbose() { format!("{current_location:?}: ") } else { String::new() }, if tcx.sess.verbose_internals() {
format!("{current_location:?}: ")
} else {
String::new()
},
comment(tcx, statement.source_info), comment(tcx, statement.source_info),
A = ALIGN, A = ALIGN,
)?; )?;
@ -652,7 +656,11 @@ where
w, w,
"{:A$} // {}{}", "{:A$} // {}{}",
indented_terminator, indented_terminator,
if tcx.sess.verbose() { format!("{current_location:?}: ") } else { String::new() }, if tcx.sess.verbose_internals() {
format!("{current_location:?}: ")
} else {
String::new()
},
comment(tcx, data.terminator().source_info), comment(tcx, data.terminator().source_info),
A = ALIGN, A = ALIGN,
)?; )?;
@ -943,7 +951,7 @@ impl<'tcx> Debug for Rvalue<'tcx> {
// When printing regions, add trailing space if necessary. // When printing regions, add trailing space if necessary.
let print_region = ty::tls::with(|tcx| { let print_region = ty::tls::with(|tcx| {
tcx.sess.verbose() || tcx.sess.opts.unstable_opts.identify_regions tcx.sess.verbose_internals() || tcx.sess.opts.unstable_opts.identify_regions
}); });
let region = if print_region { let region = if print_region {
let mut region = region.to_string(); let mut region = region.to_string();
@ -1668,7 +1676,7 @@ fn pretty_print_const_value_tcx<'tcx>(
) -> fmt::Result { ) -> fmt::Result {
use crate::ty::print::PrettyPrinter; use crate::ty::print::PrettyPrinter;
if tcx.sess.verbose() { if tcx.sess.verbose_internals() {
fmt.write_str(&format!("ConstValue({ct:?}: {ty})"))?; fmt.write_str(&format!("ConstValue({ct:?}: {ty})"))?;
return Ok(()); return Ok(());
} }

View file

@ -177,7 +177,7 @@ impl<'tcx> ObligationCause<'tcx> {
// NOTE(flaper87): As of now, it keeps track of the whole error // NOTE(flaper87): As of now, it keeps track of the whole error
// chain. Ideally, we should have a way to configure this either // chain. Ideally, we should have a way to configure this either
// by using -Z verbose or just a CLI argument. // by using -Z verbose-internals or just a CLI argument.
self.code = self.code =
variant(DerivedObligationCause { parent_trait_pred, parent_code: self.code }).into(); variant(DerivedObligationCause { parent_trait_pred, parent_code: self.code }).into();
self self

View file

@ -326,7 +326,7 @@ impl<'tcx> Generics {
own_params.start = 1; own_params.start = 1;
} }
let verbose = tcx.sess.verbose(); let verbose = tcx.sess.verbose_internals();
// Filter the default arguments. // Filter the default arguments.
// //
@ -342,7 +342,7 @@ impl<'tcx> Generics {
param.default_value(tcx).is_some_and(|default| { param.default_value(tcx).is_some_and(|default| {
default.instantiate(tcx, args) == args[param.index as usize] default.instantiate(tcx, args) == args[param.index as usize]
}) })
// filter out trailing effect params, if we're not in `-Zverbose`. // filter out trailing effect params, if we're not in `-Zverbose-internals`.
|| (!verbose && matches!(param.kind, GenericParamDefKind::Const { is_host_effect: true, .. })) || (!verbose && matches!(param.kind, GenericParamDefKind::Const { is_host_effect: true, .. }))
}) })
.count(); .count();

View file

@ -744,7 +744,7 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write {
// only affect certain debug messages (e.g. messages printed // only affect certain debug messages (e.g. messages printed
// from `rustc_middle::ty` during the computation of `tcx.predicates_of`), // from `rustc_middle::ty` during the computation of `tcx.predicates_of`),
// and should have no effect on any compiler output. // and should have no effect on any compiler output.
// [Unless `-Zverbose` is used, e.g. in the output of // [Unless `-Zverbose-internals` is used, e.g. in the output of
// `tests/ui/nll/ty-outlives/impl-trait-captures.rs`, for // `tests/ui/nll/ty-outlives/impl-trait-captures.rs`, for
// example.] // example.]
if self.should_print_verbose() { if self.should_print_verbose() {
@ -829,7 +829,7 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write {
} }
ty::CoroutineWitness(did, args) => { ty::CoroutineWitness(did, args) => {
p!(write("{{")); p!(write("{{"));
if !self.tcx().sess.verbose() { if !self.tcx().sess.verbose_internals() {
p!("coroutine witness"); p!("coroutine witness");
// FIXME(eddyb) should use `def_span`. // FIXME(eddyb) should use `def_span`.
if let Some(did) = did.as_local() { if let Some(did) = did.as_local() {
@ -1698,7 +1698,7 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write {
} }
fn should_print_verbose(&self) -> bool { fn should_print_verbose(&self) -> bool {
self.tcx().sess.verbose() self.tcx().sess.verbose_internals()
} }
} }

View file

@ -315,8 +315,11 @@ pub(crate) fn create_query_frame<
ty::print::with_forced_impl_filename_line!(do_describe(tcx, key)) ty::print::with_forced_impl_filename_line!(do_describe(tcx, key))
) )
); );
let description = let description = if tcx.sess.verbose_internals() {
if tcx.sess.verbose() { format!("{description} [{name:?}]") } else { description }; format!("{description} [{name:?}]")
} else {
description
};
let span = if kind == dep_graph::dep_kinds::def_span || with_no_queries() { let span = if kind == dep_graph::dep_kinds::def_span || with_no_queries() {
// The `def_span` query is used to calculate `default_span`, // The `def_span` query is used to calculate `default_span`,
// so exit to avoid infinite recursion. // so exit to avoid infinite recursion.

View file

@ -1989,8 +1989,8 @@ written to standard error output)"),
"use legacy .ctors section for initializers rather than .init_array"), "use legacy .ctors section for initializers rather than .init_array"),
validate_mir: bool = (false, parse_bool, [UNTRACKED], validate_mir: bool = (false, parse_bool, [UNTRACKED],
"validate MIR after each transformation"), "validate MIR after each transformation"),
#[rustc_lint_opt_deny_field_access("use `Session::verbose` instead of this field")] #[rustc_lint_opt_deny_field_access("use `Session::verbose_internals` instead of this field")]
verbose: bool = (false, parse_bool, [UNTRACKED], verbose_internals: bool = (false, parse_bool, [UNTRACKED],
"in general, enable more debug printouts (default: no)"), "in general, enable more debug printouts (default: no)"),
#[rustc_lint_opt_deny_field_access("use `Session::verify_llvm_ir` instead of this field")] #[rustc_lint_opt_deny_field_access("use `Session::verify_llvm_ir` instead of this field")]
verify_llvm_ir: bool = (false, parse_bool, [TRACKED], verify_llvm_ir: bool = (false, parse_bool, [TRACKED],

View file

@ -974,8 +974,8 @@ impl Session {
// JUSTIFICATION: defn of the suggested wrapper fns // JUSTIFICATION: defn of the suggested wrapper fns
#[allow(rustc::bad_opt_access)] #[allow(rustc::bad_opt_access)]
impl Session { impl Session {
pub fn verbose(&self) -> bool { pub fn verbose_internals(&self) -> bool {
self.opts.unstable_opts.verbose self.opts.unstable_opts.verbose_internals
} }
pub fn print_llvm_stats(&self) -> bool { pub fn print_llvm_stats(&self) -> bool {

View file

@ -214,7 +214,7 @@ impl<'tcx> Printer<'tcx> for SymbolPrinter<'tcx> {
| ty::Coroutine(def_id, args, _) => self.print_def_path(def_id, args), | ty::Coroutine(def_id, args, _) => self.print_def_path(def_id, args),
// The `pretty_print_type` formatting of array size depends on // The `pretty_print_type` formatting of array size depends on
// -Zverbose flag, so we cannot reuse it here. // -Zverbose-internals flag, so we cannot reuse it here.
ty::Array(ty, size) => { ty::Array(ty, size) => {
self.write_str("[")?; self.write_str("[")?;
self.print_type(ty)?; self.print_type(ty)?;
@ -255,7 +255,7 @@ impl<'tcx> Printer<'tcx> for SymbolPrinter<'tcx> {
// only print integers // only print integers
match (ct.kind(), ct.ty().kind()) { match (ct.kind(), ct.ty().kind()) {
(ty::ConstKind::Value(ty::ValTree::Leaf(scalar)), ty::Int(_) | ty::Uint(_)) => { (ty::ConstKind::Value(ty::ValTree::Leaf(scalar)), ty::Int(_) | ty::Uint(_)) => {
// The `pretty_print_const` formatting depends on -Zverbose // The `pretty_print_const` formatting depends on -Zverbose-internals
// flag, so we cannot reuse it here. // flag, so we cannot reuse it here.
let signed = matches!(ct.ty().kind(), ty::Int(_)); let signed = matches!(ct.ty().kind(), ty::Int(_));
write!( write!(

View file

@ -343,7 +343,7 @@ _Note:_ The order of these lint level arguments is taken into account, see [lint
## `-Z`: set unstable options ## `-Z`: set unstable options
This flag will allow you to set unstable options of rustc. In order to set multiple options, This flag will allow you to set unstable options of rustc. In order to set multiple options,
the -Z flag can be used multiple times. For example: `rustc -Z verbose -Z time-passes`. the -Z flag can be used multiple times. For example: `rustc -Z verbose-internals -Z time-passes`.
Specifying options with -Z is only available on nightly. To view all available options Specifying options with -Z is only available on nightly. To view all available options
run: `rustc -Z help`, or see [The Unstable Book](../unstable-book/index.html). run: `rustc -Z help`, or see [The Unstable Book](../unstable-book/index.html).

View file

@ -4,7 +4,7 @@
// suitable variables and that we setup the outlives relationship // suitable variables and that we setup the outlives relationship
// between R0 and R1 properly. // between R0 and R1 properly.
// compile-flags: -Zverbose // compile-flags: -Zverbose-internals
// ^^^^^^^^^ force compiler to dump more region information // ^^^^^^^^^ force compiler to dump more region information
#![allow(warnings)] #![allow(warnings)]

View file

@ -3,7 +3,7 @@
// in the type of `p` includes the points after `&v[0]` up to (but not // 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. // including) the call to `use_x`. The `else` branch is not included.
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
// ^^^^^^^^^ force compiler to dump more region information // ^^^^^^^^^ force compiler to dump more region information
#![allow(warnings)] #![allow(warnings)]

View file

@ -1,7 +1,7 @@
// //
// revisions: verbose normal // revisions: verbose normal
// //
//[verbose] compile-flags: -Z verbose //[verbose] compile-flags: -Z verbose-internals
trait Foo<'b, 'c, S=u32> { trait Foo<'b, 'c, S=u32> {
fn bar<'a, T>() where T: 'a {} fn bar<'a, T>() where T: 'a {}

View file

@ -1,4 +1,4 @@
// compile-flags: -Ztrim-diagnostic-paths=off -Zverbose // compile-flags: -Ztrim-diagnostic-paths=off -Zverbose-internals
mod mod1 { mod mod1 {
pub fn f<T: std::fmt::Display>(t: T) pub fn f<T: std::fmt::Display>(t: T)

View file

@ -1,4 +1,4 @@
// compile-flags: -Zverbose // compile-flags: -Zverbose-internals
fn to_fn_once<F:FnOnce()>(f: F) -> F { f } fn to_fn_once<F:FnOnce()>(f: F) -> F { f }

View file

@ -1,4 +1,4 @@
// compile-flags: -Zverbose // compile-flags: -Zverbose-internals
mod mod1 { mod mod1 {
pub fn f<T: std::fmt::Display>(t: T) pub fn f<T: std::fmt::Display>(t: T)

View file

@ -1,4 +1,4 @@
// compile-flags: -Zverbose // compile-flags: -Zverbose-internals
// Same as closure-coerce-fn-1.rs // Same as closure-coerce-fn-1.rs

View file

@ -1,4 +1,4 @@
// compile-flags: -Zverbose // compile-flags: -Zverbose-internals
// Same as: tests/ui/coroutine/issue-68112.stderr // Same as: tests/ui/coroutine/issue-68112.stderr

View file

@ -1,4 +1,4 @@
// compile-flags: -Zverbose // compile-flags: -Zverbose-internals
// Same as test/ui/coroutine/not-send-sync.rs // Same as test/ui/coroutine/not-send-sync.rs
#![feature(coroutines)] #![feature(coroutines)]

View file

@ -1,4 +1,4 @@
// compile-flags: -Zverbose // compile-flags: -Zverbose-internals
#![feature(coroutines, coroutine_trait)] #![feature(coroutines, coroutine_trait)]

View file

@ -1,4 +1,4 @@
// compile-flags: -Zverbose // compile-flags: -Zverbose-internals
fn foo(_: i32, _: i32) {} fn foo(_: i32, _: i32) {}

View file

@ -1,5 +1,5 @@
// revisions: current next // revisions: current next
// compile-flags: -Zverbose // compile-flags: -Zverbose-internals
//[next] compile-flags: -Znext-solver //[next] compile-flags: -Znext-solver
// normalize-stderr-test "DefId\([^\)]+\)" -> "DefId(..)" // normalize-stderr-test "DefId\([^\)]+\)" -> "DefId(..)"

View file

@ -1,4 +1,4 @@
// compile-flags:-Z verbose // compile-flags:-Z verbose-internals
fn main() { fn main() {
let x = [1,2]; let x = [1,2];

View file

@ -12,7 +12,7 @@
// that appear free in its type (hence, we see it before the closure's // that appear free in its type (hence, we see it before the closure's
// "external requirements" report). // "external requirements" report).
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
#![feature(rustc_attrs)] #![feature(rustc_attrs)]

View file

@ -12,7 +12,7 @@
// basically checking that the MIR type checker correctly enforces the // basically checking that the MIR type checker correctly enforces the
// closure signature. // closure signature.
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
#![feature(rustc_attrs)] #![feature(rustc_attrs)]

View file

@ -5,7 +5,7 @@
// //
// except that the closure does so via a second closure. // except that the closure does so via a second closure.
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
#![feature(rustc_attrs)] #![feature(rustc_attrs)]

View file

@ -9,7 +9,7 @@
// `'b`. This relationship is propagated to the closure creator, // `'b`. This relationship is propagated to the closure creator,
// which reports an error. // which reports an error.
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
#![feature(rustc_attrs)] #![feature(rustc_attrs)]

View file

@ -1,7 +1,7 @@
// Test where we fail to approximate due to demanding a postdom // Test where we fail to approximate due to demanding a postdom
// relationship between our upper bounds. // relationship between our upper bounds.
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
#![feature(rustc_attrs)] #![feature(rustc_attrs)]

View file

@ -12,7 +12,7 @@
// Note: the use of `Cell` here is to introduce invariance. One less // Note: the use of `Cell` here is to introduce invariance. One less
// variable. // variable.
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
#![feature(rustc_attrs)] #![feature(rustc_attrs)]

View file

@ -2,7 +2,7 @@
// where `'x` is bound in closure type but `'a` is free. This forces // where `'x` is bound in closure type but `'a` is free. This forces
// us to approximate `'x` one way or the other. // us to approximate `'x` one way or the other.
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
#![feature(rustc_attrs)] #![feature(rustc_attrs)]

View file

@ -3,7 +3,7 @@
// because `'y` is higher-ranked but we know of no relations to other // 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`. // regions. Note that `'static` shows up in the stderr output as `'0`.
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
#![feature(rustc_attrs)] #![feature(rustc_attrs)]

View file

@ -4,7 +4,7 @@
// relations to other regions. Note that `'static` shows up in the // relations to other regions. Note that `'static` shows up in the
// stderr output as `'0`. // stderr output as `'0`.
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
#![feature(rustc_attrs)] #![feature(rustc_attrs)]

View file

@ -5,7 +5,7 @@
// relationships. In the 'main' variant, there are a number of // relationships. In the 'main' variant, there are a number of
// anonymous regions as well. // anonymous regions as well.
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
#![feature(rustc_attrs)] #![feature(rustc_attrs)]

View file

@ -3,7 +3,7 @@
// need to propagate; but in fact we do because identity of free // need to propagate; but in fact we do because identity of free
// regions is erased. // regions is erased.
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
// check-pass // check-pass
#![feature(rustc_attrs)] #![feature(rustc_attrs)]

View file

@ -7,7 +7,7 @@
// as it knows of no relationships between `'x` and any // as it knows of no relationships between `'x` and any
// non-higher-ranked regions. // non-higher-ranked regions.
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
#![feature(rustc_attrs)] #![feature(rustc_attrs)]

View file

@ -7,7 +7,7 @@
// as it only knows of regions that `'x` is outlived by, and none that // as it only knows of regions that `'x` is outlived by, and none that
// `'x` outlives. // `'x` outlives.
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
#![feature(rustc_attrs)] #![feature(rustc_attrs)]

View file

@ -4,7 +4,7 @@
// the same `'a` for which it implements `Trait`, which can only be the `'a` // the same `'a` for which it implements `Trait`, which can only be the `'a`
// from the function definition. // from the function definition.
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
#![feature(rustc_attrs)] #![feature(rustc_attrs)]
#![allow(dead_code)] #![allow(dead_code)]

View file

@ -3,7 +3,7 @@
// a variety of errors from the older, AST-based machinery (notably // a variety of errors from the older, AST-based machinery (notably
// borrowck), and then we get the NLL error at the end. // borrowck), and then we get the NLL error at the end.
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
fn foo(x: &u32) -> &'static u32 { fn foo(x: &u32) -> &'static u32 {
&*x &*x

View file

@ -3,7 +3,7 @@
// a variety of errors from the older, AST-based machinery (notably // a variety of errors from the older, AST-based machinery (notably
// borrowck), and then we get the NLL error at the end. // 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 { fn foo<'a>(x: &'a u32) -> &'static u32 {
&*x &*x

View file

@ -3,7 +3,7 @@
// a variety of errors from the older, AST-based machinery (notably // a variety of errors from the older, AST-based machinery (notably
// borrowck), and then we get the NLL error at the end. // 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 { fn foo<'a, 'b>(x: &'a u32, y: &'b u32) -> &'b u32 {
&*x &*x

View file

@ -2,7 +2,7 @@
// report an error because of the (implied) bound that `'b: 'a`. // report an error because of the (implied) bound that `'b: 'a`.
// check-pass // check-pass
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
fn foo<'a, 'b>(x: &'a &'b u32) -> &'a u32 { fn foo<'a, 'b>(x: &'a &'b u32) -> &'a u32 {
&**x &**x

View file

@ -2,7 +2,7 @@
// the first, but actually returns the second. This should fail within // the first, but actually returns the second. This should fail within
// the closure. // the closure.
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
#![feature(rustc_attrs)] #![feature(rustc_attrs)]

View file

@ -1,4 +1,4 @@
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
#![allow(warnings)] #![allow(warnings)]

View file

@ -1,4 +1,4 @@
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
#![allow(warnings)] #![allow(warnings)]

View file

@ -1,7 +1,7 @@
// Test that we can deduce when projections like `T::Item` outlive the // Test that we can deduce when projections like `T::Item` outlive the
// function body. Test that this does not imply that `T: 'a` holds. // function body. Test that this does not imply that `T: 'a` holds.
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
use std::cell::Cell; use std::cell::Cell;

View file

@ -1,4 +1,4 @@
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
// Tests closures that propagate an outlives relationship to their // Tests closures that propagate an outlives relationship to their
// creator where the subject is a projection with no regions (`<T as // creator where the subject is a projection with no regions (`<T as

View file

@ -1,4 +1,4 @@
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
#![allow(warnings)] #![allow(warnings)]

View file

@ -12,7 +12,7 @@
// //
// Ensuring that both `T: 'a` and `'b: 'a` holds does work (`elements_outlive`). // Ensuring that both `T: 'a` and `'b: 'a` holds does work (`elements_outlive`).
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
#![allow(warnings)] #![allow(warnings)]
#![feature(rustc_attrs)] #![feature(rustc_attrs)]

View file

@ -4,7 +4,7 @@
// case, the best way to satisfy the trait bound is to show that `'b: // case, the best way to satisfy the trait bound is to show that `'b:
// 'a`, which can be done in various ways. // 'a`, which can be done in various ways.
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
#![allow(warnings)] #![allow(warnings)]
#![feature(rustc_attrs)] #![feature(rustc_attrs)]

View file

@ -2,7 +2,7 @@
// outlive `'static`. In this case, we don't get any errors, and in fact // 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. // we don't even propagate constraints from the closures to the callers.
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
// check-pass // check-pass
#![allow(warnings)] #![allow(warnings)]

View file

@ -5,7 +5,7 @@
// the trait bound, and hence we propagate it to the caller as a type // the trait bound, and hence we propagate it to the caller as a type
// test. // test.
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
#![allow(warnings)] #![allow(warnings)]
#![feature(rustc_attrs)] #![feature(rustc_attrs)]

View file

@ -1,4 +1,4 @@
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
#![allow(warnings)] #![allow(warnings)]
#![feature(rustc_attrs)] #![feature(rustc_attrs)]

View file

@ -1,4 +1,4 @@
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
#![allow(warnings)] #![allow(warnings)]
#![feature(rustc_attrs)] #![feature(rustc_attrs)]

View file

@ -2,7 +2,7 @@
// `correct_region` for an explanation of how this test is setup; it's // `correct_region` for an explanation of how this test is setup; it's
// somewhat intricate. // somewhat intricate.
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
#![allow(warnings)] #![allow(warnings)]
#![feature(rustc_attrs)] #![feature(rustc_attrs)]

View file

@ -1,4 +1,4 @@
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
// check-pass // check-pass
// Test that we assume that universal types like `T` outlive the // Test that we assume that universal types like `T` outlive the

View file

@ -1,7 +1,7 @@
// Unit test for the "user substitutions" that are annotated on each // Unit test for the "user substitutions" that are annotated on each
// node. // node.
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
#![allow(warnings)] #![allow(warnings)]
#![feature(rustc_attrs)] #![feature(rustc_attrs)]

View file

@ -1,7 +1,7 @@
// Unit test for the "user substitutions" that are annotated on each // Unit test for the "user substitutions" that are annotated on each
// node. // node.
// compile-flags:-Zverbose // compile-flags:-Zverbose-internals
#![feature(rustc_attrs)] #![feature(rustc_attrs)]

View file

@ -1,7 +1,7 @@
// build-fail // build-fail
// revisions: legacy verbose-legacy // revisions: legacy verbose-legacy
// compile-flags: --crate-name=a -C symbol-mangling-version=legacy -Z unstable-options // 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]" // normalize-stderr-test: "h[[:xdigit:]]{16}" -> "h[HASH]"
#![feature(never_type)] #![feature(never_type)]

View file

@ -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 // affected produced symbols making it impossible to link between crates
// with a different value of the flag (for symbols involving generic // with a different value of the flag (for symbols involving generic
// arguments equal to defaults of their respective parameters). // arguments equal to defaults of their respective parameters).
// //
// build-pass // build-pass
// compile-flags: -Zverbose // compile-flags: -Zverbose-internals
pub fn error(msg: String) -> Box<dyn std::error::Error> { pub fn error(msg: String) -> Box<dyn std::error::Error> {
msg.into() msg.into()

View file

@ -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 // run-pass
// edition: 2018 // edition: 2018
// revisions: normal verbose // revisions: normal verbose
// [verbose]compile-flags:-Zverbose // [verbose]compile-flags:-Zverbose-internals --verbose
use std::any::type_name; use std::any::type_name;

View file

@ -1,5 +1,5 @@
// revisions: quiet verbose // revisions: quiet verbose
// [verbose]compile-flags: -Zverbose // [verbose]compile-flags: -Zverbose-internals
#![allow(unused_parens)] #![allow(unused_parens)]