-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #60922 - pietroalbini:beta-rollup, r=pietroalbini
[beta] Rollup backports Rolled up: * [beta] save-analysis: Pull associated type definition using `qpath_def` #60881 * [beta] Update clippy #60918 Cherry-picked: * Instead of ICEing on incorrect pattern, use delay_span_bug #60641 * Use `delay_span_bug` for "Failed to unify obligation" #60644 r? @ghost
- Loading branch information
Showing
9 changed files
with
103 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
struct A {} | ||
|
||
impl A { | ||
fn new() {} | ||
} | ||
|
||
fn hof<F>(_: F) where F: FnMut(()) {} | ||
|
||
fn ice() { | ||
hof(|c| match c { | ||
A::new() => (), //~ ERROR expected tuple struct/variant, found method | ||
_ => () | ||
}) | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
error[E0164]: expected tuple struct/variant, found method `<A>::new` | ||
--> $DIR/fn-in-pat.rs:11:9 | ||
| | ||
LL | A::new() => (), | ||
| ^^^^^^^^ not a tuple variant or struct | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0164`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
pub trait Trait<'a> { | ||
type Item; | ||
} | ||
|
||
impl<'a> Trait<'a> for () { | ||
type Item = (); | ||
} | ||
|
||
pub fn foo<T, F>(_: T, _: F) | ||
where T: for<'a> Trait<'a>, | ||
F: for<'a> FnMut(<T as Trait<'a>>::Item) {} | ||
|
||
fn main() { | ||
foo((), drop) | ||
//~^ ERROR type mismatch in function arguments | ||
//~| ERROR type mismatch resolving | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
error[E0631]: type mismatch in function arguments | ||
--> $DIR/issue-60283.rs:14:5 | ||
| | ||
LL | foo((), drop) | ||
| ^^^ | ||
| | | ||
| expected signature of `for<'a> fn(<() as Trait<'a>>::Item) -> _` | ||
| found signature of `fn(_) -> _` | ||
| | ||
note: required by `foo` | ||
--> $DIR/issue-60283.rs:9:1 | ||
| | ||
LL | / pub fn foo<T, F>(_: T, _: F) | ||
LL | | where T: for<'a> Trait<'a>, | ||
LL | | F: for<'a> FnMut(<T as Trait<'a>>::Item) {} | ||
| |_________________________________________________^ | ||
|
||
error[E0271]: type mismatch resolving `for<'a> <fn(_) {std::mem::drop::<_>} as std::ops::FnOnce<(<() as Trait<'a>>::Item,)>>::Output == ()` | ||
--> $DIR/issue-60283.rs:14:5 | ||
| | ||
LL | foo((), drop) | ||
| ^^^ expected bound lifetime parameter 'a, found concrete lifetime | ||
| | ||
note: required by `foo` | ||
--> $DIR/issue-60283.rs:9:1 | ||
| | ||
LL | / pub fn foo<T, F>(_: T, _: F) | ||
LL | | where T: for<'a> Trait<'a>, | ||
LL | | F: for<'a> FnMut(<T as Trait<'a>>::Item) {} | ||
| |_________________________________________________^ | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
Some errors occurred: E0271, E0631. | ||
For more information about an error, try `rustc --explain E0271`. |
Submodule clippy
updated
from 37f5c1 to 265318