Skip to content

Commit 25ae75c

Browse files
authored
Rollup merge of #110476 - compiler-errors:ty-err-ctxt-good-path, r=lcnr
Delay a good path bug on drop for `TypeErrCtxt` (instead of a regular delayed bug) r? `@lcnr` Perhaps we should just delete the `Drop` impl altogether though? Fixes rust-lang#10645 `@matthiaskrgr:` I don't know how to make a clippy test for this. Any idea? Clippy's UI tests run with `-D warnings` and I have no idea how to switch it off to make a test that triggers this ICE in the clippy test suite 🤣
2 parents 4c6dd33 + 7f714be commit 25ae75c

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

tests/ui/crashes/ice-5207.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
// Regression test for https://github.com/rust-lang/rust-clippy/issues/5207
1+
// compile-flags: --cap-lints=warn
2+
// ^ for https://github.com/rust-lang/rust-clippy/issues/10645
23

4+
// Regression test for https://github.com/rust-lang/rust-clippy/issues/5207
5+
#![warn(clippy::future_not_send)]
36
pub async fn bar<'a, T: 'a>(_: T) {}
47

58
fn main() {}

tests/ui/crashes/ice-5207.stderr

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
warning: future cannot be sent between threads safely
2+
--> $DIR/ice-5207.rs:6:35
3+
|
4+
LL | pub async fn bar<'a, T: 'a>(_: T) {}
5+
| ^ future returned by `bar` is not `Send`
6+
|
7+
note: captured value is not `Send`
8+
--> $DIR/ice-5207.rs:6:29
9+
|
10+
LL | pub async fn bar<'a, T: 'a>(_: T) {}
11+
| ^ has type `T` which is not `Send`
12+
= note: `T` doesn't implement `std::marker::Send`
13+
= note: `-D clippy::future-not-send` implied by `-D warnings`
14+
15+
warning: 1 warning emitted
16+

0 commit comments

Comments
 (0)