Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
51b51b51d7931da85280382a81c4dd80c73ca754
rust/tests/ui/regions/regions-pattern-typing-issue-19997.rs

12 lines
224 B
Rust
Raw Normal View History

Correct the subtyping relations created by the pattern typechecking code. Previously we were creating a subtyping relation in the wrong direction. We now just unify types, which is stronger than necessary but turns out fine. Fixes #19552. Fixes #19997.
2015-01-04 05:22:59 -05:00
fn main() {
Remove integer suffixes where the types in compiled code are identical.
2015-03-03 10:42:26 +02:00
let a0 = 0;
let f = 1;
Correct the subtyping relations created by the pattern typechecking code. Previously we were creating a subtyping relation in the wrong direction. We now just unify types, which is stronger than necessary but turns out fine. Fixes #19552. Fixes #19997.
2015-01-04 05:22:59 -05:00
let mut a1 = &a0;
match (&a1,) {
(&ref b0,) => {
update tests for migrate mode by default
2019-04-22 08:40:08 +01:00
a1 = &f; //~ ERROR cannot assign to `a1` because it is borrowed
remove -Znll -- borrowck=mir implies nll now
2018-04-09 05:28:00 -04:00
drop(b0);
Correct the subtyping relations created by the pattern typechecking code. Previously we were creating a subtyping relation in the wrong direction. We now just unify types, which is stronger than necessary but turns out fine. Fixes #19552. Fixes #19997.
2015-01-04 05:22:59 -05:00
}
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 5436ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API