Add ui test insufficient-suggestion-issue-141679.rs
This commit is contained in:
parent
1c316d3461
commit
3b705eae4f
2 changed files with 19 additions and 0 deletions
|
|
@ -0,0 +1,8 @@
|
|||
use std::rc::Rc;
|
||||
pub struct Foo;
|
||||
|
||||
pub type Function = Rc<Foo>;
|
||||
|
||||
impl Function {}
|
||||
//~^ ERROR cannot define inherent `impl` for a type outside of the crate where the type is defined [E0116]
|
||||
fn main(){}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
error[E0116]: cannot define inherent `impl` for a type outside of the crate where the type is defined
|
||||
--> $DIR/insufficient-suggestion-issue-141679.rs:6:1
|
||||
|
|
||||
LL | impl Function {}
|
||||
| ^^^^^^^^^^^^^ impl for type defined outside of crate
|
||||
|
|
||||
= note: define and implement a trait or new type instead
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0116`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue