Rollup merge of #55102 - petrochenkov:trextra, r=nikomatsakis
resolve: Do not skip extern prelude during speculative resolution Fixes https://github.com/rust-lang/rust/issues/54665
This commit is contained in:
commit
8988403d69
5 changed files with 30 additions and 4 deletions
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
// run-pass
|
||||
#![allow(unused_variables)]
|
||||
// compile-flags: --extern LooksLikeExternCrate=/path/to/nowhere
|
||||
// compile-flags: --extern LooksLikeExternCrate
|
||||
|
||||
mod m {
|
||||
pub struct LooksLikeExternCrate;
|
||||
|
|
|
|||
1
src/test/ui/impl-trait/auxiliary/extra-item.rs
Normal file
1
src/test/ui/impl-trait/auxiliary/extra-item.rs
Normal file
|
|
@ -0,0 +1 @@
|
|||
pub trait MyTrait {}
|
||||
10
src/test/ui/impl-trait/extra-item.rs
Normal file
10
src/test/ui/impl-trait/extra-item.rs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
// aux-build:extra-item.rs
|
||||
// compile-flags:--extern extra_item
|
||||
|
||||
struct S;
|
||||
|
||||
impl extra_item::MyTrait for S {
|
||||
fn extra() {} //~ ERROR method `extra` is not a member of trait `extra_item::MyTrait`
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
9
src/test/ui/impl-trait/extra-item.stderr
Normal file
9
src/test/ui/impl-trait/extra-item.stderr
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
error[E0407]: method `extra` is not a member of trait `extra_item::MyTrait`
|
||||
--> $DIR/extra-item.rs:7:5
|
||||
|
|
||||
LL | fn extra() {} //~ ERROR method `extra` is not a member of trait `extra_item::MyTrait`
|
||||
| ^^^^^^^^^^^^^ not a member of trait `extra_item::MyTrait`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0407`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue