mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
Add test for prelude import
This commit is contained in:
parent
f4f781d5cf
commit
b67764d5cb
@ -18,6 +18,16 @@ use wildcard_imports_helper::inner::inner_for_self_import;
|
||||
use wildcard_imports_helper::inner::inner_for_self_import::inner_extern_bar;
|
||||
use wildcard_imports_helper::{ExternA, extern_foo};
|
||||
|
||||
use std::io::prelude::*;
|
||||
|
||||
struct ReadFoo;
|
||||
|
||||
impl Read for ReadFoo {
|
||||
fn read(&mut self, _buf: &mut [u8]) -> std::io::Result<usize> {
|
||||
Ok(0)
|
||||
}
|
||||
}
|
||||
|
||||
mod fn_mod {
|
||||
pub fn foo() {}
|
||||
}
|
||||
|
@ -18,6 +18,16 @@ use wildcard_imports_helper::inner::inner_for_self_import;
|
||||
use wildcard_imports_helper::inner::inner_for_self_import::*;
|
||||
use wildcard_imports_helper::*;
|
||||
|
||||
use std::io::prelude::*;
|
||||
|
||||
struct ReadFoo;
|
||||
|
||||
impl Read for ReadFoo {
|
||||
fn read(&mut self, _buf: &mut [u8]) -> std::io::Result<usize> {
|
||||
Ok(0)
|
||||
}
|
||||
}
|
||||
|
||||
mod fn_mod {
|
||||
pub fn foo() {}
|
||||
}
|
||||
|
@ -37,43 +37,43 @@ LL | use wildcard_imports_helper::*;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `wildcard_imports_helper::{ExternA, extern_foo}`
|
||||
|
||||
error: usage of wildcard import
|
||||
--> $DIR/wildcard_imports.rs:78:13
|
||||
--> $DIR/wildcard_imports.rs:88:13
|
||||
|
|
||||
LL | use crate::fn_mod::*;
|
||||
| ^^^^^^^^^^^^^^^^ help: try: `crate::fn_mod::foo`
|
||||
|
||||
error: usage of wildcard import
|
||||
--> $DIR/wildcard_imports.rs:84:75
|
||||
--> $DIR/wildcard_imports.rs:94:75
|
||||
|
|
||||
LL | use wildcard_imports_helper::inner::inner_for_self_import::{self, *};
|
||||
| ^ help: try: `inner_extern_foo`
|
||||
|
||||
error: usage of wildcard import
|
||||
--> $DIR/wildcard_imports.rs:85:13
|
||||
--> $DIR/wildcard_imports.rs:95:13
|
||||
|
|
||||
LL | use wildcard_imports_helper::*;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `wildcard_imports_helper::{ExternA, extern_foo}`
|
||||
|
||||
error: usage of wildcard import
|
||||
--> $DIR/wildcard_imports.rs:96:20
|
||||
--> $DIR/wildcard_imports.rs:106:20
|
||||
|
|
||||
LL | use self::{inner::*, inner2::*};
|
||||
| ^^^^^^^^ help: try: `inner::inner_foo`
|
||||
|
||||
error: usage of wildcard import
|
||||
--> $DIR/wildcard_imports.rs:96:30
|
||||
--> $DIR/wildcard_imports.rs:106:30
|
||||
|
|
||||
LL | use self::{inner::*, inner2::*};
|
||||
| ^^^^^^^^^ help: try: `inner2::inner_bar`
|
||||
|
||||
error: usage of wildcard import
|
||||
--> $DIR/wildcard_imports.rs:103:13
|
||||
--> $DIR/wildcard_imports.rs:113:13
|
||||
|
|
||||
LL | use wildcard_imports_helper::*;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `wildcard_imports_helper::{ExternExportedEnum, ExternExportedStruct, extern_exported}`
|
||||
|
||||
error: usage of wildcard import
|
||||
--> $DIR/wildcard_imports.rs:132:9
|
||||
--> $DIR/wildcard_imports.rs:142:9
|
||||
|
|
||||
LL | use crate::in_fn_test::*;
|
||||
| ^^^^^^^^^^^^^^^^^^^^ help: try: `crate::in_fn_test::{ExportedEnum, ExportedStruct, exported}`
|
||||
|
Loading…
Reference in New Issue
Block a user