Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented May 5, 2023

Issue: rust-lang/rust#100783

#!/bin/bash

rustc -Cdebuginfo=2 -Zsanitizer=cfi -Clto - <<'EOF'

// run-pass
trait Stream { type Item; }
impl<'a> Stream for &'a str { type Item = u8; }
fn f<'s>(s: &'s str) -> (&'s str, <&'s str as Stream>::Item) {
    (s, 42)
}

fn main() {
    let fx = f as for<'t> fn(&'t str) -> (&'t str, <&'t str as Stream>::Item);
    assert_eq!(fx("hi"), ("hi", 42));
}


EOF

=== stdout ===
=== stderr ===
==============

=== stdout ===
=== stderr ===
==============
@JohnTitor JohnTitor merged commit 08946f4 into master May 5, 2023
@JohnTitor JohnTitor deleted the autofix/ices/100783.sh branch May 5, 2023 03:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants