Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
893ab67
Custom lifetime error for `impl` item doesn't conform to `trait`
estebank Oct 3, 2019
3e2bc19
review comments
estebank Oct 4, 2019
1e95b5c
Point at the trait item and tweak wording
estebank Oct 15, 2019
e383b7c
Make error apply only to impl/trait mismatch
estebank Oct 15, 2019
3aba2d0
Fix NLL test
estebank Oct 15, 2019
093ec70
Add new EFIAPI ABI
roblabla Oct 24, 2019
6173280
Fix EFIABI test
roblabla Oct 25, 2019
13d27af
Fix inverted check in EFIAPI
roblabla Oct 25, 2019
e54ae51
Add proper tracking issue for EFIAPI
roblabla Oct 25, 2019
174d4f9
EFIAPI: Fix symbolname tests
roblabla Oct 25, 2019
7f3c843
Refactor check_attr
varkor Oct 11, 2019
94c4dd9
Emit warning for ignored #[inline] on trait method prototypes
varkor Oct 11, 2019
66d7ef0
Emit warning for ignored #[inline] on foreign function prototypes
varkor Oct 11, 2019
af2b497
Improve comments
varkor Oct 11, 2019
4552c8f
Add test for attribute error checking on trait and foreign items
varkor Oct 11, 2019
41ee9ea
Refactor `check_track_caller`
varkor Oct 11, 2019
8042206
Handle `ImplItem` in `check_attr`
varkor Oct 13, 2019
b925eb5
Update bitflags
varkor Oct 13, 2019
e8566fb
Move handling of `#[track_caller]` to `check_attr`
varkor Oct 14, 2019
6446f19
Permit `#[target_feature]` on method implementations
varkor Oct 14, 2019
f8db8ff
Permit #[track_caller] on inherent methods
varkor Oct 24, 2019
f47f530
Make inline associated constants a future compatibility warning
varkor Oct 25, 2019
23b3827
ci: add support for MIPS64 musl targets
xen0n Jul 28, 2019
1099826
Only run efiapi test on llvm 9.0+
roblabla Oct 26, 2019
22586d7
Better pretty printing for const raw pointers
iwikal Oct 27, 2019
6a6ed12
Add the two missing hex digits
iwikal Oct 27, 2019
adfe9a4
Call out the types that are non local on E0117
estebank Oct 11, 2019
9b4f811
Use more targeted spans for orphan rule errors
estebank Oct 12, 2019
56aa89c
Further tweak spans for better readability
estebank Oct 12, 2019
daeafd8
Talk about specific types and remove lifetimes from output
estebank Oct 13, 2019
db1bfbd
Account for tuples in explanation
estebank Oct 13, 2019
95364df
Do not display ADT type arguments and fix rebase
estebank Oct 24, 2019
2cd28c1
add comment
estebank Oct 27, 2019
627691f
Fix rebase
estebank Oct 28, 2019
273ee61
Improve the "try using a variant of the expected type" hint.
Patryk27 Oct 18, 2019
e188e2d
Fix a previously forgotten pretty-printing test after a change to the…
Patryk27 Oct 26, 2019
5c023d6
Improve pretty-printing for compound qualified paths.
Patryk27 Oct 27, 2019
d7f99da
Update backtrace to 0.3.40
tmandry Oct 17, 2019
1437592
Rollup merge of #65068 - estebank:trait-impl-lt-mismatch, r=nikomatsakis
Centril Oct 29, 2019
137a6ab
Rollup merge of #65294 - varkor:lint-inline-prototype, r=matthewjasper
Centril Oct 29, 2019
14a9a50
Rollup merge of #65318 - estebank:coherence, r=varkor
Centril Oct 29, 2019
0ae035b
Rollup merge of #65531 - tmandry:bump-backtrace, r=cramertj
Centril Oct 29, 2019
fb73c0b
Rollup merge of #65562 - Patryk27:master, r=estebank
Centril Oct 29, 2019
c5d8681
Rollup merge of #65809 - roblabla:eficall-abi, r=nagisa
Centril Oct 29, 2019
cb5f9e2
Rollup merge of #65843 - xen0n:mips64-musl-targets-with-ci, r=alexcri…
Centril Oct 29, 2019
8a6462f
Rollup merge of #65859 - iwikal:pretty-const-pointers, r=cramertj
Centril Oct 29, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Call out the types that are non local on E0117
  • Loading branch information
estebank committed Oct 28, 2019
commit adfe9a45d60198316952baa5088ae77a8a5e919a
11 changes: 8 additions & 3 deletions src/librustc/traits/coherence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ pub fn trait_ref_is_local_or_fundamental<'tcx>(
}

pub enum OrphanCheckErr<'tcx> {
NoLocalInputType,
NonLocalInputType(Vec<Ty<'tcx>>),
UncoveredTy(Ty<'tcx>),
}

Expand Down Expand Up @@ -390,6 +390,7 @@ fn orphan_check_trait_ref<'tcx>(
}
}

let mut non_local_spans = vec![];
for input_ty in
trait_ref.input_types().flat_map(|ty| uncover_fundamental_ty(tcx, ty, in_crate))
{
Expand All @@ -401,11 +402,13 @@ fn orphan_check_trait_ref<'tcx>(
debug!("orphan_check_trait_ref: uncovered ty: `{:?}`", input_ty);
return Err(OrphanCheckErr::UncoveredTy(input_ty))
}
non_local_spans.push(input_ty);
}
// If we exit above loop, never found a local type.
debug!("orphan_check_trait_ref: no local type");
Err(OrphanCheckErr::NoLocalInputType)
Err(OrphanCheckErr::NonLocalInputType(non_local_spans))
} else {
let mut non_local_spans = vec![];
// First, create an ordered iterator over all the type
// parameters to the trait, with the self type appearing
// first. Find the first input type that either references a
Expand Down Expand Up @@ -438,10 +441,12 @@ fn orphan_check_trait_ref<'tcx>(
debug!("orphan_check_trait_ref: uncovered type `{:?}`", param);
return Err(OrphanCheckErr::UncoveredTy(param));
}

non_local_spans.push(input_ty);
}
// If we exit above loop, never found a local type.
debug!("orphan_check_trait_ref: no local type");
Err(OrphanCheckErr::NoLocalInputType)
Err(OrphanCheckErr::NonLocalInputType(non_local_spans))
}
}

Expand Down
24 changes: 14 additions & 10 deletions src/librustc_typeck/coherence/orphan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,20 @@ impl ItemLikeVisitor<'v> for OrphanChecker<'tcx> {
let sp = cm.def_span(item.span);
match traits::orphan_check(self.tcx, def_id) {
Ok(()) => {}
Err(traits::OrphanCheckErr::NoLocalInputType) => {
struct_span_err!(self.tcx.sess,
sp,
E0117,
"only traits defined in the current crate can be \
implemented for arbitrary types")
.span_label(sp, "impl doesn't use types inside crate")
.note("the impl does not reference only types defined in this crate")
.note("define and implement a trait or new type instead")
.emit();
Err(traits::OrphanCheckErr::NonLocalInputType(tys)) => {
let mut err = struct_span_err!(
self.tcx.sess,
sp,
E0117,
"only traits defined in the current crate can be implemented for \
arbitrary types"
);
err.span_label(sp, "impl doesn't use types inside crate");
for ty in &tys {
err.note(&format!("`{}` is not defined in the current create", ty));
}
err.note("define and implement a trait or new type instead");
err.emit();
return;
}
Err(traits::OrphanCheckErr::UncoveredTy(param_ty)) => {
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/coherence/coherence-cow.re_a.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | impl<T> Remote for Pair<T,Cover<T>> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `lib::Pair<T, Cover<T>>` is not defined in the current create
= note: define and implement a trait or new type instead

error: aborting due to previous error
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/coherence/coherence-cow.re_b.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | impl<T> Remote for Pair<Cover<T>,T> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `lib::Pair<Cover<T>, T>` is not defined in the current create
= note: define and implement a trait or new type instead

error: aborting due to previous error
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/coherence/coherence-cow.re_c.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | impl<T,U> Remote for Pair<Cover<T>,U> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `lib::Pair<Cover<T>, U>` is not defined in the current create
= note: define and implement a trait or new type instead

error: aborting due to previous error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | impl Misc for dyn Fundamental<Local> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `(dyn coherence_fundamental_trait_lib::Fundamental<Local> + 'static)` is not defined in the current create
= note: define and implement a trait or new type instead

error: aborting due to previous error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | impl Misc for dyn Fundamental<Local> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `(dyn coherence_fundamental_trait_lib::Fundamental<Local> + 'static)` is not defined in the current create
= note: define and implement a trait or new type instead

error: aborting due to previous error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | impl !Send for dyn Marker2 {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `(dyn Marker2 + 'static)` is not defined in the current create
= note: define and implement a trait or new type instead

error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `(dyn Object + 'static)`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | unsafe impl Send for dyn Marker2 {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `(dyn Marker2 + 'static)` is not defined in the current create
= note: define and implement a trait or new type instead

error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `(dyn Object + 'static)`
Expand Down
8 changes: 4 additions & 4 deletions src/test/ui/coherence/coherence-impls-copy.old.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | impl Copy for i32 {}
| ^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `i32` is not defined in the current create
= note: define and implement a trait or new type instead

error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
Expand All @@ -60,7 +60,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | impl Copy for (MyType, MyType) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `(MyType, MyType)` is not defined in the current create
= note: define and implement a trait or new type instead

error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
Expand All @@ -69,7 +69,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | impl Copy for [MyType] {}
| ^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `[MyType]` is not defined in the current create
= note: define and implement a trait or new type instead

error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
Expand All @@ -78,7 +78,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | impl Copy for &'static [NotSync] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `&'static [NotSync]` is not defined in the current create
= note: define and implement a trait or new type instead

error: aborting due to 10 previous errors
Expand Down
8 changes: 4 additions & 4 deletions src/test/ui/coherence/coherence-impls-copy.re.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | impl Copy for i32 {}
| ^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `i32` is not defined in the current create
= note: define and implement a trait or new type instead

error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
Expand All @@ -60,7 +60,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | impl Copy for (MyType, MyType) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `(MyType, MyType)` is not defined in the current create
= note: define and implement a trait or new type instead

error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
Expand All @@ -69,7 +69,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | impl Copy for [MyType] {}
| ^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `[MyType]` is not defined in the current create
= note: define and implement a trait or new type instead

error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
Expand All @@ -78,7 +78,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | impl Copy for &'static [NotSync] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `[NotSync]` is not defined in the current create
= note: define and implement a trait or new type instead

error: aborting due to 10 previous errors
Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/coherence/coherence-impls-send.old.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | unsafe impl Send for (MyType, MyType) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `(MyType, MyType)` is not defined in the current create
= note: define and implement a trait or new type instead

error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `&'static NotSync`
Expand All @@ -19,7 +19,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | unsafe impl Send for [MyType] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `[MyType]` is not defined in the current create
= note: define and implement a trait or new type instead

error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
Expand All @@ -28,7 +28,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | unsafe impl Send for &'static [NotSync] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `&'static [NotSync]` is not defined in the current create
= note: define and implement a trait or new type instead

error: aborting due to 4 previous errors
Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/coherence/coherence-impls-send.re.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | unsafe impl Send for (MyType, MyType) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `(MyType, MyType)` is not defined in the current create
= note: define and implement a trait or new type instead

error[E0321]: cross-crate traits with a default impl, like `std::marker::Send`, can only be implemented for a struct/enum type, not `&'static NotSync`
Expand All @@ -19,7 +19,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | unsafe impl Send for [MyType] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `[MyType]` is not defined in the current create
= note: define and implement a trait or new type instead

error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
Expand All @@ -28,7 +28,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | unsafe impl Send for &'static [NotSync] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `[NotSync]` is not defined in the current create
= note: define and implement a trait or new type instead

error: aborting due to 4 previous errors
Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/coherence/coherence-impls-sized.old.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | impl Sized for (MyType, MyType) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `(MyType, MyType)` is not defined in the current create
= note: define and implement a trait or new type instead

error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
Expand All @@ -49,7 +49,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | impl Sized for [MyType] {}
| ^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `[MyType]` is not defined in the current create
= note: define and implement a trait or new type instead

error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
Expand All @@ -58,7 +58,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | impl Sized for &'static [NotSync] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `&'static [NotSync]` is not defined in the current create
= note: define and implement a trait or new type instead

error: aborting due to 9 previous errors
Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/coherence/coherence-impls-sized.re.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | impl Sized for (MyType, MyType) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `(MyType, MyType)` is not defined in the current create
= note: define and implement a trait or new type instead

error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
Expand All @@ -49,7 +49,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | impl Sized for [MyType] {}
| ^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `[MyType]` is not defined in the current create
= note: define and implement a trait or new type instead

error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
Expand All @@ -58,7 +58,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | impl Sized for &'static [NotSync] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `[NotSync]` is not defined in the current create
= note: define and implement a trait or new type instead

error: aborting due to 9 previous errors
Expand Down
5 changes: 3 additions & 2 deletions src/test/ui/coherence/coherence-orphan.old.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | impl TheTrait<usize> for isize { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `isize` is not defined in the current create
= note: `usize` is not defined in the current create
= note: define and implement a trait or new type instead

error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
Expand All @@ -13,7 +14,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | impl !Send for Vec<isize> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `std::vec::Vec<isize>` is not defined in the current create
= note: define and implement a trait or new type instead

error: aborting due to 2 previous errors
Expand Down
5 changes: 3 additions & 2 deletions src/test/ui/coherence/coherence-orphan.re.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | impl TheTrait<usize> for isize { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `isize` is not defined in the current create
= note: `usize` is not defined in the current create
= note: define and implement a trait or new type instead

error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
Expand All @@ -13,7 +14,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | impl !Send for Vec<isize> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `std::vec::Vec<isize>` is not defined in the current create
= note: define and implement a trait or new type instead

error: aborting due to 2 previous errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | impl<T> Remote for lib::Pair<T,Foo> { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `lib::Pair<T, Foo>` is not defined in the current create
= note: define and implement a trait or new type instead

error: aborting due to previous error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ error[E0117]: only traits defined in the current crate can be implemented for ar
LL | impl<T, U> Remote1<Pair<T, Local<U>>> for i32 { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: `i32` is not defined in the current create
= note: `lib::Pair<T, Local<U>>` is not defined in the current create
= note: define and implement a trait or new type instead

error: aborting due to previous error
Expand Down
Loading