This website requires JavaScript.
Explore
Help
Sign In
nordic-dev.net
/
rust
Watch
2
Star
0
Fork
0
You've already forked rust
mirror of
https://github.com/rust-lang/rust.git
synced
2025-05-01 12:37:37 +00:00
Code
Issues
Packages
Projects
Releases
Wiki
Activity
31ae7c46bd
rust
/
tests
/
ui
/
pattern
/
pattern-ident-path-generics.rs
7 lines
123 B
Rust
Raw
Normal View
History
Unescape
Escape
libsyntax: Don't strip types and lifetimes from single-segment paths in 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]
2014-08-12 17:33:16 +00:00
fn
main
(
)
{
match
Some
(
"
foo
"
)
{
Update compile fail tests to use isize.
2015-01-08 10:54:35 +00:00
None
::
<
isize
>
=
>
{
}
//~ ERROR mismatched types
libsyntax: Don't strip types and lifetimes from single-segment paths in 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]
2014-08-12 17:33:16 +00:00
Some
(
_
)
=
>
{
}
}
}
Reference in New Issue
Copy Permalink