Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 4 pull requests #63401

Closed
wants to merge 21 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
777e2dd
Update LLVM submodule
nikic Aug 5, 2019
ad7fdb6
Improve `ptr_rotate` performance, tests, and benchmarks
AaronKutch Aug 6, 2019
9cb664c
Tweak mismatched types error on break expressions
estebank Aug 6, 2019
20cdd65
Do not suggest using ! with break
estebank Aug 7, 2019
ae8d3db
Be more accurate when mentioning type of found match arms
estebank Aug 7, 2019
1bd05ef
Change wording for function without return value
estebank Aug 7, 2019
dad230b
Suggest calling function on type error when finding bare fn
estebank Aug 7, 2019
422beb3
When suggesting fn call use an appropriate number of placeholder argu…
estebank Aug 8, 2019
a547fba
Recover parser from `foo(_, _)`
estebank Aug 8, 2019
5dfaacb
review comments
estebank Aug 8, 2019
cd0f785
Tweak wording of fn without explicit return
estebank Aug 8, 2019
34cefbe
Differentiate between tuple structs and tuple variants
estebank Aug 8, 2019
642ee70
Add test for issue-43623
JohnTitor Aug 8, 2019
55f15d7
Add test for issue-44405
JohnTitor Aug 8, 2019
d1dcd1d
Extend suggestion support for traits and foreign items
estebank Aug 8, 2019
8756311
review comment: review wording or missing return error
estebank Aug 8, 2019
68aff3f
review comments: typo and rewording
estebank Aug 8, 2019
9241cd5
Rollup merge of #61937 - AaronKutch:master, r=scottmcm
Centril Aug 9, 2019
7103d29
Rollup merge of #63302 - nikic:bump-llvm, r=alexcrichton
Centril Aug 9, 2019
b91c46b
Rollup merge of #63337 - estebank:break-ee0308, r=Centril
Centril Aug 9, 2019
71648fb
Rollup merge of #63397 - JohnTitor:add-tests-for-ices, r=Centril
Centril Aug 9, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/test/ui/issues/issue-43623.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
pub trait Trait<'a> {
type Assoc;
}

pub struct Type;

impl<'a> Trait<'a> for Type {
type Assoc = ();
}

pub fn break_me<T, F>(f: F)
where T: for<'b> Trait<'b>,
F: for<'b> FnMut(<T as Trait<'b>>::Assoc) {
break_me::<Type, fn(_)>;
//~^ ERROR: type mismatch in function arguments
//~| ERROR: type mismatch resolving
}

fn main() {}
42 changes: 42 additions & 0 deletions src/test/ui/issues/issue-43623.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
error[E0631]: type mismatch in function arguments
--> $DIR/issue-43623.rs:14:5
|
LL | break_me::<Type, fn(_)>;
| ^^^^^^^^^^^^^^^^^^^^^^^
| |
| expected signature of `for<'b> fn(<Type as Trait<'b>>::Assoc) -> _`
| found signature of `fn(_) -> _`
|
note: required by `break_me`
--> $DIR/issue-43623.rs:11:1
|
LL | / pub fn break_me<T, F>(f: F)
LL | | where T: for<'b> Trait<'b>,
LL | | F: for<'b> FnMut(<T as Trait<'b>>::Assoc) {
LL | | break_me::<Type, fn(_)>;
LL | |
LL | |
LL | | }
| |_^

error[E0271]: type mismatch resolving `for<'b> <fn(_) as std::ops::FnOnce<(<Type as Trait<'b>>::Assoc,)>>::Output == ()`
--> $DIR/issue-43623.rs:14:5
|
LL | break_me::<Type, fn(_)>;
| ^^^^^^^^^^^^^^^^^^^^^^^ expected bound lifetime parameter 'b, found concrete lifetime
|
note: required by `break_me`
--> $DIR/issue-43623.rs:11:1
|
LL | / pub fn break_me<T, F>(f: F)
LL | | where T: for<'b> Trait<'b>,
LL | | F: for<'b> FnMut(<T as Trait<'b>>::Assoc) {
LL | | break_me::<Type, fn(_)>;
LL | |
LL | |
LL | | }
| |_^

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0271`.