Skip to content

libsyntax: Don't strip types and lifetimes from single-segment paths in#16454

Closed
pcwalton wants to merge 1 commit intorust-lang:masterfrom
pcwalton:types-in-path-patterns
Closed

libsyntax: Don't strip types and lifetimes from single-segment paths in#16454
pcwalton wants to merge 1 commit intorust-lang:masterfrom
pcwalton:types-in-path-patterns

Conversation

@pcwalton
Copy link
Contributor

patterns.

This breaks code like:

fn main() {
    match Some("foo") {
        None::<int> => {}
        Some(_) => {}
    }
}

Change this code to not contain a type error. For example:

fn main() {
    match Some("foo") {
        None::<&str> => {}
        Some(_) => {}
    }
}

Closes #16353.

[breaking-change]

r? @huonw

patterns.

This breaks code like:

    fn main() {
        match Some("foo") {
            None::<int> => {}
            Some(_) => {}
        }
    }

Change this code to not contain a type error. For example:

    fn main() {
        match Some("foo") {
            None::<&str> => {}
            Some(_) => {}
        }
    }

Closes rust-lang#16353.

[breaking-change]
bors added a commit that referenced this pull request Aug 12, 2014
patterns.

This breaks code like:

    fn main() {
        match Some("foo") {
            None::<int> => {}
            Some(_) => {}
        }
    }

Change this code to not contain a type error. For example:

    fn main() {
        match Some("foo") {
            None::<&str> => {}
            Some(_) => {}
        }
    }

Closes #16353.

[breaking-change]

r? @huonw
@bors bors closed this Aug 12, 2014
matthiaskrgr pushed a commit to matthiaskrgr/rust that referenced this pull request Feb 11, 2024
feat: Add break and return postfix keyword completions
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 12, 2026
Closes rust-lang/rust-clippy#16447

changelog: [`test_attr_in_doctest`] fix FP on `test_harness`
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

Successfully merging this pull request may close these issues.

Generic parameters in some paths in patterns are ignored

3 participants