forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: add test for rust-lang#61019's current behaviour
This commit adds a test for rust-lang#61019 where a extern crate is imported as `std` which results in name resolution to fail due to the uses of `std` types introduced from lowering. Signed-off-by: David Wood <[email protected]>
- Loading branch information
Showing
2 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
//~ ERROR failed to resolve: could not find `future` in `std` [E0433] | ||
//~^ ERROR failed to resolve: could not find `pin` in `std` [E0433] | ||
//~^^ ERROR failed to resolve: could not find `future` in `std` [E0433] | ||
//~^^^ ERROR failed to resolve: could not find `future` in `std` [E0433] | ||
//~^^^^ ERROR failed to resolve: could not find `task` in `std` [E0433] | ||
//~^^^^^ ERROR failed to resolve: could not find `task` in `std` [E0433] | ||
//~^^^^^^ ERROR failed to resolve: could not find `future` in `std` [E0433] | ||
//~^^^^^^^ ERROR failed to resolve: could not find `future` in `std` [E0433] | ||
//~^^^^^^^^ ERROR failed to resolve: could not find `ops` in `std` [E0433] | ||
//~^^^^^^^^^ ERROR failed to resolve: could not find `option` in `std` [E0433] | ||
//~^^^^^^^^^^ ERROR failed to resolve: could not find `option` in `std` [E0433] | ||
//~^^^^^^^^^^^ ERROR failed to resolve: could not find `iter` in `std` [E0433] | ||
//~^^^^^^^^^^^^ ERROR failed to resolve: could not find `iter` in `std` [E0433] | ||
//~^^^^^^^^^^^^^ ERROR failed to resolve: could not find `ops` in `std` [E0433] | ||
//~^^^^^^^^^^^^^^ ERROR failed to resolve: could not find `option` in `std` [E0433] | ||
//~^^^^^^^^^^^^^^^ ERROR failed to resolve: could not find `option` in `std` [E0433] | ||
//~^^^^^^^^^^^^^^^^ ERROR failed to resolve: could not find `iter` in `std` [E0433] | ||
//~^^^^^^^^^^^^^^^^^ ERROR failed to resolve: could not find `iter` in `std` [E0433] | ||
//~^^^^^^^^^^^^^^^^^^ ERROR failed to resolve: could not find `ops` in `std` [E0433] | ||
//~^^^^^^^^^^^^^^^^^^^ ERROR failed to resolve: could not find `result` in `std` [E0433] | ||
//~^^^^^^^^^^^^^^^^^^^^ ERROR failed to resolve: could not find `convert` in `std` [E0433] | ||
//~^^^^^^^^^^^^^^^^^^^^^ ERROR failed to resolve: could not find `ops` in `std` [E0433] | ||
//~^^^^^^^^^^^^^^^^^^^^^^ ERROR failed to resolve: could not find `result` in `std` [E0433] | ||
|
||
// edition:2018 | ||
// aux-build:not-libstd.rs | ||
|
||
// Check that paths created in HIR are not affected by in scope names. | ||
|
||
extern crate not_libstd as std; | ||
|
||
async fn the_future() { | ||
async {}.await; | ||
} | ||
|
||
fn main() -> Result<(), ()> { | ||
for i in 0..10 {} | ||
for j in 0..=10 {} | ||
Ok(())?; | ||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
error[E0433]: failed to resolve: could not find `future` in `std` | ||
|
||
error[E0433]: failed to resolve: could not find `pin` in `std` | ||
|
||
error[E0433]: failed to resolve: could not find `future` in `std` | ||
|
||
error[E0433]: failed to resolve: could not find `future` in `std` | ||
|
||
error[E0433]: failed to resolve: could not find `task` in `std` | ||
|
||
error[E0433]: failed to resolve: could not find `task` in `std` | ||
|
||
error[E0433]: failed to resolve: could not find `future` in `std` | ||
|
||
error[E0433]: failed to resolve: could not find `future` in `std` | ||
|
||
error[E0433]: failed to resolve: could not find `ops` in `std` | ||
|
||
error[E0433]: failed to resolve: could not find `option` in `std` | ||
|
||
error[E0433]: failed to resolve: could not find `option` in `std` | ||
|
||
error[E0433]: failed to resolve: could not find `iter` in `std` | ||
|
||
error[E0433]: failed to resolve: could not find `iter` in `std` | ||
|
||
error[E0433]: failed to resolve: could not find `ops` in `std` | ||
|
||
error[E0433]: failed to resolve: could not find `option` in `std` | ||
|
||
error[E0433]: failed to resolve: could not find `option` in `std` | ||
|
||
error[E0433]: failed to resolve: could not find `iter` in `std` | ||
|
||
error[E0433]: failed to resolve: could not find `iter` in `std` | ||
|
||
error[E0433]: failed to resolve: could not find `ops` in `std` | ||
|
||
error[E0433]: failed to resolve: could not find `result` in `std` | ||
|
||
error[E0433]: failed to resolve: could not find `convert` in `std` | ||
|
||
error[E0433]: failed to resolve: could not find `ops` in `std` | ||
|
||
error[E0433]: failed to resolve: could not find `result` in `std` | ||
|
||
error: aborting due to 23 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0433`. |