Skip to content

Commit c0eb5f2

Browse files
committed
Add ui test insufficient-suggestion-issue-141679.rs
Signed-off-by: xizheyin <[email protected]>
1 parent 8708f3c commit c0eb5f2

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
use std::rc::Rc;
2+
pub struct Foo;
3+
4+
pub type Function = Rc<Foo>;
5+
6+
impl Function {}
7+
//~^ ERROR cannot define inherent `impl` for a type outside of the crate where the type is defined [E0116]
8+
fn main(){}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
error[E0116]: cannot define inherent `impl` for a type outside of the crate where the type is defined
2+
--> $DIR/insufficient-suggestion-issue-141679.rs:6:1
3+
|
4+
LL | impl Function {}
5+
| ^^^^^^^^^^^^^ impl for type defined outside of crate
6+
|
7+
= note: define and implement a trait or new type instead
8+
9+
error: aborting due to 1 previous error
10+
11+
For more information about this error, try `rustc --explain E0116`.

0 commit comments

Comments
 (0)