Skip to content

Commit

Permalink
Unrolled build for rust-lang#135294
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#135294 - ChrisDenton:bare-fn-width, r=jieyouxu

Make `bare-fn-no-impl-fn-ptr-99875` test less dependent on path width

This sets diagnostic-width to some arbitrary number. Seems to work on my machine.
  • Loading branch information
rust-timer authored Jan 10, 2025
2 parents 88ab2d8 + 00448ab commit 61d06d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions tests/ui/traits/fn-pointer/bare-fn-no-impl-fn-ptr-99875.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Sets some arbitrarily large width for more consistent output (see #135288).
//@ compile-flags: --diagnostic-width=120
struct Argument;
struct Return;

Expand Down
12 changes: 6 additions & 6 deletions tests/ui/traits/fn-pointer/bare-fn-no-impl-fn-ptr-99875.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error[E0277]: the trait bound `fn(Argument) -> Return {function}: Trait` is not satisfied
--> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:12:11
--> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:14:11
|
LL | takes(function);
| ----- ^^^^^^^^ the trait `Trait` is not implemented for fn item `fn(Argument) -> Return {function}`
| |
| required by a bound introduced by this call
|
note: required by a bound in `takes`
--> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:9:18
--> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:11:18
|
LL | fn takes(_: impl Trait) {}
| ^^^^^ required by this bound in `takes`
Expand All @@ -16,18 +16,18 @@ help: the trait `Trait` is implemented for fn pointer `fn(Argument) -> Return`,
LL | takes(function as fn(Argument) -> Return);
| +++++++++++++++++++++++++

error[E0277]: the trait bound `{closure@$DIR/bare-fn-no-impl-fn-ptr-99875.rs:14:11: 14:34}: Trait` is not satisfied
--> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:14:11
error[E0277]: the trait bound `{closure@$DIR/bare-fn-no-impl-fn-ptr-99875.rs:16:11: 16:34}: Trait` is not satisfied
--> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:16:11
|
LL | takes(|_: Argument| -> Return { todo!() });
| ----- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
| |
| required by a bound introduced by this call
|
= help: the trait `Trait` is not implemented for closure `{closure@$DIR/bare-fn-no-impl-fn-ptr-99875.rs:14:11: 14:34}`
= help: the trait `Trait` is not implemented for closure `{closure@$DIR/bare-fn-no-impl-fn-ptr-99875.rs:16:11: 16:34}`
= help: the trait `Trait` is implemented for fn pointer `fn(Argument) -> Return`
note: required by a bound in `takes`
--> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:9:18
--> $DIR/bare-fn-no-impl-fn-ptr-99875.rs:11:18
|
LL | fn takes(_: impl Trait) {}
| ^^^^^ required by this bound in `takes`
Expand Down

0 comments on commit 61d06d4

Please sign in to comment.