new unstable option: -Zwrite-long-types-to-disk

This option guards the logic of writing long type names in files and
instead using short forms in error messages in rustc_middle/ty/error
behind a flag. The main motivation for this change is to disable this
behaviour when running ui tests.

This logic can be triggered by running tests in a directory that has a
long enough path, e.g. /my/very-long-path/where/rust-codebase/exists/

This means ui tests can fail depending on how long the path to their
file is.

Some ui tests actually rely on this behaviour for their assertions,
so for those we enable the flag manually.
This commit is contained in:
Mahdi Dibaiee 2023-07-20 16:47:42 +01:00
parent 33a2c2487a
commit 8df39667dc
25 changed files with 47 additions and 32 deletions

View file

@ -738,6 +738,7 @@ fn test_unstable_options_tracking_hash() {
untracked!(unstable_options, true); untracked!(unstable_options, true);
untracked!(validate_mir, true); untracked!(validate_mir, true);
untracked!(verbose, true); untracked!(verbose, true);
untracked!(write_long_types_to_disk, true);
// tidy-alphabetical-end // tidy-alphabetical-end
macro_rules! tracked { macro_rules! tracked {

View file

@ -339,12 +339,17 @@ impl<'tcx> TyCtxt<'tcx> {
} }
pub fn short_ty_string(self, ty: Ty<'tcx>) -> (String, Option<PathBuf>) { pub fn short_ty_string(self, ty: Ty<'tcx>) -> (String, Option<PathBuf>) {
let width = self.sess.diagnostic_width();
let length_limit = width.saturating_sub(30);
let regular = FmtPrinter::new(self, hir::def::Namespace::TypeNS) let regular = FmtPrinter::new(self, hir::def::Namespace::TypeNS)
.pretty_print_type(ty) .pretty_print_type(ty)
.expect("could not write to `String`") .expect("could not write to `String`")
.into_buffer(); .into_buffer();
if !self.sess.opts.unstable_opts.write_long_types_to_disk {
return (regular, None);
}
let width = self.sess.diagnostic_width();
let length_limit = width.saturating_sub(30);
if regular.len() <= width { if regular.len() <= width {
return (regular, None); return (regular, None);
} }

View file

@ -1875,6 +1875,8 @@ written to standard error output)"),
Requires `-Clto[=[fat,yes]]`"), Requires `-Clto[=[fat,yes]]`"),
wasi_exec_model: Option<WasiExecModel> = (None, parse_wasi_exec_model, [TRACKED], wasi_exec_model: Option<WasiExecModel> = (None, parse_wasi_exec_model, [TRACKED],
"whether to build a wasi command or reactor"), "whether to build a wasi command or reactor"),
write_long_types_to_disk: bool = (true, parse_bool, [UNTRACKED],
"whether long type names should be written to files instead of being printed in errors"),
// tidy-alphabetical-end // tidy-alphabetical-end
// If you add a new option, please update: // If you add a new option, please update:

View file

@ -2330,6 +2330,7 @@ impl<'test> TestCx<'test> {
// Hide line numbers to reduce churn // Hide line numbers to reduce churn
rustc.arg("-Zui-testing"); rustc.arg("-Zui-testing");
rustc.arg("-Zdeduplicate-diagnostics=no"); rustc.arg("-Zdeduplicate-diagnostics=no");
rustc.arg("-Zwrite-long-types-to-disk=no");
// FIXME: use this for other modes too, for perf? // FIXME: use this for other modes too, for perf?
rustc.arg("-Cstrip=debuginfo"); rustc.arg("-Cstrip=debuginfo");
} }

View file

@ -15,8 +15,7 @@ note: expected this to be `Foo`
| |
LL | type Error = E; LL | type Error = E;
| ^ | ^
= note: required for the cast from `Box<Result<..., ...>>` to `Box<(dyn Future<Error = Foo> + 'static)>` = note: required for the cast from `Box<Result<Result<(), Result<Result<(), Result<Result<(), Option<{integer}>>, ()>>, ()>>, ()>>` to `Box<(dyn Future<Error = Foo> + 'static)>`
= note: the full name for the source type has been written to '$TEST_BUILD_DIR/diagnostic-width/E0271/E0271.long-type-hash.txt'
error: aborting due to previous error error: aborting due to previous error

View file

@ -1,4 +1,4 @@
// compile-flags: --diagnostic-width=60 // compile-flags: --diagnostic-width=60 -Zwrite-long-types-to-disk=yes
// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" // normalize-stderr-test: "long-type-\d+" -> "long-type-hash"
mod a { mod a {

View file

@ -1,3 +1,4 @@
// compile-flags: -Zwrite-long-types-to-disk=yes
trait Trait { type AssociatedType; } trait Trait { type AssociatedType; }
fn foo<T>(t: T) where T: Trait<AssociatedType=u32> { fn foo<T>(t: T) where T: Trait<AssociatedType=u32> {

View file

@ -1,5 +1,5 @@
error[E0271]: type mismatch resolving `<i8 as Trait>::AssociatedType == u32` error[E0271]: type mismatch resolving `<i8 as Trait>::AssociatedType == u32`
--> $DIR/E0271.rs:10:9 --> $DIR/E0271.rs:11:9
| |
LL | foo(3_i8); LL | foo(3_i8);
| --- ^^^^ type mismatch resolving `<i8 as Trait>::AssociatedType == u32` | --- ^^^^ type mismatch resolving `<i8 as Trait>::AssociatedType == u32`
@ -7,12 +7,12 @@ LL | foo(3_i8);
| required by a bound introduced by this call | required by a bound introduced by this call
| |
note: expected this to be `u32` note: expected this to be `u32`
--> $DIR/E0271.rs:7:43 --> $DIR/E0271.rs:8:43
| |
LL | impl Trait for i8 { type AssociatedType = &'static str; } LL | impl Trait for i8 { type AssociatedType = &'static str; }
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^
note: required by a bound in `foo` note: required by a bound in `foo`
--> $DIR/E0271.rs:3:32 --> $DIR/E0271.rs:4:32
| |
LL | fn foo<T>(t: T) where T: Trait<AssociatedType=u32> { LL | fn foo<T>(t: T) where T: Trait<AssociatedType=u32> {
| ^^^^^^^^^^^^^^^^^^ required by this bound in `foo` | ^^^^^^^^^^^^^^^^^^ required by this bound in `foo`

View file

@ -1,3 +1,4 @@
// compile-flags: -Zwrite-long-types-to-disk=yes
// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" // normalize-stderr-test: "long-type-\d+" -> "long-type-hash"
trait Foo {} trait Foo {}

View file

@ -1,12 +1,12 @@
error[E0275]: overflow evaluating the requirement `Bar<Bar<Bar<Bar<Bar<Bar<Bar<...>>>>>>>: Foo` error[E0275]: overflow evaluating the requirement `Bar<Bar<Bar<Bar<Bar<Bar<Bar<...>>>>>>>: Foo`
--> $DIR/E0275.rs:6:33 --> $DIR/E0275.rs:7:33
| |
LL | impl<T> Foo for T where Bar<T>: Foo {} LL | impl<T> Foo for T where Bar<T>: Foo {}
| ^^^ | ^^^
| |
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`E0275`) = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`E0275`)
note: required for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<...>>>>>>>>>>>>>>>>>>>>>` to implement `Foo` note: required for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<...>>>>>>>>>>>>>>>>>>>>>` to implement `Foo`
--> $DIR/E0275.rs:6:9 --> $DIR/E0275.rs:7:9
| |
LL | impl<T> Foo for T where Bar<T>: Foo {} LL | impl<T> Foo for T where Bar<T>: Foo {}
| ^^^ ^ --- unsatisfied trait bound introduced here | ^^^ ^ --- unsatisfied trait bound introduced here

View file

@ -1,3 +1,4 @@
// compile-flags: -Zwrite-long-types-to-disk=yes
// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" // normalize-stderr-test: "long-type-\d+" -> "long-type-hash"
fn id( fn id(

View file

@ -1,5 +1,5 @@
error[E0308]: mismatched types error[E0308]: mismatched types
--> $DIR/hang-on-deeply-nested-dyn.rs:12:5 --> $DIR/hang-on-deeply-nested-dyn.rs:13:5
| |
LL | ) -> &dyn Fn( LL | ) -> &dyn Fn(
| ______- | ______-

View file

@ -31,7 +31,6 @@ LL | pub struct Filter<S, F> {
LL | let count = filter.countx(); LL | let count = filter.countx();
| ^^^^^^ method cannot be called due to unsatisfied trait bounds | ^^^^^^ method cannot be called due to unsatisfied trait bounds
| |
= note: the full type name has been written to '$TEST_BUILD_DIR/higher-ranked/trait-bounds/issue-30786/issue-30786.long-type-hash.txt'
note: the following trait bounds were not satisfied: note: the following trait bounds were not satisfied:
`&'a mut &Filter<Map<Repeat, for<'a> fn(&'a u64) -> &'a u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:131:30: 131:37]>: Stream` `&'a mut &Filter<Map<Repeat, for<'a> fn(&'a u64) -> &'a u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:131:30: 131:37]>: Stream`
`&'a mut &mut Filter<Map<Repeat, for<'a> fn(&'a u64) -> &'a u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:131:30: 131:37]>: Stream` `&'a mut &mut Filter<Map<Repeat, for<'a> fn(&'a u64) -> &'a u64 {identity::<u64>}>, [closure@$DIR/issue-30786.rs:131:30: 131:37]>: Stream`

View file

@ -1,3 +1,4 @@
// compile-flags: -Zwrite-long-types-to-disk=yes
// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" // normalize-stderr-test: "long-type-\d+" -> "long-type-hash"
trait Foo { trait Foo {
fn answer(self); fn answer(self);

View file

@ -1,5 +1,5 @@
error[E0392]: parameter `T` is never used error[E0392]: parameter `T` is never used
--> $DIR/issue-20413.rs:6:15 --> $DIR/issue-20413.rs:7:15
| |
LL | struct NoData<T>; LL | struct NoData<T>;
| ^ unused parameter | ^ unused parameter
@ -8,14 +8,14 @@ LL | struct NoData<T>;
= help: if you intended `T` to be a const parameter, use `const T: usize` instead = help: if you intended `T` to be a const parameter, use `const T: usize` instead
error[E0275]: overflow evaluating the requirement `NoData<NoData<NoData<NoData<NoData<NoData<NoData<...>>>>>>>: Foo` error[E0275]: overflow evaluating the requirement `NoData<NoData<NoData<NoData<NoData<NoData<NoData<...>>>>>>>: Foo`
--> $DIR/issue-20413.rs:9:36 --> $DIR/issue-20413.rs:10:36
| |
LL | impl<T> Foo for T where NoData<T>: Foo { LL | impl<T> Foo for T where NoData<T>: Foo {
| ^^^ | ^^^
| |
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`) = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`)
note: required for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<...>>>>>>>>>>>>>` to implement `Foo` note: required for `NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<NoData<...>>>>>>>>>>>>>` to implement `Foo`
--> $DIR/issue-20413.rs:9:9 --> $DIR/issue-20413.rs:10:9
| |
LL | impl<T> Foo for T where NoData<T>: Foo { LL | impl<T> Foo for T where NoData<T>: Foo {
| ^^^ ^ --- unsatisfied trait bound introduced here | ^^^ ^ --- unsatisfied trait bound introduced here
@ -24,20 +24,20 @@ LL | impl<T> Foo for T where NoData<T>: Foo {
= note: required for `NoData<T>` to implement `Foo` = note: required for `NoData<T>` to implement `Foo`
error[E0275]: overflow evaluating the requirement `AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<...>>>>>>>: Bar` error[E0275]: overflow evaluating the requirement `AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<...>>>>>>>: Bar`
--> $DIR/issue-20413.rs:28:42 --> $DIR/issue-20413.rs:29:42
| |
LL | impl<T> Bar for T where EvenLessData<T>: Baz { LL | impl<T> Bar for T where EvenLessData<T>: Baz {
| ^^^ | ^^^
| |
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`) = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`)
note: required for `EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<...>>>>>>>` to implement `Baz` note: required for `EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<...>>>>>>>` to implement `Baz`
--> $DIR/issue-20413.rs:35:9 --> $DIR/issue-20413.rs:36:9
| |
LL | impl<T> Baz for T where AlmostNoData<T>: Bar { LL | impl<T> Baz for T where AlmostNoData<T>: Bar {
| ^^^ ^ --- unsatisfied trait bound introduced here | ^^^ ^ --- unsatisfied trait bound introduced here
= note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-20413/issue-20413.long-type-hash.txt' = note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-20413/issue-20413.long-type-hash.txt'
note: required for `AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<...>>>>>>>` to implement `Bar` note: required for `AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<...>>>>>>>` to implement `Bar`
--> $DIR/issue-20413.rs:28:9 --> $DIR/issue-20413.rs:29:9
| |
LL | impl<T> Bar for T where EvenLessData<T>: Baz { LL | impl<T> Bar for T where EvenLessData<T>: Baz {
| ^^^ ^ --- unsatisfied trait bound introduced here | ^^^ ^ --- unsatisfied trait bound introduced here
@ -46,20 +46,20 @@ LL | impl<T> Bar for T where EvenLessData<T>: Baz {
= note: required for `EvenLessData<T>` to implement `Baz` = note: required for `EvenLessData<T>` to implement `Baz`
error[E0275]: overflow evaluating the requirement `EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<...>>>>>>>: Baz` error[E0275]: overflow evaluating the requirement `EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<...>>>>>>>: Baz`
--> $DIR/issue-20413.rs:35:42 --> $DIR/issue-20413.rs:36:42
| |
LL | impl<T> Baz for T where AlmostNoData<T>: Bar { LL | impl<T> Baz for T where AlmostNoData<T>: Bar {
| ^^^ | ^^^
| |
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`) = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_20413`)
note: required for `AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<...>>>>>>>` to implement `Bar` note: required for `AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<...>>>>>>>` to implement `Bar`
--> $DIR/issue-20413.rs:28:9 --> $DIR/issue-20413.rs:29:9
| |
LL | impl<T> Bar for T where EvenLessData<T>: Baz { LL | impl<T> Bar for T where EvenLessData<T>: Baz {
| ^^^ ^ --- unsatisfied trait bound introduced here | ^^^ ^ --- unsatisfied trait bound introduced here
= note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-20413/issue-20413.long-type-hash.txt' = note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-20413/issue-20413.long-type-hash.txt'
note: required for `EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<...>>>>>>>` to implement `Baz` note: required for `EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<AlmostNoData<EvenLessData<...>>>>>>>` to implement `Baz`
--> $DIR/issue-20413.rs:35:9 --> $DIR/issue-20413.rs:36:9
| |
LL | impl<T> Baz for T where AlmostNoData<T>: Bar { LL | impl<T> Baz for T where AlmostNoData<T>: Bar {
| ^^^ ^ --- unsatisfied trait bound introduced here | ^^^ ^ --- unsatisfied trait bound introduced here

View file

@ -1,3 +1,4 @@
// compile-flags: -Zwrite-long-types-to-disk=yes
// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" // normalize-stderr-test: "long-type-\d+" -> "long-type-hash"
trait Next { trait Next {
type Next: Next; type Next: Next;

View file

@ -1,12 +1,12 @@
error[E0275]: overflow evaluating the requirement `<<<<<<<... as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next: Sized` error[E0275]: overflow evaluating the requirement `<<<<<<<... as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next: Sized`
--> $DIR/issue-23122-2.rs:11:17 --> $DIR/issue-23122-2.rs:12:17
| |
LL | type Next = <GetNext<T::Next> as Next>::Next; LL | type Next = <GetNext<T::Next> as Next>::Next;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_23122_2`) = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_23122_2`)
note: required for `GetNext<<<<<<<... as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next>` to implement `Next` note: required for `GetNext<<<<<<<... as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next as Next>::Next>` to implement `Next`
--> $DIR/issue-23122-2.rs:10:15 --> $DIR/issue-23122-2.rs:11:15
| |
LL | impl<T: Next> Next for GetNext<T> { LL | impl<T: Next> Next for GetNext<T> {
| - ^^^^ ^^^^^^^^^^ | - ^^^^ ^^^^^^^^^^

View file

@ -1,4 +1,5 @@
// build-fail // build-fail
// compile-flags: -Zwrite-long-types-to-disk=yes
// normalize-stderr-test: ".nll/" -> "/" // normalize-stderr-test: ".nll/" -> "/"
// ignore-compare-mode-next-solver (hangs) // ignore-compare-mode-next-solver (hangs)

View file

@ -1,11 +1,11 @@
error: reached the recursion limit while instantiating `<(&(&(..., ...), ...), ...) as Foo>::recurse` error: reached the recursion limit while instantiating `<(&(&(..., ...), ...), ...) as Foo>::recurse`
--> $DIR/issue-37311.rs:18:9 --> $DIR/issue-37311.rs:19:9
| |
LL | (self, self).recurse(); LL | (self, self).recurse();
| ^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^
| |
note: `<T as Foo>::recurse` defined here note: `<T as Foo>::recurse` defined here
--> $DIR/issue-37311.rs:17:5 --> $DIR/issue-37311.rs:18:5
| |
LL | fn recurse(&self) { LL | fn recurse(&self) {
| ^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^

View file

@ -1,3 +1,4 @@
// compile-flags: -Zwrite-long-types-to-disk=yes
// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" // normalize-stderr-test: "long-type-\d+" -> "long-type-hash"
// Fixes #110131 // Fixes #110131

View file

@ -1,5 +1,5 @@
error[E0277]: `Helper<'a, T>` is not an iterator error[E0277]: `Helper<'a, T>` is not an iterator
--> $DIR/inherent-bound-in-probe.rs:40:21 --> $DIR/inherent-bound-in-probe.rs:41:21
| |
LL | type IntoIter = Helper<'a, T>; LL | type IntoIter = Helper<'a, T>;
| ^^^^^^^^^^^^^ `Helper<'a, T>` is not an iterator | ^^^^^^^^^^^^^ `Helper<'a, T>` is not an iterator
@ -9,14 +9,14 @@ note: required by a bound in `std::iter::IntoIterator::IntoIter`
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
error[E0275]: overflow evaluating the requirement `&_: IntoIterator` error[E0275]: overflow evaluating the requirement `&_: IntoIterator`
--> $DIR/inherent-bound-in-probe.rs:44:17 --> $DIR/inherent-bound-in-probe.rs:45:17
| |
LL | Helper::new(&self.0) LL | Helper::new(&self.0)
| ^^^ | ^^^
| |
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`inherent_bound_in_probe`) = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`inherent_bound_in_probe`)
note: required for `&BitReaderWrapper<_>` to implement `IntoIterator` note: required for `&BitReaderWrapper<_>` to implement `IntoIterator`
--> $DIR/inherent-bound-in-probe.rs:34:13 --> $DIR/inherent-bound-in-probe.rs:35:13
| |
LL | impl<'a, T> IntoIterator for &'a BitReaderWrapper<T> LL | impl<'a, T> IntoIterator for &'a BitReaderWrapper<T>
| ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^
@ -27,7 +27,7 @@ LL | &'a T: IntoIterator<Item = &'a u8>,
= note: required for `&BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<...>>>>>` to implement `IntoIterator` = note: required for `&BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<BitReaderWrapper<...>>>>>` to implement `IntoIterator`
= note: the full type name has been written to '$TEST_BUILD_DIR/methods/inherent-bound-in-probe/inherent-bound-in-probe.long-type-hash.txt' = note: the full type name has been written to '$TEST_BUILD_DIR/methods/inherent-bound-in-probe/inherent-bound-in-probe.long-type-hash.txt'
note: required by a bound in `Helper<'a, T>` note: required by a bound in `Helper<'a, T>`
--> $DIR/inherent-bound-in-probe.rs:25:25 --> $DIR/inherent-bound-in-probe.rs:26:25
| |
LL | &'a T: IntoIterator<Item = &'a u8>, LL | &'a T: IntoIterator<Item = &'a u8>,
| ^^^^^^^^^^^^^ required by this bound in `Helper<'a, T>` | ^^^^^^^^^^^^^ required by this bound in `Helper<'a, T>`

View file

@ -1,5 +1,5 @@
// build-fail // build-fail
// compile-flags: -Copt-level=0 // compile-flags: -Copt-level=0 -Zwrite-long-types-to-disk=yes
// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" // normalize-stderr-test: "long-type-\d+" -> "long-type-hash"
//~^^^ ERROR overflow evaluating the requirement //~^^^ ERROR overflow evaluating the requirement
// ignore-compare-mode-next-solver (hangs) // ignore-compare-mode-next-solver (hangs)

View file

@ -1,3 +1,4 @@
// compile-flags: -Zwrite-long-types-to-disk=yes
// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" // normalize-stderr-test: "long-type-\d+" -> "long-type-hash"
use std::cell::Cell; use std::cell::Cell;

View file

@ -1,5 +1,5 @@
error[E0308]: mismatched types error[E0308]: mismatched types
--> $DIR/issue-102374.rs:17:5 --> $DIR/issue-102374.rs:18:5
| |
LL | ) -> i32 { LL | ) -> i32 {
| --- expected `i32` because of return type | --- expected `i32` because of return type

View file

@ -1,5 +1,5 @@
// build-fail // build-fail
// compile-flags: -Zinline-mir=no // compile-flags: -Zinline-mir=no -Zwrite-long-types-to-disk=yes
// error-pattern: overflow evaluating the requirement `<std::iter::Empty<()> as Iterator>::Item == ()` // error-pattern: overflow evaluating the requirement `<std::iter::Empty<()> as Iterator>::Item == ()`
// error-pattern: function cannot return without recursing // error-pattern: function cannot return without recursing
// normalize-stderr-test: "long-type-\d+" -> "long-type-hash" // normalize-stderr-test: "long-type-\d+" -> "long-type-hash"