Skip to content

Commit 1a0c502

Browse files
committed
On long E0277 primary span label, move it to a help
Long span labels don't read well.
1 parent 092ecca commit 1a0c502

15 files changed

+93
-78
lines changed

compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs

+5
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,11 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
328328
}
329329
} else if let Some(custom_explanation) = safe_transmute_explanation {
330330
err.span_label(span, custom_explanation);
331+
} else if explanation.len() > self.tcx.sess.diagnostic_width() {
332+
// Really long types don't look good as span labels, instead move it
333+
// to a `help`.
334+
err.span_label(span, "unsatisfied trait bound");
335+
err.help(explanation);
331336
} else {
332337
err.span_label(span, explanation);
333338
}

tests/ui/async-await/async-closures/not-clone-closure.stderr

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ error[E0277]: the trait bound `NotClonableUpvar: Clone` is not satisfied in `{as
22
--> $DIR/not-clone-closure.rs:32:15
33
|
44
LL | not_clone.clone();
5-
| ^^^^^ within `{async closure@$DIR/not-clone-closure.rs:29:21: 29:34}`, the trait `Clone` is not implemented for `NotClonableUpvar`
5+
| ^^^^^ unsatisfied trait bound
66
|
7+
= help: within `{async closure@$DIR/not-clone-closure.rs:29:21: 29:34}`, the trait `Clone` is not implemented for `NotClonableUpvar`
78
note: required because it's used within this closure
89
--> $DIR/not-clone-closure.rs:29:21
910
|

tests/ui/async-await/coroutine-not-future.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//@ edition:2018
2+
//@compile-flags: --diagnostic-width=300
23
#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]
34

45
use std::future::Future;

tests/ui/async-await/coroutine-not-future.stderr

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
11
error[E0277]: the trait bound `impl Future<Output = ()>: Coroutine<_>` is not satisfied
2-
--> $DIR/coroutine-not-future.rs:35:21
2+
--> $DIR/coroutine-not-future.rs:36:21
33
|
44
LL | takes_coroutine(async_fn());
55
| --------------- ^^^^^^^^^^ the trait `Coroutine<_>` is not implemented for `impl Future<Output = ()>`
66
| |
77
| required by a bound introduced by this call
88
|
99
note: required by a bound in `takes_coroutine`
10-
--> $DIR/coroutine-not-future.rs:19:39
10+
--> $DIR/coroutine-not-future.rs:20:39
1111
|
1212
LL | fn takes_coroutine<ResumeTy>(_g: impl Coroutine<ResumeTy, Yield = (), Return = ()>) {}
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_coroutine`
1414

1515
error[E0277]: the trait bound `impl Future<Output = ()>: Coroutine<_>` is not satisfied
16-
--> $DIR/coroutine-not-future.rs:37:21
16+
--> $DIR/coroutine-not-future.rs:38:21
1717
|
1818
LL | takes_coroutine(returns_async_block());
1919
| --------------- ^^^^^^^^^^^^^^^^^^^^^ the trait `Coroutine<_>` is not implemented for `impl Future<Output = ()>`
2020
| |
2121
| required by a bound introduced by this call
2222
|
2323
note: required by a bound in `takes_coroutine`
24-
--> $DIR/coroutine-not-future.rs:19:39
24+
--> $DIR/coroutine-not-future.rs:20:39
2525
|
2626
LL | fn takes_coroutine<ResumeTy>(_g: impl Coroutine<ResumeTy, Yield = (), Return = ()>) {}
2727
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_coroutine`
2828

29-
error[E0277]: the trait bound `{async block@$DIR/coroutine-not-future.rs:39:21: 39:26}: Coroutine<_>` is not satisfied
30-
--> $DIR/coroutine-not-future.rs:39:21
29+
error[E0277]: the trait bound `{async block@$DIR/coroutine-not-future.rs:40:21: 40:26}: Coroutine<_>` is not satisfied
30+
--> $DIR/coroutine-not-future.rs:40:21
3131
|
3232
LL | takes_coroutine(async {});
33-
| --------------- ^^^^^^^^ the trait `Coroutine<_>` is not implemented for `{async block@$DIR/coroutine-not-future.rs:39:21: 39:26}`
33+
| --------------- ^^^^^^^^ the trait `Coroutine<_>` is not implemented for `{async block@$DIR/coroutine-not-future.rs:40:21: 40:26}`
3434
| |
3535
| required by a bound introduced by this call
3636
|
3737
note: required by a bound in `takes_coroutine`
38-
--> $DIR/coroutine-not-future.rs:19:39
38+
--> $DIR/coroutine-not-future.rs:20:39
3939
|
4040
LL | fn takes_coroutine<ResumeTy>(_g: impl Coroutine<ResumeTy, Yield = (), Return = ()>) {}
4141
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_coroutine`
4242

4343
error[E0277]: `impl Coroutine<Yield = (), Return = ()>` is not a future
44-
--> $DIR/coroutine-not-future.rs:43:18
44+
--> $DIR/coroutine-not-future.rs:44:18
4545
|
4646
LL | takes_future(returns_coroutine());
4747
| ------------ ^^^^^^^^^^^^^^^^^^^ `impl Coroutine<Yield = (), Return = ()>` is not a future
@@ -50,13 +50,13 @@ LL | takes_future(returns_coroutine());
5050
|
5151
= help: the trait `Future` is not implemented for `impl Coroutine<Yield = (), Return = ()>`
5252
note: required by a bound in `takes_future`
53-
--> $DIR/coroutine-not-future.rs:18:26
53+
--> $DIR/coroutine-not-future.rs:19:26
5454
|
5555
LL | fn takes_future(_f: impl Future<Output = ()>) {}
5656
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_future`
5757

58-
error[E0277]: `{coroutine@$DIR/coroutine-not-future.rs:47:9: 47:14}` is not a future
59-
--> $DIR/coroutine-not-future.rs:47:9
58+
error[E0277]: `{coroutine@$DIR/coroutine-not-future.rs:48:9: 48:14}` is not a future
59+
--> $DIR/coroutine-not-future.rs:48:9
6060
|
6161
LL | takes_future(
6262
| ------------ required by a bound introduced by this call
@@ -65,11 +65,11 @@ LL | / |ctx| {
6565
LL | |
6666
LL | | ctx = yield ();
6767
LL | | },
68-
| |_________^ `{coroutine@$DIR/coroutine-not-future.rs:47:9: 47:14}` is not a future
68+
| |_________^ `{coroutine@$DIR/coroutine-not-future.rs:48:9: 48:14}` is not a future
6969
|
70-
= help: the trait `Future` is not implemented for `{coroutine@$DIR/coroutine-not-future.rs:47:9: 47:14}`
70+
= help: the trait `Future` is not implemented for `{coroutine@$DIR/coroutine-not-future.rs:48:9: 48:14}`
7171
note: required by a bound in `takes_future`
72-
--> $DIR/coroutine-not-future.rs:18:26
72+
--> $DIR/coroutine-not-future.rs:19:26
7373
|
7474
LL | fn takes_future(_f: impl Future<Output = ()>) {}
7575
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_future`

tests/ui/const-generics/adt_const_params/const_param_ty_bad.stderr

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ error[E0277]: `{closure@$DIR/const_param_ty_bad.rs:8:11: 8:13}` can't be used as
2020
--> $DIR/const_param_ty_bad.rs:8:11
2121
|
2222
LL | check(|| {});
23-
| ----- ^^^^^ the trait `UnsizedConstParamTy` is not implemented for closure `{closure@$DIR/const_param_ty_bad.rs:8:11: 8:13}`
23+
| ----- ^^^^^ unsatisfied trait bound
2424
| |
2525
| required by a bound introduced by this call
2626
|
27+
= help: the trait `UnsizedConstParamTy` is not implemented for closure `{closure@$DIR/const_param_ty_bad.rs:8:11: 8:13}`
2728
note: required by a bound in `check`
2829
--> $DIR/const_param_ty_bad.rs:4:18
2930
|

tests/ui/coroutine/clone-impl.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// gate-test-coroutine_clone
22
// Verifies that non-static coroutines can be cloned/copied if all their upvars and locals held
33
// across awaits can be cloned/copied.
4+
//@compile-flags: --diagnostic-width=300
45

56
#![feature(coroutines, coroutine_clone, stmt_expr_attributes)]
67

tests/ui/coroutine/clone-impl.stderr

+36-36
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,104 @@
1-
error[E0277]: the trait bound `Vec<u32>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:43:5: 43:12}`
2-
--> $DIR/clone-impl.rs:49:5
1+
error[E0277]: the trait bound `Vec<u32>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:44:5: 44:12}`
2+
--> $DIR/clone-impl.rs:50:5
33
|
44
LL | move || {
5-
| ------- within this `{coroutine@$DIR/clone-impl.rs:43:5: 43:12}`
5+
| ------- within this `{coroutine@$DIR/clone-impl.rs:44:5: 44:12}`
66
...
77
LL | check_copy(&gen_clone_0);
8-
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:43:5: 43:12}`, the trait `Copy` is not implemented for `Vec<u32>`
8+
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:44:5: 44:12}`, the trait `Copy` is not implemented for `Vec<u32>`
99
|
1010
note: captured value does not implement `Copy`
11-
--> $DIR/clone-impl.rs:47:14
11+
--> $DIR/clone-impl.rs:48:14
1212
|
1313
LL | drop(clonable_0);
1414
| ^^^^^^^^^^ has type `Vec<u32>` which does not implement `Copy`
1515
note: required by a bound in `check_copy`
16-
--> $DIR/clone-impl.rs:89:18
16+
--> $DIR/clone-impl.rs:90:18
1717
|
1818
LL | fn check_copy<T: Copy>(_x: &T) {}
1919
| ^^^^ required by this bound in `check_copy`
2020

21-
error[E0277]: the trait bound `Vec<char>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:43:5: 43:12}`
22-
--> $DIR/clone-impl.rs:49:5
21+
error[E0277]: the trait bound `Vec<char>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:44:5: 44:12}`
22+
--> $DIR/clone-impl.rs:50:5
2323
|
2424
LL | move || {
25-
| ------- within this `{coroutine@$DIR/clone-impl.rs:43:5: 43:12}`
25+
| ------- within this `{coroutine@$DIR/clone-impl.rs:44:5: 44:12}`
2626
...
2727
LL | check_copy(&gen_clone_0);
28-
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:43:5: 43:12}`, the trait `Copy` is not implemented for `Vec<char>`
28+
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:44:5: 44:12}`, the trait `Copy` is not implemented for `Vec<char>`
2929
|
3030
note: coroutine does not implement `Copy` as this value is used across a yield
31-
--> $DIR/clone-impl.rs:45:9
31+
--> $DIR/clone-impl.rs:46:9
3232
|
3333
LL | let v = vec!['a'];
3434
| - has type `Vec<char>` which does not implement `Copy`
3535
LL | yield;
3636
| ^^^^^ yield occurs here, with `v` maybe used later
3737
note: required by a bound in `check_copy`
38-
--> $DIR/clone-impl.rs:89:18
38+
--> $DIR/clone-impl.rs:90:18
3939
|
4040
LL | fn check_copy<T: Copy>(_x: &T) {}
4141
| ^^^^ required by this bound in `check_copy`
4242

43-
error[E0277]: the trait bound `Vec<u32>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:58:5: 58:12}`
44-
--> $DIR/clone-impl.rs:70:5
43+
error[E0277]: the trait bound `Vec<u32>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:59:5: 59:12}`
44+
--> $DIR/clone-impl.rs:71:5
4545
|
4646
LL | move || {
47-
| ------- within this `{coroutine@$DIR/clone-impl.rs:58:5: 58:12}`
47+
| ------- within this `{coroutine@$DIR/clone-impl.rs:59:5: 59:12}`
4848
...
4949
LL | check_copy(&gen_clone_1);
50-
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:58:5: 58:12}`, the trait `Copy` is not implemented for `Vec<u32>`
50+
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:59:5: 59:12}`, the trait `Copy` is not implemented for `Vec<u32>`
5151
|
5252
note: captured value does not implement `Copy`
53-
--> $DIR/clone-impl.rs:68:14
53+
--> $DIR/clone-impl.rs:69:14
5454
|
5555
LL | drop(clonable_1);
5656
| ^^^^^^^^^^ has type `Vec<u32>` which does not implement `Copy`
5757
note: required by a bound in `check_copy`
58-
--> $DIR/clone-impl.rs:89:18
58+
--> $DIR/clone-impl.rs:90:18
5959
|
6060
LL | fn check_copy<T: Copy>(_x: &T) {}
6161
| ^^^^ required by this bound in `check_copy`
6262

63-
error[E0277]: the trait bound `Vec<char>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:58:5: 58:12}`
64-
--> $DIR/clone-impl.rs:70:5
63+
error[E0277]: the trait bound `Vec<char>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:59:5: 59:12}`
64+
--> $DIR/clone-impl.rs:71:5
6565
|
6666
LL | move || {
67-
| ------- within this `{coroutine@$DIR/clone-impl.rs:58:5: 58:12}`
67+
| ------- within this `{coroutine@$DIR/clone-impl.rs:59:5: 59:12}`
6868
...
6969
LL | check_copy(&gen_clone_1);
70-
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:58:5: 58:12}`, the trait `Copy` is not implemented for `Vec<char>`
70+
| ^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:59:5: 59:12}`, the trait `Copy` is not implemented for `Vec<char>`
7171
|
7272
note: coroutine does not implement `Copy` as this value is used across a yield
73-
--> $DIR/clone-impl.rs:64:9
73+
--> $DIR/clone-impl.rs:65:9
7474
|
7575
LL | let v = vec!['a'];
7676
| - has type `Vec<char>` which does not implement `Copy`
7777
...
7878
LL | yield;
7979
| ^^^^^ yield occurs here, with `v` maybe used later
8080
note: required by a bound in `check_copy`
81-
--> $DIR/clone-impl.rs:89:18
81+
--> $DIR/clone-impl.rs:90:18
8282
|
8383
LL | fn check_copy<T: Copy>(_x: &T) {}
8484
| ^^^^ required by this bound in `check_copy`
8585

86-
error[E0277]: the trait bound `NonClone: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:79:5: 79:12}`
87-
--> $DIR/clone-impl.rs:83:5
86+
error[E0277]: the trait bound `NonClone: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:80:5: 80:12}`
87+
--> $DIR/clone-impl.rs:84:5
8888
|
8989
LL | move || {
90-
| ------- within this `{coroutine@$DIR/clone-impl.rs:79:5: 79:12}`
90+
| ------- within this `{coroutine@$DIR/clone-impl.rs:80:5: 80:12}`
9191
...
9292
LL | check_copy(&gen_non_clone);
93-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:79:5: 79:12}`, the trait `Copy` is not implemented for `NonClone`
93+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:80:5: 80:12}`, the trait `Copy` is not implemented for `NonClone`
9494
|
9595
note: captured value does not implement `Copy`
96-
--> $DIR/clone-impl.rs:81:14
96+
--> $DIR/clone-impl.rs:82:14
9797
|
9898
LL | drop(non_clonable);
9999
| ^^^^^^^^^^^^ has type `NonClone` which does not implement `Copy`
100100
note: required by a bound in `check_copy`
101-
--> $DIR/clone-impl.rs:89:18
101+
--> $DIR/clone-impl.rs:90:18
102102
|
103103
LL | fn check_copy<T: Copy>(_x: &T) {}
104104
| ^^^^ required by this bound in `check_copy`
@@ -108,22 +108,22 @@ LL + #[derive(Copy)]
108108
LL | struct NonClone;
109109
|
110110

111-
error[E0277]: the trait bound `NonClone: Clone` is not satisfied in `{coroutine@$DIR/clone-impl.rs:79:5: 79:12}`
112-
--> $DIR/clone-impl.rs:85:5
111+
error[E0277]: the trait bound `NonClone: Clone` is not satisfied in `{coroutine@$DIR/clone-impl.rs:80:5: 80:12}`
112+
--> $DIR/clone-impl.rs:86:5
113113
|
114114
LL | move || {
115-
| ------- within this `{coroutine@$DIR/clone-impl.rs:79:5: 79:12}`
115+
| ------- within this `{coroutine@$DIR/clone-impl.rs:80:5: 80:12}`
116116
...
117117
LL | check_clone(&gen_non_clone);
118-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:79:5: 79:12}`, the trait `Clone` is not implemented for `NonClone`
118+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:80:5: 80:12}`, the trait `Clone` is not implemented for `NonClone`
119119
|
120120
note: captured value does not implement `Clone`
121-
--> $DIR/clone-impl.rs:81:14
121+
--> $DIR/clone-impl.rs:82:14
122122
|
123123
LL | drop(non_clonable);
124124
| ^^^^^^^^^^^^ has type `NonClone` which does not implement `Clone`
125125
note: required by a bound in `check_clone`
126-
--> $DIR/clone-impl.rs:90:19
126+
--> $DIR/clone-impl.rs:91:19
127127
|
128128
LL | fn check_clone<T: Clone>(_x: &T) {}
129129
| ^^^^^ required by this bound in `check_clone`

tests/ui/coroutine/issue-105084.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@compile-flags: --diagnostic-width=300
12
#![feature(coroutines)]
23
#![feature(coroutine_clone)]
34
#![feature(coroutine_trait)]

tests/ui/coroutine/issue-105084.stderr

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error[E0382]: borrow of moved value: `g`
2-
--> $DIR/issue-105084.rs:38:14
2+
--> $DIR/issue-105084.rs:39:14
33
|
44
LL | let mut g = #[coroutine]
5-
| ----- move occurs because `g` has type `{coroutine@$DIR/issue-105084.rs:15:5: 15:7}`, which does not implement the `Copy` trait
5+
| ----- move occurs because `g` has type `{coroutine@$DIR/issue-105084.rs:16:5: 16:7}`, which does not implement the `Copy` trait
66
...
77
LL | let mut h = copy(g);
88
| - value moved here
@@ -11,7 +11,7 @@ LL | Pin::new(&mut g).resume(());
1111
| ^^^^^^ value borrowed here after move
1212
|
1313
note: consider changing this parameter type in function `copy` to borrow instead if owning the value isn't necessary
14-
--> $DIR/issue-105084.rs:9:21
14+
--> $DIR/issue-105084.rs:10:21
1515
|
1616
LL | fn copy<T: Copy>(x: T) -> T {
1717
| ---- ^ this parameter takes ownership of the value
@@ -22,25 +22,25 @@ help: consider cloning the value if the performance cost is acceptable
2222
LL | let mut h = copy(g.clone());
2323
| ++++++++
2424

25-
error[E0277]: the trait bound `Box<(i32, ())>: Copy` is not satisfied in `{coroutine@$DIR/issue-105084.rs:15:5: 15:7}`
26-
--> $DIR/issue-105084.rs:32:17
25+
error[E0277]: the trait bound `Box<(i32, ())>: Copy` is not satisfied in `{coroutine@$DIR/issue-105084.rs:16:5: 16:7}`
26+
--> $DIR/issue-105084.rs:33:17
2727
|
2828
LL | || {
29-
| -- within this `{coroutine@$DIR/issue-105084.rs:15:5: 15:7}`
29+
| -- within this `{coroutine@$DIR/issue-105084.rs:16:5: 16:7}`
3030
...
3131
LL | let mut h = copy(g);
32-
| ^^^^^^^ within `{coroutine@$DIR/issue-105084.rs:15:5: 15:7}`, the trait `Copy` is not implemented for `Box<(i32, ())>`
32+
| ^^^^^^^ within `{coroutine@$DIR/issue-105084.rs:16:5: 16:7}`, the trait `Copy` is not implemented for `Box<(i32, ())>`
3333
|
3434
note: coroutine does not implement `Copy` as this value is used across a yield
35-
--> $DIR/issue-105084.rs:22:22
35+
--> $DIR/issue-105084.rs:23:22
3636
|
3737
LL | Box::new((5, yield));
3838
| -------------^^^^^--
3939
| | |
4040
| | yield occurs here, with `Box::new((5, yield))` maybe used later
4141
| has type `Box<(i32, ())>` which does not implement `Copy`
4242
note: required by a bound in `copy`
43-
--> $DIR/issue-105084.rs:9:12
43+
--> $DIR/issue-105084.rs:10:12
4444
|
4545
LL | fn copy<T: Copy>(x: T) -> T {
4646
| ^^^^ required by this bound in `copy`

tests/ui/suggestions/fn-ctor-passed-as-arg-where-it-should-have-been-called.stderr

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ error[E0277]: the trait bound `{closure@$DIR/fn-ctor-passed-as-arg-where-it-shou
2020
--> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:19:9
2121
|
2222
LL | bar(closure);
23-
| --- ^^^^^^^ the trait `T` is not implemented for closure `{closure@$DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:18:19: 18:21}`
23+
| --- ^^^^^^^ unsatisfied trait bound
2424
| |
2525
| required by a bound introduced by this call
2626
|
27+
= help: the trait `T` is not implemented for closure `{closure@$DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:18:19: 18:21}`
2728
note: required by a bound in `bar`
2829
--> $DIR/fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:14:16
2930
|

tests/ui/suggestions/issue-84973-blacklist.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Checks that certain traits for which we don't want to suggest borrowing
22
// are blacklisted and don't cause the suggestion to be issued.
3+
//@compile-flags: --diagnostic-width=300
34

45
#![feature(coroutines)]
56

0 commit comments

Comments
 (0)