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

ReSkolemized can leak into error messages #26404

Closed
arielb1 opened this issue Jun 18, 2015 · 3 comments
Closed

ReSkolemized can leak into error messages #26404

arielb1 opened this issue Jun 18, 2015 · 3 comments

Comments

@arielb1
Copy link
Contributor

arielb1 commented Jun 18, 2015

STR

fn foo(f: for<'a,'b> fn(&'a ()) -> &'a &'b ()) {
    bar(f);
}

fn bar(f: for<'a,'b> fn(&'b ()) -> &'a &'b ()) {
}

fn main() {}

Actual Results

<anon>:2:9: 2:10 error: mismatched types:
 expected `fn(&'b ()) -> &'a &'b ()`,
    found `fn(&'a ()) -> &'a &'b ()`
(expected concrete lifetime,
    found bound lifetime parameter 'a) [E0308]
<anon>:2     bar(f);
                 ^
<anon>:2:9: 2:10 help: see the detailed explanation for E0308
note: expected concrete lifetime is lifetime ReInfer(ReSkolemized(0, BrNamed(DefId { krate: 0, node: 31 }, "\'b"(64))))
error: aborting due to previous error
playpen: application terminated with error code 101

Expected Results

No leak of rustc internals into error messages.

@Stebalien
Copy link
Contributor

Lines 172-174 of src/librustc/util/ppaux.rs. /cc @nikomatsakis

@jroesch
Copy link
Member

jroesch commented Jun 19, 2015

cc me

@ghost
Copy link

ghost commented Jun 20, 2015

Gonna close this as a dupe of #13998 if you don't mind.

@ghost ghost closed this as completed Jun 20, 2015
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants