Skip to content

Commit 1f42999

Browse files
committed
Mark test to use short type paths
This test seems to have improper use of `TyCtxt::short_string`.
1 parent d7a8bfd commit 1f42999

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

tests/ui/methods/filter-relevant-fn-bounds.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// FIXME(estebank): diagnostics with long type paths that don't print out the full path anywhere
2+
// still prints the note explaining where the type was written to.
3+
//@ compile-flags: -Zwrite-long-types-to-disk=yes
14
trait Output<'a> {
25
type Type;
36
}

tests/ui/methods/filter-relevant-fn-bounds.stderr

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: the trait bound `for<'a> F: Output<'a>` is not satisfied
2-
--> $DIR/filter-relevant-fn-bounds.rs:8:5
2+
--> $DIR/filter-relevant-fn-bounds.rs:11:5
33
|
44
LL | / fn do_something_wrapper<O, F>(self, _: F)
55
LL | |
@@ -13,7 +13,7 @@ LL | F: for<'a> FnOnce(<F as Output<'a>>::Type) + for<'a> Output<'a>,
1313
| ++++++++++++++++++++
1414

1515
error[E0277]: the trait bound `for<'a> F: Output<'a>` is not satisfied
16-
--> $DIR/filter-relevant-fn-bounds.rs:11:12
16+
--> $DIR/filter-relevant-fn-bounds.rs:14:12
1717
|
1818
LL | F: for<'a> FnOnce(<F as Output<'a>>::Type),
1919
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> Output<'a>` is not implemented for `F`
@@ -24,7 +24,7 @@ LL | F: for<'a> FnOnce(<F as Output<'a>>::Type) + for<'a> Output<'a>,
2424
| ++++++++++++++++++++
2525

2626
error[E0277]: the trait bound `for<'a> F: Output<'a>` is not satisfied
27-
--> $DIR/filter-relevant-fn-bounds.rs:11:20
27+
--> $DIR/filter-relevant-fn-bounds.rs:14:20
2828
|
2929
LL | F: for<'a> FnOnce(<F as Output<'a>>::Type),
3030
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a> Output<'a>` is not implemented for `F`
@@ -34,28 +34,30 @@ help: consider further restricting type parameter `F` with trait `Output`
3434
LL | F: for<'a> FnOnce(<F as Output<'a>>::Type) + for<'a> Output<'a>,
3535
| ++++++++++++++++++++
3636

37-
error[E0277]: expected a `FnOnce(<{closure@$DIR/filter-relevant-fn-bounds.rs:20:34: 20:41} as Output<'a>>::Type)` closure, found `{closure@$DIR/filter-relevant-fn-bounds.rs:20:34: 20:41}`
38-
--> $DIR/filter-relevant-fn-bounds.rs:20:34
37+
error[E0277]: expected a `FnOnce(<{closure@$DIR/filter-relevant-fn-bounds.rs:23:34: 23:41} as Output<'a>>::Type)` closure, found `{closure@$DIR/filter-relevant-fn-bounds.rs:23:34: 23:41}`
38+
--> $DIR/filter-relevant-fn-bounds.rs:23:34
3939
|
4040
LL | wrapper.do_something_wrapper(|value| ());
41-
| -------------------- ^^^^^^^^^^ expected an `FnOnce(<{closure@$DIR/filter-relevant-fn-bounds.rs:20:34: 20:41} as Output<'a>>::Type)` closure, found `{closure@$DIR/filter-relevant-fn-bounds.rs:20:34: 20:41}`
41+
| -------------------- ^^^^^^^^^^ expected an `FnOnce(<{closure@$DIR/filter-relevant-fn-bounds.rs:23:34: 23:41} as Output<'a>>::Type)` closure, found `{closure@$DIR/filter-relevant-fn-bounds.rs:23:34: 23:41}`
4242
| |
4343
| required by a bound introduced by this call
4444
|
45-
= help: the trait `for<'a> Output<'a>` is not implemented for closure `{closure@$DIR/filter-relevant-fn-bounds.rs:20:34: 20:41}`
45+
= help: the trait `for<'a> Output<'a>` is not implemented for closure `{closure@$DIR/filter-relevant-fn-bounds.rs:23:34: 23:41}`
4646
help: this trait has no implementations, consider adding one
47-
--> $DIR/filter-relevant-fn-bounds.rs:1:1
47+
--> $DIR/filter-relevant-fn-bounds.rs:4:1
4848
|
4949
LL | trait Output<'a> {
5050
| ^^^^^^^^^^^^^^^^
5151
note: required by a bound in `Wrapper::do_something_wrapper`
52-
--> $DIR/filter-relevant-fn-bounds.rs:11:12
52+
--> $DIR/filter-relevant-fn-bounds.rs:14:12
5353
|
5454
LL | fn do_something_wrapper<O, F>(self, _: F)
5555
| -------------------- required by a bound in this associated function
5656
...
5757
LL | F: for<'a> FnOnce(<F as Output<'a>>::Type),
5858
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Wrapper::do_something_wrapper`
59+
= note: the full name for the type has been written to '$TEST_BUILD_DIR/filter-relevant-fn-bounds.long-type-$LONG_TYPE_HASH.txt'
60+
= note: consider using `--verbose` to print the full type name to the console
5961

6062
error: aborting due to 4 previous errors
6163

0 commit comments

Comments
 (0)