Revert "Auto merge of #39485 - canndrew:inference-fix-39297, r=nikomatsakis"
This reverts commitdc0bb3f283, reversing changes made toe879aa43ef. This is a temporary step intended to fix regressions. A more comprehensive fix for type inference and dead-code is in the works.
This commit is contained in:
parent
8c4f2c64c6
commit
89ddd717ca
5 changed files with 36 additions and 11 deletions
19
src/test/compile-fail/issue-10176.rs
Normal file
19
src/test/compile-fail/issue-10176.rs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
fn f() -> isize {
|
||||
(return 1, return 2)
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected type `isize`
|
||||
//~| found type `(_, _)`
|
||||
//~| expected isize, found tuple
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
17
src/test/compile-fail/issue-5500.rs
Normal file
17
src/test/compile-fail/issue-5500.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
fn main() {
|
||||
&panic!()
|
||||
//~^ ERROR mismatched types
|
||||
//~| expected type `()`
|
||||
//~| found type `&_`
|
||||
//~| expected (), found reference
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue