Move non-existant type return test to the ui suite
This commit is contained in:
parent
ec47293998
commit
264d0a2e5c
2 changed files with 9 additions and 0 deletions
22
src/test/ui/issue-53300.rs
Normal file
22
src/test/ui/issue-53300.rs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
// Copyright 2012-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.
|
||||
|
||||
// issue 53300
|
||||
|
||||
pub trait A {
|
||||
fn add(&self, b: i32) -> i32;
|
||||
}
|
||||
|
||||
fn addition() -> Wrapper<impl A> {}
|
||||
//~^ ERROR cannot find type `Wrapper` in this scope [E0412]
|
||||
|
||||
fn main() {
|
||||
let res = addition();
|
||||
}
|
||||
9
src/test/ui/issue-53300.stderr
Normal file
9
src/test/ui/issue-53300.stderr
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
error[E0412]: cannot find type `Wrapper` in this scope
|
||||
--> $DIR/issue-53300.rs:17:18
|
||||
|
|
||||
LL | fn addition() -> Wrapper<impl A> {}
|
||||
| ^^^^^^^ not found in this scope
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0412`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue